blob: 39fb15f5c7959d27c8a9577a4ecd344627075b97 [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
Christian Heimesff5be6e2018-01-20 13:19:21 +0100627OPENSSL_LDFLAGS
628OPENSSL_LIBS
629OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800630ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000631SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000632THREADHEADERS
Victor Stinner75e59a92021-01-20 17:07:21 +0100633WHEEL_PKG_DIR
doko@python.org87421192013-01-26 11:39:31 +0100634LIBPL
635PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100636PLATLIBDIR
Victor Stinner51ae31e2020-06-09 15:32:43 +0200637BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200638LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700639EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200640ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000641SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LIBC
643LIBM
644HAVE_GETHOSTBYNAME
645HAVE_GETHOSTBYNAME_R
646HAVE_GETHOSTBYNAME_R_3_ARG
647HAVE_GETHOSTBYNAME_R_5_ARG
648HAVE_GETHOSTBYNAME_R_6_ARG
649LIBOBJS
650TRUE
651MACHDEP_OBJS
652DYNLOADFILE
653DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700654DTRACE_OBJS
655DTRACE_HEADERS
656DFLAGS
657DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700658TCLTK_LIBS
659TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000660LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800661PKG_CONFIG_LIBDIR
662PKG_CONFIG_PATH
663PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400664TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000665SHLIBS
666CFLAGSFORSHARED
667LINKFORSHARED
668CCSHARED
669BLDSHARED
670LDCXXSHARED
671LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700672SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000673LIBTOOL_CRUFT
674OTHER_LIBTOOL_OPT
675UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100676LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700677CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000678BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200679CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000680OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700681LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700682LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700683LLVM_PROF_ERR
684LLVM_PROF_FILE
685LLVM_PROF_MERGER
686PGO_PROF_USE_FLAG
687PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200688LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200689LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700690PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700691DEF_MAKE_RULE
692DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000693ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000694LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100695MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000696INSTALL_DATA
697INSTALL_SCRIPT
698INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200699ac_ct_READELF
700READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000701ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200702ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000703AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000704GNULD
Stefan Krahe6dcd372020-08-29 17:00:08 +0200705EXPORTSFROM
706EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000707LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000708LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000709RUNSHARED
710INSTSONAME
711LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000712PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000713BLDLIBRARY
714DLLLIBRARY
715LDLIBRARY
716LIBRARY
717BUILDEXEEXT
718EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200719NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200720MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200721PLATFORM_TRIPLET
722MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200723ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000724MAINCC
725CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700726SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200727GREP
728CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000729OBJEXT
730EXEEXT
731ac_ct_CC
732CPPFLAGS
733LDFLAGS
734CFLAGS
735CC
736EXPORT_MACOSX_DEPLOYMENT_TARGET
737CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200738_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000739MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000740FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000741FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800742FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000743FRAMEWORKALTINSTALLLAST
744FRAMEWORKALTINSTALLFIRST
745FRAMEWORKINSTALLLAST
746FRAMEWORKINSTALLFIRST
747PYTHONFRAMEWORKINSTALLDIR
748PYTHONFRAMEWORKPREFIX
749PYTHONFRAMEWORKDIR
750PYTHONFRAMEWORKIDENTIFIER
751PYTHONFRAMEWORK
752LIPO_32BIT_FLAGS
753ARCH_RUN_32BIT
754UNIVERSALSDK
755CONFIG_ARGS
756SOVERSION
757VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200758PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200759PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100760host_os
761host_vendor
762host_cpu
763host
764build_os
765build_vendor
766build_cpu
767build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500768HAS_GIT
769GITBRANCH
770GITTAG
771GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400772BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000773target_alias
774host_alias
775build_alias
776LIBS
777ECHO_T
778ECHO_N
779ECHO_C
780DEFS
781mandir
782localedir
783libdir
784psdir
785pdfdir
786dvidir
787htmldir
788infodir
789docdir
790oldincludedir
791includedir
792localstatedir
793sharedstatedir
794sysconfdir
795datadir
796datarootdir
797libexecdir
798sbindir
799bindir
800program_transform_name
801prefix
802exec_prefix
803PACKAGE_URL
804PACKAGE_BUGREPORT
805PACKAGE_STRING
806PACKAGE_VERSION
807PACKAGE_TARNAME
808PACKAGE_NAME
809PATH_SEPARATOR
810SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000811ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000812ac_user_opts='
813enable_option_checking
814enable_universalsdk
815with_universal_archs
816with_framework_name
817enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000818with_cxx_main
819with_suffix
820enable_shared
821enable_profiling
822with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200823with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200824with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000825enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700826with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100827with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400828with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100829with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800830with_memory_sanitizer
831with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_libs
833with_system_expat
834with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100835with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100836with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000837enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700838with_tcltk_includes
839with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000841enable_ipv6
842with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000844with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700846with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000847with_libm
848with_libc
849enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100850with_platlibdir
Victor Stinner75e59a92021-01-20 17:07:21 +0100851with_wheel_pkg_dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000852with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800853with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100854with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100855with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200856with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200857with_experimental_isolated_subinterpreters
pxinwr277ce302020-12-30 20:50:39 +0800858enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000859'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860 ac_precious_vars='build_alias
861host_alias
862target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100863MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864CC
865CFLAGS
866LDFLAGS
867LIBS
868CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800869CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700870PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800871PKG_CONFIG
872PKG_CONFIG_PATH
873PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874
Guido van Rossum627b2d71993-12-24 10:39:16 +0000875
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000877ac_init_help=
878ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000879ac_unrecognized_opts=
880ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881# The variables have the same names as the options, with
882# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000883cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886no_recursion=
887prefix=NONE
888program_prefix=NONE
889program_suffix=NONE
890program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895x_includes=NONE
896x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000897
898# Installation directory options.
899# These are left unexpanded so users can "make install exec_prefix=/foo"
900# and all the variables that are supposed to be based on exec_prefix
901# by default will actually change.
902# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904bindir='${exec_prefix}/bin'
905sbindir='${exec_prefix}/sbin'
906libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907datarootdir='${prefix}/share'
908datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909sysconfdir='${prefix}/etc'
910sharedstatedir='${prefix}/com'
911localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912includedir='${prefix}/include'
913oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
915infodir='${datarootdir}/info'
916htmldir='${docdir}'
917dvidir='${docdir}'
918pdfdir='${docdir}'
919psdir='${docdir}'
920libdir='${exec_prefix}/lib'
921localedir='${datarootdir}/locale'
922mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000927do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928 # If the previous option needs an argument, assign it.
929 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931 ac_prev=
932 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000933 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200936 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
937 *=) ac_optarg= ;;
938 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941 # Accept the important Cygnus configure options, so we can diagnose typos.
942
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 case $ac_dashdash$ac_option in
944 --)
945 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947 -bindir | --bindir | --bindi | --bind | --bin | --bi)
948 ac_prev=bindir ;;
949 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
952 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -cache-file | --cache-file | --cache-fil | --cache-fi \
958 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
959 ac_prev=cache_file ;;
960 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
961 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 cache_file=$ac_optarg ;;
963
964 --config-cache | -C)
965 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000967 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000969 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
973 | --dataroo | --dataro | --datar)
974 ac_prev=datarootdir ;;
975 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
976 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
977 datarootdir=$ac_optarg ;;
978
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000980 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000981 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000982 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200983 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt_orig=$ac_useropt
985 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
986 case $ac_user_opts in
987 *"
988"enable_$ac_useropt"
989"*) ;;
990 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
991 ac_unrecognized_sep=', ';;
992 esac
993 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000994
995 -docdir | --docdir | --docdi | --doc | --do)
996 ac_prev=docdir ;;
997 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
998 docdir=$ac_optarg ;;
999
1000 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1001 ac_prev=dvidir ;;
1002 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1003 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001006 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001008 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001009 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001010 ac_useropt_orig=$ac_useropt
1011 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1012 case $ac_user_opts in
1013 *"
1014"enable_$ac_useropt"
1015"*) ;;
1016 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1017 ac_unrecognized_sep=', ';;
1018 esac
1019 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1022 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1023 | --exec | --exe | --ex)
1024 ac_prev=exec_prefix ;;
1025 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1026 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1027 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001031 # Obsolete; use --with-gas.
1032 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 -help | --help | --hel | --he | -h)
1035 ac_init_help=long ;;
1036 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1037 ac_init_help=recursive ;;
1038 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1039 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001046 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1047 ac_prev=htmldir ;;
1048 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1049 | --ht=*)
1050 htmldir=$ac_optarg ;;
1051
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052 -includedir | --includedir | --includedi | --included | --include \
1053 | --includ | --inclu | --incl | --inc)
1054 ac_prev=includedir ;;
1055 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1056 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -infodir | --infodir | --infodi | --infod | --info | --inf)
1060 ac_prev=infodir ;;
1061 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -libdir | --libdir | --libdi | --libd)
1065 ac_prev=libdir ;;
1066 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
1069 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1070 | --libexe | --libex | --libe)
1071 ac_prev=libexecdir ;;
1072 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1073 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001076 -localedir | --localedir | --localedi | --localed | --locale)
1077 ac_prev=localedir ;;
1078 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1079 localedir=$ac_optarg ;;
1080
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001082 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 ac_prev=localstatedir ;;
1084 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001085 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
1088 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1089 ac_prev=mandir ;;
1090 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001094 # Obsolete; use --without-fp.
1095 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 no_create=yes ;;
1100
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1102 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1103 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1106 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1107 | --oldin | --oldi | --old | --ol | --o)
1108 ac_prev=oldincludedir ;;
1109 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1110 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1111 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1115 ac_prev=prefix ;;
1116 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1120 | --program-pre | --program-pr | --program-p)
1121 ac_prev=program_prefix ;;
1122 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1123 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
1126 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1127 | --program-suf | --program-su | --program-s)
1128 ac_prev=program_suffix ;;
1129 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1130 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -program-transform-name | --program-transform-name \
1134 | --program-transform-nam | --program-transform-na \
1135 | --program-transform-n | --program-transform- \
1136 | --program-transform | --program-transfor \
1137 | --program-transfo | --program-transf \
1138 | --program-trans | --program-tran \
1139 | --progr-tra | --program-tr | --program-t)
1140 ac_prev=program_transform_name ;;
1141 -program-transform-name=* | --program-transform-name=* \
1142 | --program-transform-nam=* | --program-transform-na=* \
1143 | --program-transform-n=* | --program-transform-=* \
1144 | --program-transform=* | --program-transfor=* \
1145 | --program-transfo=* | --program-transf=* \
1146 | --program-trans=* | --program-tran=* \
1147 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001150 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1151 ac_prev=pdfdir ;;
1152 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1153 pdfdir=$ac_optarg ;;
1154
1155 -psdir | --psdir | --psdi | --psd | --ps)
1156 ac_prev=psdir ;;
1157 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1158 psdir=$ac_optarg ;;
1159
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1161 | -silent | --silent | --silen | --sile | --sil)
1162 silent=yes ;;
1163
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1165 ac_prev=sbindir ;;
1166 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1167 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001169
1170 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1171 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1172 | --sharedst | --shareds | --shared | --share | --shar \
1173 | --sha | --sh)
1174 ac_prev=sharedstatedir ;;
1175 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1176 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1177 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1178 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181 -site | --site | --sit)
1182 ac_prev=site ;;
1183 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1187 ac_prev=srcdir ;;
1188 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001191 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1192 | --syscon | --sysco | --sysc | --sys | --sy)
1193 ac_prev=sysconfdir ;;
1194 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1195 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001197
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
1203 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1204 verbose=yes ;;
1205
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 -version | --version | --versio | --versi | --vers | -V)
1207 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208
1209 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001213 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 ac_useropt_orig=$ac_useropt
1215 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216 case $ac_user_opts in
1217 *"
1218"with_$ac_useropt"
1219"*) ;;
1220 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1221 ac_unrecognized_sep=', ';;
1222 esac
1223 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224
1225 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001229 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001230 ac_useropt_orig=$ac_useropt
1231 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1232 case $ac_user_opts in
1233 *"
1234"with_$ac_useropt"
1235"*) ;;
1236 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1237 ac_unrecognized_sep=', ';;
1238 esac
1239 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241 --x)
1242 # Obsolete; use --with-x.
1243 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
1245 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1246 | --x-incl | --x-inc | --x-in | --x-i)
1247 ac_prev=x_includes ;;
1248 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1249 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251
1252 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1253 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1254 ac_prev=x_libraries ;;
1255 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1256 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1260Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261 ;;
1262
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 *=*)
1264 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1265 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 case $ac_envvar in #(
1267 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 export $ac_envvar ;;
1272
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001273 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001277 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001278 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279 ;;
1280
1281 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282done
1283
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001285 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001286 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287fi
1288
Matthias Kloseb9621712010-04-24 17:59:49 +00001289if test -n "$ac_unrecognized_opts"; then
1290 case $enable_option_checking in
1291 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001292 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001293 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1294 esac
1295fi
1296
1297# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1299 datadir sysconfdir sharedstatedir localstatedir includedir \
1300 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001301 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001304 # Remove trailing slashes.
1305 case $ac_val in
1306 */ )
1307 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1308 eval $ac_var=\$ac_val;;
1309 esac
1310 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001311 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001312 [\\/$]* | ?:[\\/]* ) continue;;
1313 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001314 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001315 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001316done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001317
Martin v. Löwis11437992002-04-12 09:54:03 +00001318# There might be people who depend on the old broken behavior: `$host'
1319# used to hold the argument of --host etc.
1320# FIXME: To remove some day.
1321build=$build_alias
1322host=$host_alias
1323target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324
Martin v. Löwis11437992002-04-12 09:54:03 +00001325# FIXME: To remove some day.
1326if test "x$host_alias" != x; then
1327 if test "x$build_alias" = x; then
1328 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001329 elif test "x$build_alias" != "x$host_alias"; then
1330 cross_compiling=yes
1331 fi
1332fi
1333
1334ac_tool_prefix=
1335test -n "$host_alias" && ac_tool_prefix=$host_alias-
1336
1337test "$silent" = yes && exec 6>/dev/null
1338
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340ac_pwd=`pwd` && test -n "$ac_pwd" &&
1341ac_ls_di=`ls -di .` &&
1342ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001343 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001345 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346
1347
Guido van Rossum627b2d71993-12-24 10:39:16 +00001348# Find the source files, if location was not specified.
1349if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001350 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001351 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001352 ac_confdir=`$as_dirname -- "$as_myself" ||
1353$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1354 X"$as_myself" : 'X\(//\)[^/]' \| \
1355 X"$as_myself" : 'X\(//\)$' \| \
1356 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1357$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001358 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\/\)[^/].*/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\/\)$/{
1367 s//\1/
1368 q
1369 }
1370 /^X\(\/\).*/{
1371 s//\1/
1372 q
1373 }
1374 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001375 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377 srcdir=..
1378 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001379else
1380 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382if test ! -r "$srcdir/$ac_unique_file"; then
1383 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001384 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001386ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1387ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001388 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001389 pwd)`
1390# When building in place, set srcdir=.
1391if test "$ac_abs_confdir" = "$ac_pwd"; then
1392 srcdir=.
1393fi
1394# Remove unnecessary trailing slashes from srcdir.
1395# Double slashes in file names in object file debugging info
1396# mess up M-x gdb in Emacs.
1397case $srcdir in
1398*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1399esac
1400for ac_var in $ac_precious_vars; do
1401 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1402 eval ac_env_${ac_var}_value=\$${ac_var}
1403 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1404 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1405done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001406
Martin v. Löwis11437992002-04-12 09:54:03 +00001407#
1408# Report the --help message.
1409#
1410if test "$ac_init_help" = "long"; then
1411 # Omit some internal or obsolete options to make the list less imposing.
1412 # This message is too long to be a string in the A/UX 3.1 sh.
1413 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001414\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001415
1416Usage: $0 [OPTION]... [VAR=VALUE]...
1417
1418To assign environment variables (e.g., CC, CFLAGS...), specify them as
1419VAR=VALUE. See below for descriptions of some of the useful variables.
1420
1421Defaults for the options are specified in brackets.
1422
1423Configuration:
1424 -h, --help display this help and exit
1425 --help=short display options specific to this package
1426 --help=recursive display the short help of all the included packages
1427 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001428 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 --cache-file=FILE cache test results in FILE [disabled]
1430 -C, --config-cache alias for \`--cache-file=config.cache'
1431 -n, --no-create do not create output files
1432 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1433
Martin v. Löwis11437992002-04-12 09:54:03 +00001434Installation directories:
1435 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001437 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001438 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001439
1440By default, \`make install' will install all the files in
1441\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1442an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1443for instance \`--prefix=\$HOME'.
1444
1445For better control, use the options below.
1446
1447Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001448 --bindir=DIR user executables [EPREFIX/bin]
1449 --sbindir=DIR system admin executables [EPREFIX/sbin]
1450 --libexecdir=DIR program executables [EPREFIX/libexec]
1451 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1452 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1453 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1454 --libdir=DIR object code libraries [EPREFIX/lib]
1455 --includedir=DIR C header files [PREFIX/include]
1456 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1457 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1458 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1459 --infodir=DIR info documentation [DATAROOTDIR/info]
1460 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1461 --mandir=DIR man documentation [DATAROOTDIR/man]
1462 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1463 --htmldir=DIR html documentation [DOCDIR]
1464 --dvidir=DIR dvi documentation [DOCDIR]
1465 --pdfdir=DIR pdf documentation [DOCDIR]
1466 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001467_ACEOF
1468
1469 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001470
1471System types:
1472 --build=BUILD configure for building on BUILD [guessed]
1473 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001474_ACEOF
1475fi
1476
1477if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001479 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001480 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 cat <<\_ACEOF
1482
1483Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001484 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1486 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001487 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001488 create a universal binary build. SDKDIR specifies
1489 which macOS SDK should be used to perform the build,
1490 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001492 create a Python.framework rather than a traditional
1493 Unix install. optional INSTALLDIR specifies the
1494 installation path. see Mac/README.rst (default is
1495 no)
1496 --enable-shared enable building a shared Python library (default is
1497 no)
1498 --enable-profiling enable C-level code profiling with gprof (default is
1499 no)
1500 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1501 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001502 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001503 support loadable extensions in _sqlite module, see
1504 Doc/library/sqlite3.rst (default is no)
1505 --enable-ipv6 enable ipv6 (with ipv4) support, see
1506 Doc/library/socket.rst (default is yes if supported)
1507 --enable-big-digits[=15|30]
1508 use big digits (30 or 15 bits) for Python longs
1509 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001510 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001511
1512Optional Packages:
1513 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1514 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001515 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001516 specify the kind of universal binary that should be
1517 created. this option is only valid when
1518 --enable-universalsdk is set; options are:
Ronald Oussoren41761932020-11-08 10:05:27 +01001519 ("universal2", "32-bit", "64-bit", "3-way", "intel",
1520 "intel-32", "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001521 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001522 specify the name for the python framework on macOS
1523 only valid when --enable-framework is set. see
1524 Mac/README.rst (default is 'Python')
1525 --with-cxx-main[=COMPILER]
1526 compile main() and link Python executable with C++
1527 compiler specified in COMPILER (default is $CXX)
1528 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1529 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001530 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001531 (default is no)
1532 --with-assertions build with C assertions enabled (default is no)
1533 --with-lto enable Link-Time-Optimization in any build (default
1534 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001535 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001536 select hash algorithm for use in Python/pyhash.c
1537 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001538 --with-tzpath=<list of absolute paths separated by pathsep>
1539 Select the default time zone search path for zoneinfo.TZPATH
1540
Charles-François Natalid30b0222014-05-08 23:08:51 +01001541 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001542 enable AddressSanitizer memory error detector,
1543 'asan' (default is no)
1544 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1545 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001546 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001547 enable UndefinedBehaviorSanitizer undefined
1548 behaviour detector, 'ubsan' (default is no)
1549 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001550 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001551 library, see Doc/library/pyexpat.rst (default is no)
1552 --with-system-ffi build _ctypes module using an installed ffi library,
1553 see Doc/library/ctypes.rst (default is
1554 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001555 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001556 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001557 --with-decimal-contextvar
1558 build _decimal module using a coroutine-local rather
1559 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001560 --with-tcltk-includes='-I...'
1561 override search for Tcl and Tk include files
1562 --with-tcltk-libs='-L...'
1563 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001564 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001565 override order to check db backends for dbm; a valid
1566 value is a colon separated string with the backend
1567 names `ndbm', `gdbm' and `bdb'.
1568 --with-doc-strings enable documentation strings (default is yes)
1569 --with-pymalloc enable specialized mallocs (default is yes)
1570 --with-c-locale-coercion
1571 enable C locale coercion to a UTF-8 based locale
1572 (default is yes)
1573 --with-valgrind enable Valgrind support (default is no)
1574 --with-dtrace enable DTrace support (default is no)
1575 --with-libm=STRING override libm math library to STRING (default is
1576 system-dependent)
1577 --with-libc=STRING override libc C library to STRING (default is
1578 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001579 --with-platlibdir=DIRNAME
1580 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001581 --with-wheel-pkg-dir=PATH
1582 Directory of wheel packages used by ensurepip
1583 (default: none)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001584 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001585 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001586 --with-ensurepip[=install|upgrade|no]
1587 "install" or "upgrade" using bundled pip (default is
1588 upgrade)
1589 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001590 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001591 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001592 Python's preferred selection (default), openssl:
1593 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001594 custom string, PROTOCOL_SSLv2 ignores the setting,
1595 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001596 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1597 builtin hash modules, md5, sha1, sha256, sha512,
1598 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001599 --with-experimental-isolated-subinterpreters
1600 better isolate subinterpreters, experimental build
1601 mode (default is no)
Martin v. Löwis11437992002-04-12 09:54:03 +00001602
1603Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001604 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001605 CC C compiler command
1606 CFLAGS C compiler flags
1607 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1608 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001610 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001612 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001613 PROFILE_TASK
1614 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001615 PKG_CONFIG path to pkg-config utility
1616 PKG_CONFIG_PATH
1617 directories to add to pkg-config's search path
1618 PKG_CONFIG_LIBDIR
1619 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001620
1621Use these variables to override the choices made by `configure' or to help
1622it to find libraries and programs with nonstandard names/locations.
1623
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001624Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001625_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001627fi
1628
1629if test "$ac_init_help" = "recursive"; then
1630 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 test -d "$ac_dir" ||
1633 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1634 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 ac_builddir=.
1636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637case "$ac_dir" in
1638.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1639*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001640 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001642 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001643 case $ac_top_builddir_sub in
1644 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1645 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1646 esac ;;
1647esac
1648ac_abs_top_builddir=$ac_pwd
1649ac_abs_builddir=$ac_pwd$ac_dir_suffix
1650# for backward compatibility:
1651ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001652
1653case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656 ac_top_srcdir=$ac_top_builddir_sub
1657 ac_abs_top_srcdir=$ac_pwd ;;
1658 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001659 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001660 ac_top_srcdir=$srcdir
1661 ac_abs_top_srcdir=$srcdir ;;
1662 *) # Relative name.
1663 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1664 ac_top_srcdir=$ac_top_build_prefix$srcdir
1665 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001666esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001667ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001669 cd "$ac_dir" || { ac_status=$?; continue; }
1670 # Check for guested configure.
1671 if test -f "$ac_srcdir/configure.gnu"; then
1672 echo &&
1673 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1674 elif test -f "$ac_srcdir/configure"; then
1675 echo &&
1676 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001677 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001679 fi || ac_status=$?
1680 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001681 done
1682fi
1683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001684test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001685if $ac_init_version; then
1686 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001687python configure 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001688generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001689
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001690Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001691This configure script is free software; the Free Software Foundation
1692gives unlimited permission to copy, distribute and modify it.
1693_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001696
1697## ------------------------ ##
1698## Autoconf initialization. ##
1699## ------------------------ ##
1700
1701# ac_fn_c_try_compile LINENO
1702# --------------------------
1703# Try to compile conftest.$ac_ext, and return whether this succeeded.
1704ac_fn_c_try_compile ()
1705{
1706 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1707 rm -f conftest.$ac_objext
1708 if { { ac_try="$ac_compile"
1709case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_compile") 2>conftest.err
1716 ac_status=$?
1717 if test -s conftest.err; then
1718 grep -v '^ *+' conftest.err >conftest.er1
1719 cat conftest.er1 >&5
1720 mv -f conftest.er1 conftest.err
1721 fi
1722 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1723 test $ac_status = 0; } && {
1724 test -z "$ac_c_werror_flag" ||
1725 test ! -s conftest.err
1726 } && test -s conftest.$ac_objext; then :
1727 ac_retval=0
1728else
1729 $as_echo "$as_me: failed program was:" >&5
1730sed 's/^/| /' conftest.$ac_ext >&5
1731
1732 ac_retval=1
1733fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001734 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001735 as_fn_set_status $ac_retval
1736
1737} # ac_fn_c_try_compile
1738
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001739# ac_fn_c_try_cpp LINENO
1740# ----------------------
1741# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1742ac_fn_c_try_cpp ()
1743{
1744 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1745 if { { ac_try="$ac_cpp conftest.$ac_ext"
1746case "(($ac_try" in
1747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1748 *) ac_try_echo=$ac_try;;
1749esac
1750eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1751$as_echo "$ac_try_echo"; } >&5
1752 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1753 ac_status=$?
1754 if test -s conftest.err; then
1755 grep -v '^ *+' conftest.err >conftest.er1
1756 cat conftest.er1 >&5
1757 mv -f conftest.er1 conftest.err
1758 fi
1759 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1760 test $ac_status = 0; } > conftest.i && {
1761 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1762 test ! -s conftest.err
1763 }; then :
1764 ac_retval=0
1765else
1766 $as_echo "$as_me: failed program was:" >&5
1767sed 's/^/| /' conftest.$ac_ext >&5
1768
1769 ac_retval=1
1770fi
1771 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1772 as_fn_set_status $ac_retval
1773
1774} # ac_fn_c_try_cpp
1775
Matthias Kloseb9621712010-04-24 17:59:49 +00001776# ac_fn_c_try_link LINENO
1777# -----------------------
1778# Try to link conftest.$ac_ext, and return whether this succeeded.
1779ac_fn_c_try_link ()
1780{
1781 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1782 rm -f conftest.$ac_objext conftest$ac_exeext
1783 if { { ac_try="$ac_link"
1784case "(($ac_try" in
1785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786 *) ac_try_echo=$ac_try;;
1787esac
1788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789$as_echo "$ac_try_echo"; } >&5
1790 (eval "$ac_link") 2>conftest.err
1791 ac_status=$?
1792 if test -s conftest.err; then
1793 grep -v '^ *+' conftest.err >conftest.er1
1794 cat conftest.er1 >&5
1795 mv -f conftest.er1 conftest.err
1796 fi
1797 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1798 test $ac_status = 0; } && {
1799 test -z "$ac_c_werror_flag" ||
1800 test ! -s conftest.err
1801 } && test -s conftest$ac_exeext && {
1802 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001803 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001804 }; then :
1805 ac_retval=0
1806else
1807 $as_echo "$as_me: failed program was:" >&5
1808sed 's/^/| /' conftest.$ac_ext >&5
1809
1810 ac_retval=1
1811fi
1812 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1813 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1814 # interfere with the next link command; also delete a directory that is
1815 # left behind by Apple's compiler. We do this before executing the actions.
1816 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001818 as_fn_set_status $ac_retval
1819
1820} # ac_fn_c_try_link
1821
Matthias Kloseb9621712010-04-24 17:59:49 +00001822# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1823# -------------------------------------------------------
1824# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1825# the include files in INCLUDES and setting the cache variable VAR
1826# accordingly.
1827ac_fn_c_check_header_mongrel ()
1828{
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001830 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1832$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001833if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001834 $as_echo_n "(cached) " >&6
1835fi
1836eval ac_res=\$$3
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1838$as_echo "$ac_res" >&6; }
1839else
1840 # Is the header compilable?
1841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1842$as_echo_n "checking $2 usability... " >&6; }
1843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1844/* end confdefs.h. */
1845$4
1846#include <$2>
1847_ACEOF
1848if ac_fn_c_try_compile "$LINENO"; then :
1849 ac_header_compiler=yes
1850else
1851 ac_header_compiler=no
1852fi
1853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1855$as_echo "$ac_header_compiler" >&6; }
1856
1857# Is the header present?
1858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1859$as_echo_n "checking $2 presence... " >&6; }
1860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1861/* end confdefs.h. */
1862#include <$2>
1863_ACEOF
1864if ac_fn_c_try_cpp "$LINENO"; then :
1865 ac_header_preproc=yes
1866else
1867 ac_header_preproc=no
1868fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001869rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1871$as_echo "$ac_header_preproc" >&6; }
1872
1873# So? What about this header?
1874case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1875 yes:no: )
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1877$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1879$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1880 ;;
1881 no:yes:* )
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1883$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1885$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1887$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1889$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1891$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001892( $as_echo "## --------------------------------------- ##
1893## Report this to https://bugs.python.org/ ##
1894## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001895 ) | sed "s/^/$as_me: WARNING: /" >&2
1896 ;;
1897esac
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001900if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001901 $as_echo_n "(cached) " >&6
1902else
1903 eval "$3=\$ac_header_compiler"
1904fi
1905eval ac_res=\$$3
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1907$as_echo "$ac_res" >&6; }
1908fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001909 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001910
1911} # ac_fn_c_check_header_mongrel
1912
1913# ac_fn_c_try_run LINENO
1914# ----------------------
1915# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1916# that executables *can* be run.
1917ac_fn_c_try_run ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 if { { ac_try="$ac_link"
1921case "(($ac_try" in
1922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1923 *) ac_try_echo=$ac_try;;
1924esac
1925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1926$as_echo "$ac_try_echo"; } >&5
1927 (eval "$ac_link") 2>&5
1928 ac_status=$?
1929 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1930 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1931 { { case "(($ac_try" in
1932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1933 *) ac_try_echo=$ac_try;;
1934esac
1935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1936$as_echo "$ac_try_echo"; } >&5
1937 (eval "$ac_try") 2>&5
1938 ac_status=$?
1939 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1940 test $ac_status = 0; }; }; then :
1941 ac_retval=0
1942else
1943 $as_echo "$as_me: program exited with status $ac_status" >&5
1944 $as_echo "$as_me: failed program was:" >&5
1945sed 's/^/| /' conftest.$ac_ext >&5
1946
1947 ac_retval=$ac_status
1948fi
1949 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001950 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001951 as_fn_set_status $ac_retval
1952
1953} # ac_fn_c_try_run
1954
1955# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1956# -------------------------------------------------------
1957# Tests whether HEADER exists and can be compiled using the include files in
1958# INCLUDES, setting the cache variable VAR accordingly.
1959ac_fn_c_check_header_compile ()
1960{
1961 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1963$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001964if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001965 $as_echo_n "(cached) " >&6
1966else
1967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1968/* end confdefs.h. */
1969$4
1970#include <$2>
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973 eval "$3=yes"
1974else
1975 eval "$3=no"
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001982 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001983
1984} # ac_fn_c_check_header_compile
1985
Matthias Kloseb9621712010-04-24 17:59:49 +00001986# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1987# -------------------------------------------
1988# Tests whether TYPE exists after having included INCLUDES, setting cache
1989# variable VAR accordingly.
1990ac_fn_c_check_type ()
1991{
1992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1994$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001995if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001996 $as_echo_n "(cached) " >&6
1997else
1998 eval "$3=no"
1999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2000/* end confdefs.h. */
2001$4
2002int
2003main ()
2004{
2005if (sizeof ($2))
2006 return 0;
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018if (sizeof (($2)))
2019 return 0;
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025
2026else
2027 eval "$3=yes"
2028fi
2029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2030fi
2031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2032fi
2033eval ac_res=\$$3
2034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2035$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002036 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002037
2038} # ac_fn_c_check_type
2039
Matthias Kloseb9621712010-04-24 17:59:49 +00002040# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2041# --------------------------------------------
2042# Tries to find the compile-time value of EXPR in a program that includes
2043# INCLUDES, setting VAR accordingly. Returns whether the value could be
2044# computed
2045ac_fn_c_compute_int ()
2046{
2047 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2048 if test "$cross_compiling" = yes; then
2049 # Depending upon the size, compute the lo and hi bounds.
2050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002057test_array [0] = 0;
2058return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002059
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065 ac_lo=0 ac_mid=0
2066 while :; do
2067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068/* end confdefs.h. */
2069$4
2070int
2071main ()
2072{
2073static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002074test_array [0] = 0;
2075return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002076
2077 ;
2078 return 0;
2079}
2080_ACEOF
2081if ac_fn_c_try_compile "$LINENO"; then :
2082 ac_hi=$ac_mid; break
2083else
2084 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2085 if test $ac_lo -le $ac_mid; then
2086 ac_lo= ac_hi=
2087 break
2088 fi
2089 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092 done
2093else
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002101test_array [0] = 0;
2102return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=-1 ac_mid=-1
2110 while :; do
2111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2112/* end confdefs.h. */
2113$4
2114int
2115main ()
2116{
2117static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002118test_array [0] = 0;
2119return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002120
2121 ;
2122 return 0;
2123}
2124_ACEOF
2125if ac_fn_c_try_compile "$LINENO"; then :
2126 ac_lo=$ac_mid; break
2127else
2128 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2129 if test $ac_mid -le $ac_hi; then
2130 ac_lo= ac_hi=
2131 break
2132 fi
2133 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2134fi
2135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2136 done
2137else
2138 ac_lo= ac_hi=
2139fi
2140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141fi
2142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143# Binary search between lo and hi bounds.
2144while test "x$ac_lo" != "x$ac_hi"; do
2145 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147/* end confdefs.h. */
2148$4
2149int
2150main ()
2151{
2152static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002153test_array [0] = 0;
2154return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002155
2156 ;
2157 return 0;
2158}
2159_ACEOF
2160if ac_fn_c_try_compile "$LINENO"; then :
2161 ac_hi=$ac_mid
2162else
2163 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2164fi
2165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166done
2167case $ac_lo in #((
2168?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2169'') ac_retval=1 ;;
2170esac
2171 else
2172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173/* end confdefs.h. */
2174$4
2175static long int longval () { return $2; }
2176static unsigned long int ulongval () { return $2; }
2177#include <stdio.h>
2178#include <stdlib.h>
2179int
2180main ()
2181{
2182
2183 FILE *f = fopen ("conftest.val", "w");
2184 if (! f)
2185 return 1;
2186 if (($2) < 0)
2187 {
2188 long int i = longval ();
2189 if (i != ($2))
2190 return 1;
2191 fprintf (f, "%ld", i);
2192 }
2193 else
2194 {
2195 unsigned long int i = ulongval ();
2196 if (i != ($2))
2197 return 1;
2198 fprintf (f, "%lu", i);
2199 }
2200 /* Do not output a trailing newline, as this causes \r\n confusion
2201 on some platforms. */
2202 return ferror (f) || fclose (f) != 0;
2203
2204 ;
2205 return 0;
2206}
2207_ACEOF
2208if ac_fn_c_try_run "$LINENO"; then :
2209 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2210else
2211 ac_retval=1
2212fi
2213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2214 conftest.$ac_objext conftest.beam conftest.$ac_ext
2215rm -f conftest.val
2216
2217 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002218 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002219 as_fn_set_status $ac_retval
2220
2221} # ac_fn_c_compute_int
2222
2223# ac_fn_c_check_func LINENO FUNC VAR
2224# ----------------------------------
2225# Tests whether FUNC exists, setting the cache variable VAR accordingly
2226ac_fn_c_check_func ()
2227{
2228 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2230$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002231if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002232 $as_echo_n "(cached) " >&6
2233else
2234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235/* end confdefs.h. */
2236/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2237 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2238#define $2 innocuous_$2
2239
2240/* System header to define __stub macros and hopefully few prototypes,
2241 which can conflict with char $2 (); below.
2242 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2243 <limits.h> exists even on freestanding compilers. */
2244
2245#ifdef __STDC__
2246# include <limits.h>
2247#else
2248# include <assert.h>
2249#endif
2250
2251#undef $2
2252
2253/* Override any GCC internal prototype to avoid an error.
2254 Use char because int might match the return type of a GCC
2255 builtin and then its argument prototype would still apply. */
2256#ifdef __cplusplus
2257extern "C"
2258#endif
2259char $2 ();
2260/* The GNU C library defines this for functions which it implements
2261 to always fail with ENOSYS. Some functions are actually named
2262 something starting with __ and the normal name is an alias. */
2263#if defined __stub_$2 || defined __stub___$2
2264choke me
2265#endif
2266
2267int
2268main ()
2269{
2270return $2 ();
2271 ;
2272 return 0;
2273}
2274_ACEOF
2275if ac_fn_c_try_link "$LINENO"; then :
2276 eval "$3=yes"
2277else
2278 eval "$3=no"
2279fi
2280rm -f core conftest.err conftest.$ac_objext \
2281 conftest$ac_exeext conftest.$ac_ext
2282fi
2283eval ac_res=\$$3
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2285$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002286 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002287
2288} # ac_fn_c_check_func
2289
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002290# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2291# ---------------------------------------------
2292# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2293# accordingly.
2294ac_fn_c_check_decl ()
2295{
2296 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2297 as_decl_name=`echo $2|sed 's/ *(.*//'`
2298 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2300$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2301if eval \${$3+:} false; then :
2302 $as_echo_n "(cached) " >&6
2303else
2304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2305/* end confdefs.h. */
2306$4
2307int
2308main ()
2309{
2310#ifndef $as_decl_name
2311#ifdef __cplusplus
2312 (void) $as_decl_use;
2313#else
2314 (void) $as_decl_name;
2315#endif
2316#endif
2317
2318 ;
2319 return 0;
2320}
2321_ACEOF
2322if ac_fn_c_try_compile "$LINENO"; then :
2323 eval "$3=yes"
2324else
2325 eval "$3=no"
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328fi
2329eval ac_res=\$$3
2330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2331$as_echo "$ac_res" >&6; }
2332 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2333
2334} # ac_fn_c_check_decl
2335
Matthias Kloseb9621712010-04-24 17:59:49 +00002336# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2337# ----------------------------------------------------
2338# Tries to find if the field MEMBER exists in type AGGR, after including
2339# INCLUDES, setting cache variable VAR accordingly.
2340ac_fn_c_check_member ()
2341{
2342 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2344$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002345if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002346 $as_echo_n "(cached) " >&6
2347else
2348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2349/* end confdefs.h. */
2350$5
2351int
2352main ()
2353{
2354static $2 ac_aggr;
2355if (ac_aggr.$3)
2356return 0;
2357 ;
2358 return 0;
2359}
2360_ACEOF
2361if ac_fn_c_try_compile "$LINENO"; then :
2362 eval "$4=yes"
2363else
2364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h. */
2366$5
2367int
2368main ()
2369{
2370static $2 ac_aggr;
2371if (sizeof ac_aggr.$3)
2372return 0;
2373 ;
2374 return 0;
2375}
2376_ACEOF
2377if ac_fn_c_try_compile "$LINENO"; then :
2378 eval "$4=yes"
2379else
2380 eval "$4=no"
2381fi
2382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2383fi
2384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2385fi
2386eval ac_res=\$$4
2387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2388$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002389 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002390
2391} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002393This file contains any messages produced by compilers while
2394running configure, to aid debugging if configure makes a mistake.
2395
Pablo Galindod4fe0982020-05-19 03:33:01 +01002396It was created by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002397generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002398
2399 $ $0 $@
2400
2401_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002402exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002403{
2404cat <<_ASUNAME
2405## --------- ##
2406## Platform. ##
2407## --------- ##
2408
2409hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2410uname -m = `(uname -m) 2>/dev/null || echo unknown`
2411uname -r = `(uname -r) 2>/dev/null || echo unknown`
2412uname -s = `(uname -s) 2>/dev/null || echo unknown`
2413uname -v = `(uname -v) 2>/dev/null || echo unknown`
2414
2415/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2416/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2417
2418/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2419/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2420/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002421/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002422/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2423/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2424/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2425
2426_ASUNAME
2427
2428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2429for as_dir in $PATH
2430do
2431 IFS=$as_save_IFS
2432 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002433 $as_echo "PATH: $as_dir"
2434 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002436
2437} >&5
2438
2439cat >&5 <<_ACEOF
2440
2441
2442## ----------- ##
2443## Core tests. ##
2444## ----------- ##
2445
2446_ACEOF
2447
2448
2449# Keep a trace of the command line.
2450# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002451# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002452# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002453# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002454ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002455ac_configure_args0=
2456ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002457ac_must_keep_next=false
2458for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002459do
Skip Montanaro6dead952003-09-25 14:50:04 +00002460 for ac_arg
2461 do
2462 case $ac_arg in
2463 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2464 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2465 | -silent | --silent | --silen | --sile | --sil)
2466 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002468 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002469 esac
2470 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002472 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002473 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002474 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002475 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002477 case $ac_arg in
2478 *=* | --config-cache | -C | -disable-* | --disable-* \
2479 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2480 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2481 | -with-* | --with-* | -without-* | --without-* | --x)
2482 case "$ac_configure_args0 " in
2483 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2484 esac
2485 ;;
2486 -* ) ac_must_keep_next=true ;;
2487 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 ;;
2491 esac
2492 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002493done
Matthias Kloseb9621712010-04-24 17:59:49 +00002494{ ac_configure_args0=; unset ac_configure_args0;}
2495{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002496
2497# When interrupted or exit'd, cleanup temporary files, and complete
2498# config.log. We remove comments because anyway the quotes in there
2499# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500# WARNING: Use '\'' to represent an apostrophe within the trap.
2501# 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 +00002502trap 'exit_status=$?
2503 # Save into config.log some information that might help in debugging.
2504 {
2505 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002506
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002508## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002509## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 echo
2511 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512(
2513 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2514 eval ac_val=\$$ac_var
2515 case $ac_val in #(
2516 *${as_nl}*)
2517 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002518 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2519$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 esac
2521 case $ac_var in #(
2522 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2524 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac ;;
2526 esac
2527 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2530 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 "s/'\''/'\''\\\\'\'''\''/g;
2533 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2534 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002535 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002537 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 esac |
2539 sort
2540)
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002542
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002543 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002544## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002545## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002546 echo
2547 for ac_var in $ac_subst_vars
2548 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549 eval ac_val=\$$ac_var
2550 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002551 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002553 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 done | sort
2555 echo
2556
2557 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002558 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002560## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002561 echo
2562 for ac_var in $ac_subst_files
2563 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564 eval ac_val=\$$ac_var
2565 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002566 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002568 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002569 done | sort
2570 echo
2571 fi
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002575## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 echo
2580 fi
2581 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 $as_echo "$as_me: caught signal $ac_signal"
2583 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 rm -f core *.core core.conftest.* &&
2586 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002589for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002591done
2592ac_signal=0
2593
2594# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002596
Matthias Kloseb9621712010-04-24 17:59:49 +00002597$as_echo "/* confdefs.h */" > confdefs.h
2598
Martin v. Löwis11437992002-04-12 09:54:03 +00002599# Predefined preprocessor variables.
2600
2601cat >>confdefs.h <<_ACEOF
2602#define PACKAGE_NAME "$PACKAGE_NAME"
2603_ACEOF
2604
Martin v. Löwis11437992002-04-12 09:54:03 +00002605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2607_ACEOF
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609cat >>confdefs.h <<_ACEOF
2610#define PACKAGE_VERSION "$PACKAGE_VERSION"
2611_ACEOF
2612
Martin v. Löwis11437992002-04-12 09:54:03 +00002613cat >>confdefs.h <<_ACEOF
2614#define PACKAGE_STRING "$PACKAGE_STRING"
2615_ACEOF
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617cat >>confdefs.h <<_ACEOF
2618#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2619_ACEOF
2620
Matthias Kloseb9621712010-04-24 17:59:49 +00002621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_URL "$PACKAGE_URL"
2623_ACEOF
2624
Martin v. Löwis11437992002-04-12 09:54:03 +00002625
2626# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002627# Prefer an explicitly selected file to automatically selected ones.
2628ac_site_file1=NONE
2629ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002631 # We do not want a PATH search for config.site.
2632 case $CONFIG_SITE in #((
2633 -*) ac_site_file1=./$CONFIG_SITE;;
2634 */*) ac_site_file1=$CONFIG_SITE;;
2635 *) ac_site_file1=./$CONFIG_SITE;;
2636 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 ac_site_file1=$prefix/share/config.site
2639 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640else
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 ac_site_file1=$ac_default_prefix/share/config.site
2642 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002644for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645do
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 test "x$ac_site_file" = xNONE && continue
2647 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2649$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002651 . "$ac_site_file" \
2652 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2653$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2654as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002655See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002656 fi
2657done
2658
2659if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 # Some versions of bash will fail to source /dev/null (special files
2661 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2662 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2664$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002666 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2667 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 esac
2669 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002670else
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2672$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 >$cache_file
2674fi
2675
2676# Check that the precious variables saved in the cache have kept the same
2677# value.
2678ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2681 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2683 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 case $ac_old_set,$ac_new_set in
2685 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2687$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 +00002688 ac_cache_corrupted=: ;;
2689 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2691$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 ac_cache_corrupted=: ;;
2693 ,);;
2694 *)
2695 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002696 # differences in whitespace do not lead to failure.
2697 ac_old_val_w=`echo x $ac_old_val`
2698 ac_new_val_w=`echo x $ac_new_val`
2699 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2701$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2702 ac_cache_corrupted=:
2703 else
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2705$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2706 eval $ac_var=\$ac_old_val
2707 fi
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2709$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2711$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 fi;;
2713 esac
2714 # Pass precious variables to config.status.
2715 if test "$ac_new_set" = set; then
2716 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002717 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 *) ac_arg=$ac_var=$ac_new_val ;;
2719 esac
2720 case " $ac_configure_args " in
2721 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002722 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 esac
2724 fi
2725done
2726if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2730$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002731 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002733## -------------------- ##
2734## Main body of script. ##
2735## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002736
Guido van Rossum7f43da71994-08-01 12:15:30 +00002737ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002738ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002739ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2740ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2741ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002742
Guido van Rossum627b2d71993-12-24 10:39:16 +00002743
Michael W. Hudson54241132001-12-07 15:38:26 +00002744
Trent Nelson4d4ec652012-10-16 08:51:24 -04002745
Christian Heimesff5be6e2018-01-20 13:19:21 +01002746
2747
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002748if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002749 # If we're building out-of-tree, we need to make sure the following
2750 # resources get picked up before their $srcdir counterparts.
2751 # Objects/ -> typeslots.inc
Lysandros Nikolaou314858e2020-06-20 21:07:25 +03002752 # Include/ -> Python-ast.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04002753 # Python/ -> importlib.h
2754 # (A side effect of this is that these resources will automatically be
2755 # regenerated when building out-of-tree, regardless of whether or not
2756 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2757 # off.)
2758 BASECPPFLAGS="-IObjects -IInclude -IPython"
2759else
2760 BASECPPFLAGS=""
2761fi
2762
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763
2764
2765
2766
Victor Stinner9ed34a82017-05-02 22:35:58 +02002767if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002768then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002769# Extract the first word of "git", so it can be a program name with args.
2770set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2772$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002773if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002774 $as_echo_n "(cached) " >&6
2775else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002776 if test -n "$HAS_GIT"; then
2777 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002778else
2779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2780for as_dir in $PATH
2781do
2782 IFS=$as_save_IFS
2783 test -z "$as_dir" && as_dir=.
2784 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002786 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2788 break 2
2789 fi
2790done
2791 done
2792IFS=$as_save_IFS
2793
Ned Deily5c4b0d02017-03-04 00:19:55 -05002794 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002795fi
2796fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002797HAS_GIT=$ac_cv_prog_HAS_GIT
2798if test -n "$HAS_GIT"; then
2799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2800$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002801else
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2803$as_echo "no" >&6; }
2804fi
2805
2806
2807else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002808HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002809fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002810if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002811then
Xiang Zhang4c855572018-08-20 22:36:19 +08002812 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2813 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2814 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002815else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002816 GITVERSION=""
2817 GITTAG=""
2818 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002819fi
2820
2821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002822ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002823
2824
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002825ac_aux_dir=
2826for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2827 if test -f "$ac_dir/install-sh"; then
2828 ac_aux_dir=$ac_dir
2829 ac_install_sh="$ac_aux_dir/install-sh -c"
2830 break
2831 elif test -f "$ac_dir/install.sh"; then
2832 ac_aux_dir=$ac_dir
2833 ac_install_sh="$ac_aux_dir/install.sh -c"
2834 break
2835 elif test -f "$ac_dir/shtool"; then
2836 ac_aux_dir=$ac_dir
2837 ac_install_sh="$ac_aux_dir/shtool install -c"
2838 break
2839 fi
2840done
2841if test -z "$ac_aux_dir"; then
2842 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2843fi
2844
2845# These three variables are undocumented and unsupported,
2846# and are intended to be withdrawn in a future Autoconf release.
2847# They can cause serious problems if a builder's source tree is in a directory
2848# whose full name contains unusual characters.
2849ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2850ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2851ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2852
2853
2854# Make sure we can run config.sub.
2855$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2856 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2857
2858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2859$as_echo_n "checking build system type... " >&6; }
2860if ${ac_cv_build+:} false; then :
2861 $as_echo_n "(cached) " >&6
2862else
2863 ac_build_alias=$build_alias
2864test "x$ac_build_alias" = x &&
2865 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2866test "x$ac_build_alias" = x &&
2867 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2868ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2869 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2870
2871fi
2872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2873$as_echo "$ac_cv_build" >&6; }
2874case $ac_cv_build in
2875*-*-*) ;;
2876*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2877esac
2878build=$ac_cv_build
2879ac_save_IFS=$IFS; IFS='-'
2880set x $ac_cv_build
2881shift
2882build_cpu=$1
2883build_vendor=$2
2884shift; shift
2885# Remember, the first character of IFS is used to create $*,
2886# except with old shells:
2887build_os=$*
2888IFS=$ac_save_IFS
2889case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2890
2891
2892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2893$as_echo_n "checking host system type... " >&6; }
2894if ${ac_cv_host+:} false; then :
2895 $as_echo_n "(cached) " >&6
2896else
2897 if test "x$host_alias" = x; then
2898 ac_cv_host=$ac_cv_build
2899else
2900 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2901 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2902fi
2903
2904fi
2905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2906$as_echo "$ac_cv_host" >&6; }
2907case $ac_cv_host in
2908*-*-*) ;;
2909*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2910esac
2911host=$ac_cv_host
2912ac_save_IFS=$IFS; IFS='-'
2913set x $ac_cv_host
2914shift
2915host_cpu=$1
2916host_vendor=$2
2917shift; shift
2918# Remember, the first character of IFS is used to create $*,
2919# except with old shells:
2920host_os=$*
2921IFS=$ac_save_IFS
2922case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2923
2924
2925
doko@python.orga10e4a92013-01-25 18:45:12 +01002926
2927
Ned Deilyfcbc2462014-08-22 13:32:49 -07002928# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2929rm -f pybuilddir.txt
2930
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002931for ac_prog in python$PACKAGE_VERSION python3 python
2932do
2933 # Extract the first word of "$ac_prog", so it can be a program name with args.
2934set dummy $ac_prog; ac_word=$2
2935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2936$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002937if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002938 $as_echo_n "(cached) " >&6
2939else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002940 if test -n "$PYTHON_FOR_REGEN"; then
2941 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002942else
2943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2944for as_dir in $PATH
2945do
2946 IFS=$as_save_IFS
2947 test -z "$as_dir" && as_dir=.
2948 for ac_exec_ext in '' $ac_executable_extensions; do
2949 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002950 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2952 break 2
2953 fi
2954done
2955 done
2956IFS=$as_save_IFS
2957
2958fi
2959fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002960PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2961if test -n "$PYTHON_FOR_REGEN"; then
2962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2963$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002964else
2965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2966$as_echo "no" >&6; }
2967fi
2968
2969
Victor Stinnera5c62a82017-05-03 18:21:48 +02002970 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002971done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002972test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002973
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002974
2975
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002976if test "$cross_compiling" = yes; then
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2978$as_echo_n "checking for python interpreter for cross build... " >&6; }
2979 if test -z "$PYTHON_FOR_BUILD"; then
2980 for interp in python$PACKAGE_VERSION python3 python; do
2981 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002982 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 +02002983 break
2984 fi
2985 interp=
2986 done
2987 if test x$interp = x; then
2988 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2989 fi
2990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2991$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002992 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 +02002993 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002994elif test "$cross_compiling" = maybe; then
2995 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002996else
2997 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2998fi
2999
3000
Martin v. Löwis11437992002-04-12 09:54:03 +00003001
Benjamin Petersond23f8222009-04-05 19:13:16 +00003002if test "$prefix" != "/"; then
3003 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3004fi
3005
3006
Martin v. Löwis11437992002-04-12 09:54:03 +00003007
3008
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003009# We don't use PACKAGE_ variables, and they cause conflicts
3010# with other autoconf-based packages that include Python.h
3011grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3012rm confdefs.h
3013mv confdefs.h.new confdefs.h
3014
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003015
Pablo Galindod4fe0982020-05-19 03:33:01 +01003016VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003017
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003018# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003019
3020SOVERSION=1.0
3021
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003022# The later defininition of _XOPEN_SOURCE disables certain features
3023# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3024
Matthias Kloseb9621712010-04-24 17:59:49 +00003025$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003026
3027
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003028# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3029# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3030# them.
3031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003033
3034
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003035# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3036# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3037# them.
3038
Matthias Kloseb9621712010-04-24 17:59:49 +00003039$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003040
3041
Martin v. Löwisd6320502004-08-12 13:45:08 +00003042# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003043# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3044# them.
3045
Matthias Kloseb9621712010-04-24 17:59:49 +00003046$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003047
3048
3049
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003050define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003051
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003052# Arguments passed to configure.
3053
3054CONFIG_ARGS="$ac_configure_args"
3055
Matthias Kloseb9621712010-04-24 17:59:49 +00003056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3057$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003058# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003059if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061 case $enableval in
3062 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003063 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064 # information
3065 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003066 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003067 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3069 if test ! -d "${enableval}"
3070 then
3071 enableval=/
3072 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003073 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003074 ;;
3075 esac
3076 case $enableval in
3077 no)
3078 UNIVERSALSDK=
3079 enable_universalsdk=
3080 ;;
3081 *)
3082 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003083 if test ! -d "${UNIVERSALSDK}"
3084 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003085 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003086 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087 ;;
3088 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003089
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003090
Thomas Wouters477c8d52006-05-27 19:21:47 +00003091else
3092
3093 UNIVERSALSDK=
3094 enable_universalsdk=
3095
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003096fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003097
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003098if test -n "${UNIVERSALSDK}"
3099then
Matthias Kloseb9621712010-04-24 17:59:49 +00003100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3101$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003102else
Matthias Kloseb9621712010-04-24 17:59:49 +00003103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3104$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003105fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003108
Ned Deily87adb6e2013-10-18 21:09:56 -07003109ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003110
Ned Deilycbfb9a52012-06-23 16:02:19 -07003111# For backward compatibility reasons we prefer to select '32-bit' if available,
3112# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003113UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003114if test "`uname -s`" = "Darwin"
3115then
3116 if test -n "${UNIVERSALSDK}"
3117 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003118 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003119 then
3120 UNIVERSAL_ARCHS="intel"
3121 fi
3122 fi
3123fi
3124
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003125
Matthias Kloseb9621712010-04-24 17:59:49 +00003126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3127$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003128
3129# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003130if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003131 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003132 UNIVERSAL_ARCHS="$withval"
3133
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134fi
3135
Ned Deily87adb6e2013-10-18 21:09:56 -07003136if test -n "${UNIVERSALSDK}"
3137then
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3139$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3140else
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3142$as_echo "no" >&6; }
3143fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003145
3146# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003147if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003148 withval=$with_framework_name;
3149 PYTHONFRAMEWORK=${withval}
3150 PYTHONFRAMEWORKDIR=${withval}.framework
3151 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3152
3153else
3154
3155 PYTHONFRAMEWORK=Python
3156 PYTHONFRAMEWORKDIR=Python.framework
3157 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3158
3159fi
3160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003161# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003162if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003164 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003165 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003166 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003167 esac
3168 case $enableval in
3169 no)
3170 PYTHONFRAMEWORK=
3171 PYTHONFRAMEWORKDIR=no-framework
3172 PYTHONFRAMEWORKPREFIX=
3173 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003174 FRAMEWORKINSTALLFIRST=
3175 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003176 FRAMEWORKALTINSTALLFIRST=
3177 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003178 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003179 if test "x${prefix}" = "xNONE"; then
3180 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3181 else
3182 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3183 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003185 ;;
3186 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003187 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003188 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003190 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003191 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3192 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003193 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003195
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003196 if test "x${prefix}" = "xNONE" ; then
3197 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003198
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003199 else
3200 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3201 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003202
3203 case "${enableval}" in
3204 /System*)
3205 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3206 if test "${prefix}" = "NONE" ; then
3207 # See below
3208 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3209 fi
3210 ;;
3211
3212 /Library*)
3213 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3214 ;;
3215
3216 */Library/Frameworks)
3217 MDIR="`dirname "${enableval}"`"
3218 MDIR="`dirname "${MDIR}"`"
3219 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3220
3221 if test "${prefix}" = "NONE"; then
3222 # User hasn't specified the
3223 # --prefix option, but wants to install
3224 # the framework in a non-default location,
3225 # ensure that the compatibility links get
3226 # installed relative to that prefix as well
3227 # instead of in /usr/local.
3228 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3229 fi
3230 ;;
3231
3232 *)
3233 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3234 ;;
3235 esac
3236
Jack Jansen127e56e2001-09-11 14:41:54 +00003237 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003238
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003239 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003244
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003245 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3246
3247 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3248
Jack Jansene578a632001-08-15 01:27:14 +00003249 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003250
Guido van Rossum563e7081996-09-10 18:20:48 +00003251else
Martin v. Löwis11437992002-04-12 09:54:03 +00003252
Jack Jansene578a632001-08-15 01:27:14 +00003253 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003254 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003255 PYTHONFRAMEWORKPREFIX=
3256 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003257 FRAMEWORKINSTALLFIRST=
3258 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003259 FRAMEWORKALTINSTALLFIRST=
3260 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003261 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003262 if test "x${prefix}" = "xNONE" ; then
3263 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3264 else
3265 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3266 fi
Jack Jansene578a632001-08-15 01:27:14 +00003267 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003268
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270fi
3271
Thomas Wouters477c8d52006-05-27 19:21:47 +00003272
3273
Michael W. Hudson54241132001-12-07 15:38:26 +00003274
3275
3276
3277
Jack Jansene578a632001-08-15 01:27:14 +00003278
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003279
3280
3281
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003282
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003283
Ned Deilyb8f944f2013-11-21 22:42:25 -08003284
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003285
3286cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003287#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003288_ACEOF
3289
3290
Jack Jansene578a632001-08-15 01:27:14 +00003291##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003292## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003293## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003294##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003295# Set name for machine-dependent library files
3296
Matthias Kloseb9621712010-04-24 17:59:49 +00003297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3298$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003299if test -z "$MACHDEP"
3300then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003301 # avoid using uname for cross builds
3302 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003303 # ac_sys_system and ac_sys_release are used for setting
3304 # a lot of different things including 'define_xopen_source'
3305 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003306 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003307 *-*-linux-android*)
3308 ac_sys_system=Linux-android
3309 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003310 *-*-linux*)
3311 ac_sys_system=Linux
3312 ;;
3313 *-*-cygwin*)
3314 ac_sys_system=Cygwin
3315 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003316 *-*-vxworks*)
3317 ac_sys_system=VxWorks
3318 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003319 *)
3320 # for now, limit cross builds to known configurations
3321 MACHDEP="unknown"
3322 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3323 esac
3324 ac_sys_release=
3325 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003326 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003327 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003328 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003329 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003330 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003331 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003332 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003333 fi
3334 ac_md_system=`echo $ac_sys_system |
3335 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3336 ac_md_release=`echo $ac_sys_release |
3337 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3338 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003339
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003340 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003341 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003342 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003343 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003344 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003345 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003346 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003347fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3349$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003350
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003351
3352if test "$cross_compiling" = yes; then
3353 case "$host" in
3354 *-*-linux*)
3355 case "$host_cpu" in
3356 arm*)
3357 _host_cpu=arm
3358 ;;
3359 *)
3360 _host_cpu=$host_cpu
3361 esac
3362 ;;
3363 *-*-cygwin*)
3364 _host_cpu=
3365 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003366 *-*-vxworks*)
3367 _host_cpu=$host_cpu
3368 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003369 *)
3370 # for now, limit cross builds to known configurations
3371 MACHDEP="unknown"
3372 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3373 esac
3374 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3375fi
3376
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003377# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3378# disable features if it is defined, without any means to access these
3379# features as extensions. For these systems, we skip the definition of
3380# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3381# some feature, make sure there is no alternative way to access this
3382# feature. Also, when using wildcards, make sure you have verified the
3383# need for not defining _XOPEN_SOURCE on all systems matching the
3384# wildcard, and that the wildcard does not include future systems
3385# (which may remove their limitations).
3386case $ac_sys_system/$ac_sys_release in
3387 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3388 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003389 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003390 # In addition, Stefan Krah confirms that issue #1244610 exists through
3391 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003392 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003393 define_xopen_source=no
3394 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3395 # also defined. This can be overridden by defining _BSD_SOURCE
3396 # As this has a different meaning on Linux, only define it on OpenBSD
3397
Matthias Kloseb9621712010-04-24 17:59:49 +00003398$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003399
3400 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003401 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003402 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3403 # also defined. This can be overridden by defining _BSD_SOURCE
3404 # As this has a different meaning on Linux, only define it on OpenBSD
3405
Matthias Kloseb9621712010-04-24 17:59:49 +00003406$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003407
3408 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003409 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3410 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3411 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003412 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 +00003413 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003414 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3415 # request to enable features supported by the standard as a request
3416 # to disable features not supported by the standard. The best way
3417 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3418 # entirely and define __EXTENSIONS__ instead.
3419 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003420 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003421 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3422 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003423 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003424 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003425 define_xopen_source=no;;
3426 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003427 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003428 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003429 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003430 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3431 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3432 # identifies itself as Darwin/7.*
3433 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3434 # disables platform specific features beyond repair.
3435 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3436 # has no effect, don't bother defining them
3437 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003438 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003439 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003440 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003441 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3442 # defining NI_NUMERICHOST.
3443 QNX/6.3.2)
3444 define_xopen_source=no
3445 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003446 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3447 # in network headers still using system V types.
3448 VxWorks/*)
3449 define_xopen_source=no
3450 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003451
Ian Nortona9edf442020-02-14 03:09:11 +00003452 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3453 # chroot() and other functions
3454 hp*|HP*)
3455 define_xopen_source=no
3456 ;;
3457
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003458esac
3459
3460if test $define_xopen_source = yes
3461then
Victor Stinner14d098d2011-09-07 22:29:43 +02003462 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003463
Victor Stinner14d098d2011-09-07 22:29:43 +02003464$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003465
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003466
3467 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3468 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3469 # several APIs are not declared. Since this is also needed in some
3470 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003471
Matthias Kloseb9621712010-04-24 17:59:49 +00003472$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003473
3474
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003475
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003476$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003477
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003478fi
3479
Christian Heimes647cd872013-12-07 23:39:33 +01003480# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3481case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003482 hp*|HP*)
3483 define_stdc_a1=yes;;
3484 *)
3485 define_stdc_a1=no;;
3486esac
3487
3488if test $define_stdc_a1 = yes
3489then
Christian Heimes647cd872013-12-07 23:39:33 +01003490
3491$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3492
Christian Heimesb02bcae2013-12-08 15:21:08 +01003493fi
Christian Heimes647cd872013-12-07 23:39:33 +01003494
Jack Jansen6b08a402004-06-03 12:41:45 +00003495# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3496# it may influence the way we can build extensions, so distutils
3497# needs to check it
3498
Thomas Wouters477c8d52006-05-27 19:21:47 +00003499
Jack Jansen6b08a402004-06-03 12:41:45 +00003500CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003501EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003502
Guido van Rossum627b2d71993-12-24 10:39:16 +00003503# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003504
3505# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3506# for debug/optimization stuff. BASECFLAGS is for flags that are required
3507# just to get things to compile and link. Users are free to override OPT
3508# when running configure or make. The build should not break if they do.
3509# BASECFLAGS should generally not be messed with, however.
3510
Guido van Rossum8b131c51995-03-09 14:10:13 +00003511# If the user switches compilers, we can't believe the cache
3512if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3513then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003514 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003515(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003516fi
3517
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003518# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3519# when the compiler supports them, but we don't always want -O2, and
3520# we set -g later.
3521if test -z "$CFLAGS"; then
3522 CFLAGS=
3523fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003524
3525if test "$ac_sys_system" = "Darwin"
3526then
3527 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003528 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003529 # information
3530 if test -z "${CC}"
3531 then
3532 found_gcc=
3533 found_clang=
3534 as_save_IFS=$IFS; IFS=:
3535 for as_dir in $PATH
3536 do
3537 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003538 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003539 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003540 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003541 fi
3542 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003543 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003544 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003545 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003546 fi
3547 fi
3548 done
3549 IFS=$as_save_IFS
3550
3551 if test -n "$found_gcc" -a -n "$found_clang"
3552 then
3553 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3554 then
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3556$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3557 CC="$found_clang"
3558 CXX="$found_clang++"
3559 fi
3560
3561
3562 elif test -z "$found_gcc" -a -n "$found_clang"
3563 then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3565$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3566 CC="$found_clang"
3567 CXX="$found_clang++"
3568
3569 elif test -z "$found_gcc" -a -z "$found_clang"
3570 then
3571 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3572 if test -n "${found_clang}"
3573 then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3575$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3576 CC="${found_clang}"
3577 CXX="`/usr/bin/xcrun -find clang++`"
3578
3579 # else: use default behaviour
3580 fi
3581 fi
3582 fi
3583fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003584ac_ext=c
3585ac_cpp='$CPP $CPPFLAGS'
3586ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3587ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3588ac_compiler_gnu=$ac_cv_c_compiler_gnu
3589if test -n "$ac_tool_prefix"; then
3590 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3591set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3593$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003594if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003596else
3597 if test -n "$CC"; then
3598 ac_cv_prog_CC="$CC" # Let the user override the test.
3599else
Martin v. Löwis11437992002-04-12 09:54:03 +00003600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3601for as_dir in $PATH
3602do
3603 IFS=$as_save_IFS
3604 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003606 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003607 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 $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 +00003609 break 2
3610 fi
3611done
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003614
Jack Jansendd19cf82001-12-06 22:36:17 +00003615fi
3616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003617CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003618if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3620$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003621else
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3623$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003624fi
3625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626
Martin v. Löwis11437992002-04-12 09:54:03 +00003627fi
3628if test -z "$ac_cv_prog_CC"; then
3629 ac_ct_CC=$CC
3630 # Extract the first word of "gcc", so it can be a program name with args.
3631set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3633$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003634if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003636else
3637 if test -n "$ac_ct_CC"; then
3638 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3639else
3640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3641for as_dir in $PATH
3642do
3643 IFS=$as_save_IFS
3644 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 $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 +00003649 break 2
3650 fi
3651done
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003654
3655fi
3656fi
3657ac_ct_CC=$ac_cv_prog_ac_ct_CC
3658if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3660$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661else
Matthias Kloseb9621712010-04-24 17:59:49 +00003662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3663$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003664fi
3665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003666 if test "x$ac_ct_CC" = x; then
3667 CC=""
3668 else
3669 case $cross_compiling:$ac_tool_warned in
3670yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3672$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673ac_tool_warned=yes ;;
3674esac
3675 CC=$ac_ct_CC
3676 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003677else
3678 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003679fi
3680
Jack Jansendd19cf82001-12-06 22:36:17 +00003681if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 if test -n "$ac_tool_prefix"; then
3683 # 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 +00003684set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3686$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003687if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003689else
3690 if test -n "$CC"; then
3691 ac_cv_prog_CC="$CC" # Let the user override the test.
3692else
Martin v. Löwis11437992002-04-12 09:54:03 +00003693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3694for as_dir in $PATH
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 $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 +00003702 break 2
3703 fi
3704done
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003707
3708fi
3709fi
3710CC=$ac_cv_prog_CC
3711if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3713$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3716$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003717fi
3718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003721fi
3722if test -z "$CC"; then
3723 # Extract the first word of "cc", so it can be a program name with args.
3724set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3726$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003727if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003729else
3730 if test -n "$CC"; then
3731 ac_cv_prog_CC="$CC" # Let the user override the test.
3732else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003733 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3735for as_dir in $PATH
3736do
3737 IFS=$as_save_IFS
3738 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3742 ac_prog_rejected=yes
3743 continue
3744 fi
3745 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 $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 +00003747 break 2
3748 fi
3749done
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003752
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753if test $ac_prog_rejected = yes; then
3754 # We found a bogon in the path, so make sure we never use it.
3755 set dummy $ac_cv_prog_CC
3756 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758 # We chose a different compiler from the bogus one.
3759 # However, it has the same basename, so the bogon will be chosen
3760 # first if we set CC to just the basename; use the full file name.
3761 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003762 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763 fi
3764fi
3765fi
3766fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003767CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3770$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003771else
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3773$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774fi
3775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776
Martin v. Löwis11437992002-04-12 09:54:03 +00003777fi
3778if test -z "$CC"; then
3779 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 do
3782 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3783set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3785$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003786if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003788else
3789 if test -n "$CC"; then
3790 ac_cv_prog_CC="$CC" # Let the user override the test.
3791else
Martin v. Löwis11437992002-04-12 09:54:03 +00003792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3793for as_dir in $PATH
3794do
3795 IFS=$as_save_IFS
3796 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 $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 +00003801 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003803done
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003806
3807fi
3808fi
3809CC=$ac_cv_prog_CC
3810if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3812$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3815$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003816fi
3817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818
Martin v. Löwis11437992002-04-12 09:54:03 +00003819 test -n "$CC" && break
3820 done
3821fi
3822if test -z "$CC"; then
3823 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003825do
3826 # Extract the first word of "$ac_prog", so it can be a program name with args.
3827set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3829$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003830if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
3833 if test -n "$ac_ct_CC"; then
3834 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3835else
3836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3837for as_dir in $PATH
3838do
3839 IFS=$as_save_IFS
3840 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003842 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003843 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 $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 +00003845 break 2
3846 fi
3847done
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003850
Martin v. Löwis11437992002-04-12 09:54:03 +00003851fi
3852fi
3853ac_ct_CC=$ac_cv_prog_ac_ct_CC
3854if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3856$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003857else
Matthias Kloseb9621712010-04-24 17:59:49 +00003858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3859$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003860fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 test -n "$ac_ct_CC" && break
3864done
Michael W. Hudson54241132001-12-07 15:38:26 +00003865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866 if test "x$ac_ct_CC" = x; then
3867 CC=""
3868 else
3869 case $cross_compiling:$ac_tool_warned in
3870yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003871{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3872$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873ac_tool_warned=yes ;;
3874esac
3875 CC=$ac_ct_CC
3876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003877fi
3878
3879fi
3880
3881
Matthias Kloseb9621712010-04-24 17:59:49 +00003882test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003884as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003885See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003886
3887# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003888$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3889set X $ac_compile
3890ac_compiler=$2
3891for ac_option in --version -v -V -qversion; do
3892 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893case "(($ac_try" in
3894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3895 *) ac_try_echo=$ac_try;;
3896esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3898$as_echo "$ac_try_echo"; } >&5
3899 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003900 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 if test -s conftest.err; then
3902 sed '10a\
3903... rest of stderr output deleted ...
3904 10q' conftest.err >conftest.er1
3905 cat conftest.er1 >&5
3906 fi
3907 rm -f conftest.er1 conftest.err
3908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3909 test $ac_status = 0; }
3910done
Martin v. Löwis11437992002-04-12 09:54:03 +00003911
Matthias Kloseb9621712010-04-24 17:59:49 +00003912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003913/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003914
Martin v. Löwis11437992002-04-12 09:54:03 +00003915int
3916main ()
3917{
3918
3919 ;
3920 return 0;
3921}
3922_ACEOF
3923ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003924ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003925# Try to create an executable without -o first, disregard a.out.
3926# It will help us diagnose broken compilers, and finding out an intuition
3927# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3929$as_echo_n "checking whether the C compiler works... " >&6; }
3930ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3931
3932# The possible output files:
3933ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935ac_rmfiles=
3936for ac_file in $ac_files
3937do
3938 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3941 esac
3942done
3943rm -f $ac_rmfiles
3944
Matthias Kloseb9621712010-04-24 17:59:49 +00003945if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946case "(($ac_try" in
3947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3948 *) ac_try_echo=$ac_try;;
3949esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3951$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003953 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3955 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3957# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3958# in a Makefile. We should not override ac_cv_exeext if it was cached,
3959# so that the user can short-circuit this test for compilers unknown to
3960# Autoconf.
3961for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003962do
3963 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003966 ;;
3967 [ab].out )
3968 # We found the default executable, but exeext='' is most
3969 # certainly right.
3970 break;;
3971 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 then :; else
3974 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3975 fi
3976 # We set ac_cv_exeext here because the later test for it is not
3977 # safe: cross compilers may not add the suffix if given an `-o'
3978 # argument, so we may need to know it at that point already.
3979 # Even if this section looks crufty: it has the advantage of
3980 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981 break;;
3982 * )
3983 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003984 esac
3985done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986test "$ac_cv_exeext" = no && ac_cv_exeext=
3987
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003988else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 ac_file=''
3990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003991if test -z "$ac_file"; then :
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3993$as_echo "no" >&6; }
3994$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003995sed 's/^/| /' conftest.$ac_ext >&5
3996
Matthias Kloseb9621712010-04-24 17:59:49 +00003997{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003999as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004000See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004001else
4002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4003$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4006$as_echo_n "checking for C compiler default output file name... " >&6; }
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4008$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010
Matthias Kloseb9621712010-04-24 17:59:49 +00004011rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4014$as_echo_n "checking for suffix of executables... " >&6; }
4015if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016case "(($ac_try" in
4017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018 *) ac_try_echo=$ac_try;;
4019esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4021$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004023 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4025 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4027# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4028# work properly (i.e., refer to `conftest.exe'), while it won't with
4029# `rm'.
4030for ac_file in conftest.exe conftest conftest.*; do
4031 test -f "$ac_file" || continue
4032 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004033 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4035 break;;
4036 * ) break;;
4037 esac
4038done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039else
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4041$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004042as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004043See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004045rm -f conftest conftest$ac_cv_exeext
4046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4047$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004048
4049rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004050EXEEXT=$ac_cv_exeext
4051ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4053/* end confdefs.h. */
4054#include <stdio.h>
4055int
4056main ()
4057{
4058FILE *f = fopen ("conftest.out", "w");
4059 return ferror (f) || fclose (f) != 0;
4060
4061 ;
4062 return 0;
4063}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004065ac_clean_files="$ac_clean_files conftest.out"
4066# Check that the compiler produces executables we can run. If not, either
4067# the compiler is broken, or we cross compile.
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4069$as_echo_n "checking whether we are cross compiling... " >&6; }
4070if test "$cross_compiling" != yes; then
4071 { { ac_try="$ac_link"
4072case "(($ac_try" in
4073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4074 *) ac_try_echo=$ac_try;;
4075esac
4076eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4077$as_echo "$ac_try_echo"; } >&5
4078 (eval "$ac_link") 2>&5
4079 ac_status=$?
4080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4081 test $ac_status = 0; }
4082 if { ac_try='./conftest$ac_cv_exeext'
4083 { { case "(($ac_try" in
4084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4085 *) ac_try_echo=$ac_try;;
4086esac
4087eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4088$as_echo "$ac_try_echo"; } >&5
4089 (eval "$ac_try") 2>&5
4090 ac_status=$?
4091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4092 test $ac_status = 0; }; }; then
4093 cross_compiling=no
4094 else
4095 if test "$cross_compiling" = maybe; then
4096 cross_compiling=yes
4097 else
4098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004100as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004101If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004102See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 fi
4104 fi
4105fi
4106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4107$as_echo "$cross_compiling" >&6; }
4108
4109rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4110ac_clean_files=$ac_clean_files_save
4111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4112$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004113if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo_n "(cached) " >&6
4115else
4116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004117/* end confdefs.h. */
4118
4119int
4120main ()
4121{
4122
4123 ;
4124 return 0;
4125}
4126_ACEOF
4127rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004128if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129case "(($ac_try" in
4130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4131 *) ac_try_echo=$ac_try;;
4132esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004133eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4134$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004136 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4138 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004139 for ac_file in conftest.o conftest.obj conftest.*; do
4140 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004143 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4144 break;;
4145 esac
4146done
4147else
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004149sed 's/^/| /' conftest.$ac_ext >&5
4150
Matthias Kloseb9621712010-04-24 17:59:49 +00004151{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004153as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004154See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004155fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004156rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4159$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004160OBJEXT=$ac_cv_objext
4161ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4163$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004164if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004169
Martin v. Löwis11437992002-04-12 09:54:03 +00004170int
4171main ()
4172{
4173#ifndef __GNUC__
4174 choke me
4175#endif
4176
4177 ;
4178 return 0;
4179}
4180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004181if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004182 ac_compiler_gnu=yes
4183else
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004187ac_cv_c_compiler_gnu=$ac_compiler_gnu
4188
4189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4191$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4192if test $ac_compiler_gnu = yes; then
4193 GCC=yes
4194else
4195 GCC=
4196fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004197ac_test_CFLAGS=${CFLAGS+set}
4198ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4200$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004201if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004203else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204 ac_save_c_werror_flag=$ac_c_werror_flag
4205 ac_c_werror_flag=yes
4206 ac_cv_prog_cc_g=no
4207 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004210
Martin v. Löwis11437992002-04-12 09:54:03 +00004211int
4212main ()
4213{
4214
4215 ;
4216 return 0;
4217}
4218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004220 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221else
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 CFLAGS=""
4223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224/* end confdefs.h. */
4225
4226int
4227main ()
4228{
4229
4230 ;
4231 return 0;
4232}
4233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004234if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235
Matthias Kloseb9621712010-04-24 17:59:49 +00004236else
4237 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240/* end confdefs.h. */
4241
4242int
4243main ()
4244{
4245
4246 ;
4247 return 0;
4248}
4249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004250if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4258 ac_c_werror_flag=$ac_save_c_werror_flag
4259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4261$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004262if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004263 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004264elif test $ac_cv_prog_cc_g = yes; then
4265 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004266 CFLAGS="-g -O2"
4267 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004268 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269 fi
4270else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004271 if test "$GCC" = yes; then
4272 CFLAGS="-O2"
4273 else
4274 CFLAGS=
4275 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4278$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004279if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004281else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004282 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004283ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004285/* end confdefs.h. */
4286#include <stdarg.h>
4287#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004288struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004289/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4290struct buf { int x; };
4291FILE * (*rcsopen) (struct buf *, struct stat *, int);
4292static char *e (p, i)
4293 char **p;
4294 int i;
4295{
4296 return p[i];
4297}
4298static char *f (char * (*g) (char **, int), char **p, ...)
4299{
4300 char *s;
4301 va_list v;
4302 va_start (v,p);
4303 s = g (p, va_arg (v,int));
4304 va_end (v);
4305 return s;
4306}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004307
4308/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4309 function prototypes and stuff, but not '\xHH' hex character constants.
4310 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004312 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4313 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004315int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4318 inside strings and character constants. */
4319#define FOO(x) 'x'
4320int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4321
Skip Montanaro6dead952003-09-25 14:50:04 +00004322int test (int i, double x);
4323struct s1 {int (*f) (int a);};
4324struct s2 {int (*f) (double a);};
4325int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4326int argc;
4327char **argv;
4328int
4329main ()
4330{
4331return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4332 ;
4333 return 0;
4334}
4335_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4337 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004338do
4339 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343rm -f core conftest.err conftest.$ac_objext
4344 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004345done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004347CC=$ac_save_CC
4348
4349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350# AC_CACHE_VAL
4351case "x$ac_cv_prog_cc_c89" in
4352 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4354$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4357$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004358 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4361$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004362esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004363if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004364
Matthias Kloseb9621712010-04-24 17:59:49 +00004365fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004366
Martin v. Löwis11437992002-04-12 09:54:03 +00004367ac_ext=c
4368ac_cpp='$CPP $CPPFLAGS'
4369ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4370ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4371ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004372
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004373ac_ext=c
4374ac_cpp='$CPP $CPPFLAGS'
4375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4377ac_compiler_gnu=$ac_cv_c_compiler_gnu
4378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4379$as_echo_n "checking how to run the C preprocessor... " >&6; }
4380# On Suns, sometimes $CPP names a directory.
4381if test -n "$CPP" && test -d "$CPP"; then
4382 CPP=
4383fi
4384if test -z "$CPP"; then
4385 if ${ac_cv_prog_CPP+:} false; then :
4386 $as_echo_n "(cached) " >&6
4387else
4388 # Double quotes because CPP needs to be expanded
4389 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4390 do
4391 ac_preproc_ok=false
4392for ac_c_preproc_warn_flag in '' yes
4393do
4394 # Use a header file that comes with gcc, so configuring glibc
4395 # with a fresh cross-compiler works.
4396 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4397 # <limits.h> exists even on freestanding compilers.
4398 # On the NeXT, cc -E runs the code through the compiler's parser,
4399 # not just through cpp. "Syntax error" is here to catch this case.
4400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4401/* end confdefs.h. */
4402#ifdef __STDC__
4403# include <limits.h>
4404#else
4405# include <assert.h>
4406#endif
4407 Syntax error
4408_ACEOF
4409if ac_fn_c_try_cpp "$LINENO"; then :
4410
4411else
4412 # Broken: fails on valid input.
4413continue
4414fi
4415rm -f conftest.err conftest.i conftest.$ac_ext
4416
4417 # OK, works on sane cases. Now check whether nonexistent headers
4418 # can be detected and how.
4419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4420/* end confdefs.h. */
4421#include <ac_nonexistent.h>
4422_ACEOF
4423if ac_fn_c_try_cpp "$LINENO"; then :
4424 # Broken: success on invalid input.
4425continue
4426else
4427 # Passes both tests.
4428ac_preproc_ok=:
4429break
4430fi
4431rm -f conftest.err conftest.i conftest.$ac_ext
4432
4433done
4434# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4435rm -f conftest.i conftest.err conftest.$ac_ext
4436if $ac_preproc_ok; then :
4437 break
4438fi
4439
4440 done
4441 ac_cv_prog_CPP=$CPP
4442
4443fi
4444 CPP=$ac_cv_prog_CPP
4445else
4446 ac_cv_prog_CPP=$CPP
4447fi
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4449$as_echo "$CPP" >&6; }
4450ac_preproc_ok=false
4451for ac_c_preproc_warn_flag in '' yes
4452do
4453 # Use a header file that comes with gcc, so configuring glibc
4454 # with a fresh cross-compiler works.
4455 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4456 # <limits.h> exists even on freestanding compilers.
4457 # On the NeXT, cc -E runs the code through the compiler's parser,
4458 # not just through cpp. "Syntax error" is here to catch this case.
4459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4460/* end confdefs.h. */
4461#ifdef __STDC__
4462# include <limits.h>
4463#else
4464# include <assert.h>
4465#endif
4466 Syntax error
4467_ACEOF
4468if ac_fn_c_try_cpp "$LINENO"; then :
4469
4470else
4471 # Broken: fails on valid input.
4472continue
4473fi
4474rm -f conftest.err conftest.i conftest.$ac_ext
4475
4476 # OK, works on sane cases. Now check whether nonexistent headers
4477 # can be detected and how.
4478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4479/* end confdefs.h. */
4480#include <ac_nonexistent.h>
4481_ACEOF
4482if ac_fn_c_try_cpp "$LINENO"; then :
4483 # Broken: success on invalid input.
4484continue
4485else
4486 # Passes both tests.
4487ac_preproc_ok=:
4488break
4489fi
4490rm -f conftest.err conftest.i conftest.$ac_ext
4491
4492done
4493# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4494rm -f conftest.i conftest.err conftest.$ac_ext
4495if $ac_preproc_ok; then :
4496
4497else
4498 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4499$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4500as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4501See \`config.log' for more details" "$LINENO" 5; }
4502fi
4503
4504ac_ext=c
4505ac_cpp='$CPP $CPPFLAGS'
4506ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4507ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4508ac_compiler_gnu=$ac_cv_c_compiler_gnu
4509
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4511$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4512if ${ac_cv_path_GREP+:} false; then :
4513 $as_echo_n "(cached) " >&6
4514else
4515 if test -z "$GREP"; then
4516 ac_path_GREP_found=false
4517 # Loop through the user's path and test for each of PROGNAME-LIST
4518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4520do
4521 IFS=$as_save_IFS
4522 test -z "$as_dir" && as_dir=.
4523 for ac_prog in grep ggrep; do
4524 for ac_exec_ext in '' $ac_executable_extensions; do
4525 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4526 as_fn_executable_p "$ac_path_GREP" || continue
4527# Check for GNU ac_path_GREP and select it if it is found.
4528 # Check for GNU $ac_path_GREP
4529case `"$ac_path_GREP" --version 2>&1` in
4530*GNU*)
4531 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4532*)
4533 ac_count=0
4534 $as_echo_n 0123456789 >"conftest.in"
4535 while :
4536 do
4537 cat "conftest.in" "conftest.in" >"conftest.tmp"
4538 mv "conftest.tmp" "conftest.in"
4539 cp "conftest.in" "conftest.nl"
4540 $as_echo 'GREP' >> "conftest.nl"
4541 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4542 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4543 as_fn_arith $ac_count + 1 && ac_count=$as_val
4544 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4545 # Best one so far, save it but keep looking for a better one
4546 ac_cv_path_GREP="$ac_path_GREP"
4547 ac_path_GREP_max=$ac_count
4548 fi
4549 # 10*(2^10) chars as input seems more than enough
4550 test $ac_count -gt 10 && break
4551 done
4552 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4553esac
4554
4555 $ac_path_GREP_found && break 3
4556 done
4557 done
4558 done
4559IFS=$as_save_IFS
4560 if test -z "$ac_cv_path_GREP"; then
4561 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4562 fi
4563else
4564 ac_cv_path_GREP=$GREP
4565fi
4566
4567fi
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4569$as_echo "$ac_cv_path_GREP" >&6; }
4570 GREP="$ac_cv_path_GREP"
4571
4572
Łukasz Langaa785c872016-09-09 17:37:37 -07004573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4574$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4575if ${ac_cv_path_SED+:} false; then :
4576 $as_echo_n "(cached) " >&6
4577else
4578 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4579 for ac_i in 1 2 3 4 5 6 7; do
4580 ac_script="$ac_script$as_nl$ac_script"
4581 done
4582 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4583 { ac_script=; unset ac_script;}
4584 if test -z "$SED"; then
4585 ac_path_SED_found=false
4586 # Loop through the user's path and test for each of PROGNAME-LIST
4587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4588for as_dir in $PATH
4589do
4590 IFS=$as_save_IFS
4591 test -z "$as_dir" && as_dir=.
4592 for ac_prog in sed gsed; do
4593 for ac_exec_ext in '' $ac_executable_extensions; do
4594 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4595 as_fn_executable_p "$ac_path_SED" || continue
4596# Check for GNU ac_path_SED and select it if it is found.
4597 # Check for GNU $ac_path_SED
4598case `"$ac_path_SED" --version 2>&1` in
4599*GNU*)
4600 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4601*)
4602 ac_count=0
4603 $as_echo_n 0123456789 >"conftest.in"
4604 while :
4605 do
4606 cat "conftest.in" "conftest.in" >"conftest.tmp"
4607 mv "conftest.tmp" "conftest.in"
4608 cp "conftest.in" "conftest.nl"
4609 $as_echo '' >> "conftest.nl"
4610 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4611 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4612 as_fn_arith $ac_count + 1 && ac_count=$as_val
4613 if test $ac_count -gt ${ac_path_SED_max-0}; then
4614 # Best one so far, save it but keep looking for a better one
4615 ac_cv_path_SED="$ac_path_SED"
4616 ac_path_SED_max=$ac_count
4617 fi
4618 # 10*(2^10) chars as input seems more than enough
4619 test $ac_count -gt 10 && break
4620 done
4621 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4622esac
4623
4624 $ac_path_SED_found && break 3
4625 done
4626 done
4627 done
4628IFS=$as_save_IFS
4629 if test -z "$ac_cv_path_SED"; then
4630 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4631 fi
4632else
4633 ac_cv_path_SED=$SED
4634fi
4635
4636fi
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4638$as_echo "$ac_cv_path_SED" >&6; }
4639 SED="$ac_cv_path_SED"
4640 rm -f conftest.sed
4641
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004642
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004643
4644
Matthias Kloseb9621712010-04-24 17:59:49 +00004645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4646$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004648# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004649if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004650 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004651
4652 case $withval in
4653 no) with_cxx_main=no
4654 MAINCC='$(CC)';;
4655 yes) with_cxx_main=yes
4656 MAINCC='$(CXX)';;
4657 *) with_cxx_main=yes
4658 MAINCC=$withval
4659 if test -z "$CXX"
4660 then
4661 CXX=$withval
4662 fi;;
4663 esac
4664else
4665
4666 with_cxx_main=no
4667 MAINCC='$(CC)'
4668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004669fi
4670
Matthias Kloseb9621712010-04-24 17:59:49 +00004671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4672$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004673
4674preset_cxx="$CXX"
4675if test -z "$CXX"
4676then
4677 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004678 gcc) if test -n "$ac_tool_prefix"; then
4679 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4680set dummy ${ac_tool_prefix}g++; ac_word=$2
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4682$as_echo_n "checking for $ac_word... " >&6; }
4683if ${ac_cv_path_CXX+:} false; then :
4684 $as_echo_n "(cached) " >&6
4685else
4686 case $CXX in
4687 [\\/]* | ?:[\\/]*)
4688 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4689 ;;
4690 *)
4691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in notfound
4693do
4694 IFS=$as_save_IFS
4695 test -z "$as_dir" && as_dir=.
4696 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004698 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4700 break 2
4701 fi
4702done
4703 done
4704IFS=$as_save_IFS
4705
4706 ;;
4707esac
4708fi
4709CXX=$ac_cv_path_CXX
4710if test -n "$CXX"; then
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4712$as_echo "$CXX" >&6; }
4713else
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715$as_echo "no" >&6; }
4716fi
4717
4718
4719fi
4720if test -z "$ac_cv_path_CXX"; then
4721 ac_pt_CXX=$CXX
4722 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004723set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4725$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004726if ${ac_cv_path_ac_pt_CXX+:} false; then :
4727 $as_echo_n "(cached) " >&6
4728else
4729 case $ac_pt_CXX in
4730 [\\/]* | ?:[\\/]*)
4731 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4732 ;;
4733 *)
4734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4735for as_dir in notfound
4736do
4737 IFS=$as_save_IFS
4738 test -z "$as_dir" && as_dir=.
4739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004741 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4743 break 2
4744 fi
4745done
4746 done
4747IFS=$as_save_IFS
4748
4749 ;;
4750esac
4751fi
4752ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4753if test -n "$ac_pt_CXX"; then
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4755$as_echo "$ac_pt_CXX" >&6; }
4756else
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4758$as_echo "no" >&6; }
4759fi
4760
4761 if test "x$ac_pt_CXX" = x; then
4762 CXX="g++"
4763 else
4764 case $cross_compiling:$ac_tool_warned in
4765yes:)
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4767$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4768ac_tool_warned=yes ;;
4769esac
4770 CXX=$ac_pt_CXX
4771 fi
4772else
4773 CXX="$ac_cv_path_CXX"
4774fi
4775 ;;
4776 cc) if test -n "$ac_tool_prefix"; then
4777 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4778set dummy ${ac_tool_prefix}c++; ac_word=$2
4779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4780$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004781if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783else
4784 case $CXX in
4785 [\\/]* | ?:[\\/]*)
4786 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4787 ;;
4788 *)
4789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4790for as_dir in notfound
4791do
4792 IFS=$as_save_IFS
4793 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004795 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798 break 2
4799 fi
4800done
Matthias Kloseb9621712010-04-24 17:59:49 +00004801 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004802IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804 ;;
4805esac
4806fi
4807CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004808if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4810$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004811else
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4813$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004815
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816
4817fi
4818if test -z "$ac_cv_path_CXX"; then
4819 ac_pt_CXX=$CXX
4820 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004821set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4823$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004825 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004827 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 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 +00004830 ;;
4831 *)
4832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4833for as_dir in notfound
4834do
4835 IFS=$as_save_IFS
4836 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004839 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004841 break 2
4842 fi
4843done
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004845IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847 ;;
4848esac
4849fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004850ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4851if test -n "$ac_pt_CXX"; then
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4853$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004854else
Matthias Kloseb9621712010-04-24 17:59:49 +00004855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004858
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859 if test "x$ac_pt_CXX" = x; then
4860 CXX="c++"
4861 else
4862 case $cross_compiling:$ac_tool_warned in
4863yes:)
4864{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4865$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4866ac_tool_warned=yes ;;
4867esac
4868 CXX=$ac_pt_CXX
4869 fi
4870else
4871 CXX="$ac_cv_path_CXX"
4872fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004873 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004874 clang|*/clang) if test -n "$ac_tool_prefix"; then
4875 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4876set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4878$as_echo_n "checking for $ac_word... " >&6; }
4879if ${ac_cv_path_CXX+:} false; then :
4880 $as_echo_n "(cached) " >&6
4881else
4882 case $CXX in
4883 [\\/]* | ?:[\\/]*)
4884 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4885 ;;
4886 *)
4887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4888for as_dir in notfound
4889do
4890 IFS=$as_save_IFS
4891 test -z "$as_dir" && as_dir=.
4892 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004894 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4896 break 2
4897 fi
4898done
4899 done
4900IFS=$as_save_IFS
4901
Ned Deilycbfb9a52012-06-23 16:02:19 -07004902 ;;
4903esac
4904fi
4905CXX=$ac_cv_path_CXX
4906if test -n "$CXX"; then
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4908$as_echo "$CXX" >&6; }
4909else
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4911$as_echo "no" >&6; }
4912fi
4913
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004914
4915fi
4916if test -z "$ac_cv_path_CXX"; then
4917 ac_pt_CXX=$CXX
4918 # Extract the first word of "clang++", so it can be a program name with args.
4919set dummy clang++; ac_word=$2
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4921$as_echo_n "checking for $ac_word... " >&6; }
4922if ${ac_cv_path_ac_pt_CXX+:} false; then :
4923 $as_echo_n "(cached) " >&6
4924else
4925 case $ac_pt_CXX in
4926 [\\/]* | ?:[\\/]*)
4927 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4928 ;;
4929 *)
4930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931for as_dir in notfound
4932do
4933 IFS=$as_save_IFS
4934 test -z "$as_dir" && as_dir=.
4935 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004937 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4939 break 2
4940 fi
4941done
4942 done
4943IFS=$as_save_IFS
4944
4945 ;;
4946esac
4947fi
4948ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4949if test -n "$ac_pt_CXX"; then
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4951$as_echo "$ac_pt_CXX" >&6; }
4952else
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954$as_echo "no" >&6; }
4955fi
4956
4957 if test "x$ac_pt_CXX" = x; then
4958 CXX="clang++"
4959 else
4960 case $cross_compiling:$ac_tool_warned in
4961yes:)
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4964ac_tool_warned=yes ;;
4965esac
4966 CXX=$ac_pt_CXX
4967 fi
4968else
4969 CXX="$ac_cv_path_CXX"
4970fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004971 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004972 icc|*/icc) if test -n "$ac_tool_prefix"; then
4973 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4974set dummy ${ac_tool_prefix}icpc; ac_word=$2
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4976$as_echo_n "checking for $ac_word... " >&6; }
4977if ${ac_cv_path_CXX+:} false; then :
4978 $as_echo_n "(cached) " >&6
4979else
4980 case $CXX in
4981 [\\/]* | ?:[\\/]*)
4982 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4983 ;;
4984 *)
4985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4986for as_dir in notfound
4987do
4988 IFS=$as_save_IFS
4989 test -z "$as_dir" && as_dir=.
4990 for ac_exec_ext in '' $ac_executable_extensions; do
4991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4992 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4994 break 2
4995 fi
4996done
4997 done
4998IFS=$as_save_IFS
4999
5000 ;;
5001esac
5002fi
5003CXX=$ac_cv_path_CXX
5004if test -n "$CXX"; then
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5006$as_echo "$CXX" >&6; }
5007else
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5009$as_echo "no" >&6; }
5010fi
5011
5012
5013fi
5014if test -z "$ac_cv_path_CXX"; then
5015 ac_pt_CXX=$CXX
5016 # Extract the first word of "icpc", so it can be a program name with args.
5017set dummy icpc; ac_word=$2
5018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5019$as_echo_n "checking for $ac_word... " >&6; }
5020if ${ac_cv_path_ac_pt_CXX+:} false; then :
5021 $as_echo_n "(cached) " >&6
5022else
5023 case $ac_pt_CXX in
5024 [\\/]* | ?:[\\/]*)
5025 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5026 ;;
5027 *)
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in notfound
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
5033 for ac_exec_ext in '' $ac_executable_extensions; do
5034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5035 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5037 break 2
5038 fi
5039done
5040 done
5041IFS=$as_save_IFS
5042
5043 ;;
5044esac
5045fi
5046ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5047if test -n "$ac_pt_CXX"; then
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5049$as_echo "$ac_pt_CXX" >&6; }
5050else
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052$as_echo "no" >&6; }
5053fi
5054
5055 if test "x$ac_pt_CXX" = x; then
5056 CXX="icpc"
5057 else
5058 case $cross_compiling:$ac_tool_warned in
5059yes:)
5060{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5061$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5062ac_tool_warned=yes ;;
5063esac
5064 CXX=$ac_pt_CXX
5065 fi
5066else
5067 CXX="$ac_cv_path_CXX"
5068fi
5069 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005070 esac
5071 if test "$CXX" = "notfound"
5072 then
5073 CXX=""
5074 fi
5075fi
5076if test -z "$CXX"
5077then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005078 if test -n "$ac_tool_prefix"; then
5079 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5080 do
5081 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5082set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5084$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005085if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005087else
5088 if test -n "$CXX"; then
5089 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5090else
5091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5092for as_dir in $PATH
5093do
5094 IFS=$as_save_IFS
5095 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005098 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005100 break 2
5101 fi
5102done
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005105
5106fi
5107fi
5108CXX=$ac_cv_prog_CXX
5109if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5111$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005112else
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5114$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005115fi
5116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005117
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005118 test -n "$CXX" && break
5119 done
5120fi
5121if test -z "$CXX"; then
5122 ac_ct_CXX=$CXX
5123 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5124do
5125 # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5130 $as_echo_n "(cached) " >&6
5131else
5132 if test -n "$ac_ct_CXX"; then
5133 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5134else
5135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136for as_dir in $PATH
5137do
5138 IFS=$as_save_IFS
5139 test -z "$as_dir" && as_dir=.
5140 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005141 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005142 ac_cv_prog_ac_ct_CXX="$ac_prog"
5143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144 break 2
5145 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005146done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005147 done
5148IFS=$as_save_IFS
5149
5150fi
5151fi
5152ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5153if test -n "$ac_ct_CXX"; then
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5155$as_echo "$ac_ct_CXX" >&6; }
5156else
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
5159fi
5160
5161
5162 test -n "$ac_ct_CXX" && break
5163done
5164
5165 if test "x$ac_ct_CXX" = x; then
5166 CXX="notfound"
5167 else
5168 case $cross_compiling:$ac_tool_warned in
5169yes:)
5170{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5171$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5172ac_tool_warned=yes ;;
5173esac
5174 CXX=$ac_ct_CXX
5175 fi
5176fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005177
5178 if test "$CXX" = "notfound"
5179 then
5180 CXX=""
5181 fi
5182fi
5183if test "$preset_cxx" != "$CXX"
5184then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005185 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005186
5187 By default, distutils will build C++ extension modules with \"$CXX\".
5188 If this is not intended, then set CXX on the configure command line.
5189 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005190$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005191
5192 By default, distutils will build C++ extension modules with \"$CXX\".
5193 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005194 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005195fi
5196
5197
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005198MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5199
5200
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5202$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5203cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005204#undef bfin
5205#undef cris
5206#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005207#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005208#undef hppa
5209#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005210#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005211#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005212#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005213#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005215#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005216 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005217#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005218# if defined(__x86_64__) && defined(__LP64__)
5219 x86_64-linux-gnu
5220# elif defined(__x86_64__) && defined(__ILP32__)
5221 x86_64-linux-gnux32
5222# elif defined(__i386__)
5223 i386-linux-gnu
5224# elif defined(__aarch64__) && defined(__AARCH64EL__)
5225# if defined(__ILP32__)
5226 aarch64_ilp32-linux-gnu
5227# else
5228 aarch64-linux-gnu
5229# endif
5230# elif defined(__aarch64__) && defined(__AARCH64EB__)
5231# if defined(__ILP32__)
5232 aarch64_be_ilp32-linux-gnu
5233# else
5234 aarch64_be-linux-gnu
5235# endif
5236# elif defined(__alpha__)
5237 alpha-linux-gnu
5238# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5239# if defined(__ARMEL__)
5240 arm-linux-gnueabihf
5241# else
5242 armeb-linux-gnueabihf
5243# endif
5244# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5245# if defined(__ARMEL__)
5246 arm-linux-gnueabi
5247# else
5248 armeb-linux-gnueabi
5249# endif
5250# elif defined(__hppa__)
5251 hppa-linux-gnu
5252# elif defined(__ia64__)
5253 ia64-linux-gnu
5254# elif defined(__m68k__) && !defined(__mcoldfire__)
5255 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005256# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5257# if _MIPS_SIM == _ABIO32
5258 mipsisa32r6el-linux-gnu
5259# elif _MIPS_SIM == _ABIN32
5260 mipsisa64r6el-linux-gnuabin32
5261# elif _MIPS_SIM == _ABI64
5262 mipsisa64r6el-linux-gnuabi64
5263# else
5264# error unknown platform triplet
5265# endif
5266# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5267# if _MIPS_SIM == _ABIO32
5268 mipsisa32r6-linux-gnu
5269# elif _MIPS_SIM == _ABIN32
5270 mipsisa64r6-linux-gnuabin32
5271# elif _MIPS_SIM == _ABI64
5272 mipsisa64r6-linux-gnuabi64
5273# else
5274# error unknown platform triplet
5275# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005276# elif defined(__mips_hard_float) && defined(_MIPSEL)
5277# if _MIPS_SIM == _ABIO32
5278 mipsel-linux-gnu
5279# elif _MIPS_SIM == _ABIN32
5280 mips64el-linux-gnuabin32
5281# elif _MIPS_SIM == _ABI64
5282 mips64el-linux-gnuabi64
5283# else
5284# error unknown platform triplet
5285# endif
5286# elif defined(__mips_hard_float)
5287# if _MIPS_SIM == _ABIO32
5288 mips-linux-gnu
5289# elif _MIPS_SIM == _ABIN32
5290 mips64-linux-gnuabin32
5291# elif _MIPS_SIM == _ABI64
5292 mips64-linux-gnuabi64
5293# else
5294# error unknown platform triplet
5295# endif
5296# elif defined(__or1k__)
5297 or1k-linux-gnu
5298# elif defined(__powerpc__) && defined(__SPE__)
5299 powerpc-linux-gnuspe
5300# elif defined(__powerpc64__)
5301# if defined(__LITTLE_ENDIAN__)
5302 powerpc64le-linux-gnu
5303# else
5304 powerpc64-linux-gnu
5305# endif
5306# elif defined(__powerpc__)
5307 powerpc-linux-gnu
5308# elif defined(__s390x__)
5309 s390x-linux-gnu
5310# elif defined(__s390__)
5311 s390-linux-gnu
5312# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5313 sh4-linux-gnu
5314# elif defined(__sparc__) && defined(__arch64__)
5315 sparc64-linux-gnu
5316# elif defined(__sparc__)
5317 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005318# elif defined(__riscv)
5319# if __riscv_xlen == 32
5320 riscv32-linux-gnu
5321# elif __riscv_xlen == 64
5322 riscv64-linux-gnu
5323# else
5324# error unknown platform triplet
5325# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005326# else
5327# error unknown platform triplet
5328# endif
5329#elif defined(__FreeBSD_kernel__)
5330# if defined(__LP64__)
5331 x86_64-kfreebsd-gnu
5332# elif defined(__i386__)
5333 i386-kfreebsd-gnu
5334# else
5335# error unknown platform triplet
5336# endif
5337#elif defined(__gnu_hurd__)
5338 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005339#elif defined(__APPLE__)
5340 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005341#elif defined(__VXWORKS__)
5342 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005343#else
5344# error unknown platform triplet
5345#endif
5346
5347EOF
5348
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005349if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005350 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5352$as_echo "$PLATFORM_TRIPLET" >&6; }
5353else
5354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5355$as_echo "none" >&6; }
5356fi
5357rm -f conftest.c conftest.out
5358
5359if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5360 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5361 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5362 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005363elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5364 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005365fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005366
doko@ubuntu.com55532312016-06-14 08:55:19 +02005367if test x$MULTIARCH != x; then
5368 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5369fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005370
5371
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5373$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5374save_LDFLAGS="$LDFLAGS"
5375LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005376
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5378/* end confdefs.h. */
5379
5380int
5381main ()
5382{
5383
5384 ;
5385 return 0;
5386}
5387_ACEOF
5388if ac_fn_c_try_link "$LINENO"; then :
5389 NO_AS_NEEDED="-Wl,--no-as-needed"
5390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5391$as_echo "yes" >&6; }
5392else
5393 NO_AS_NEEDED=""
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5395$as_echo "no" >&6; }
5396fi
5397rm -f core conftest.err conftest.$ac_objext \
5398 conftest$ac_exeext conftest.$ac_ext
5399LDFLAGS="$save_LDFLAGS"
5400
5401
5402
5403# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404
Matthias Kloseb9621712010-04-24 17:59:49 +00005405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5406$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005407if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409else
5410 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5411 then ac_cv_path_EGREP="$GREP -E"
5412 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 # Loop through the user's path and test for each of PROGNAME-LIST
5416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5418do
5419 IFS=$as_save_IFS
5420 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 for ac_prog in egrep; do
5422 for ac_exec_ext in '' $ac_executable_extensions; do
5423 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005424 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005425# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005426 # Check for GNU $ac_path_EGREP
5427case `"$ac_path_EGREP" --version 2>&1` in
5428*GNU*)
5429 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5430*)
5431 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433 while :
5434 do
5435 cat "conftest.in" "conftest.in" >"conftest.tmp"
5436 mv "conftest.tmp" "conftest.in"
5437 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005439 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5440 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005442 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5443 # Best one so far, save it but keep looking for a better one
5444 ac_cv_path_EGREP="$ac_path_EGREP"
5445 ac_path_EGREP_max=$ac_count
5446 fi
5447 # 10*(2^10) chars as input seems more than enough
5448 test $ac_count -gt 10 && break
5449 done
5450 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5451esac
5452
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 $ac_path_EGREP_found && break 3
5454 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005459 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 +00005460 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005461else
5462 ac_cv_path_EGREP=$EGREP
5463fi
5464
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005465 fi
5466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5468$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005469 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005470
5471
Matthias Kloseb9621712010-04-24 17:59:49 +00005472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5473$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005474if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005475 $as_echo_n "(cached) " >&6
5476else
5477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005478/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005479#include <stdlib.h>
5480#include <stdarg.h>
5481#include <string.h>
5482#include <float.h>
5483
5484int
5485main ()
5486{
5487
5488 ;
5489 return 0;
5490}
5491_ACEOF
5492if ac_fn_c_try_compile "$LINENO"; then :
5493 ac_cv_header_stdc=yes
5494else
5495 ac_cv_header_stdc=no
5496fi
5497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5498
5499if test $ac_cv_header_stdc = yes; then
5500 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5502/* end confdefs.h. */
5503#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005504
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005505_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005507 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005509else
Matthias Kloseb9621712010-04-24 17:59:49 +00005510 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005511fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005512rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513
Matthias Kloseb9621712010-04-24 17:59:49 +00005514fi
5515
5516if test $ac_cv_header_stdc = yes; then
5517 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519/* end confdefs.h. */
5520#include <stdlib.h>
5521
5522_ACEOF
5523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5524 $EGREP "free" >/dev/null 2>&1; then :
5525
5526else
5527 ac_cv_header_stdc=no
5528fi
5529rm -f conftest*
5530
5531fi
5532
5533if test $ac_cv_header_stdc = yes; then
5534 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5535 if test "$cross_compiling" = yes; then :
5536 :
5537else
5538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5539/* end confdefs.h. */
5540#include <ctype.h>
5541#include <stdlib.h>
5542#if ((' ' & 0x0FF) == 0x020)
5543# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5544# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5545#else
5546# define ISLOWER(c) \
5547 (('a' <= (c) && (c) <= 'i') \
5548 || ('j' <= (c) && (c) <= 'r') \
5549 || ('s' <= (c) && (c) <= 'z'))
5550# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5551#endif
5552
5553#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5554int
5555main ()
5556{
5557 int i;
5558 for (i = 0; i < 256; i++)
5559 if (XOR (islower (i), ISLOWER (i))
5560 || toupper (i) != TOUPPER (i))
5561 return 2;
5562 return 0;
5563}
5564_ACEOF
5565if ac_fn_c_try_run "$LINENO"; then :
5566
5567else
5568 ac_cv_header_stdc=no
5569fi
5570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5571 conftest.$ac_objext conftest.beam conftest.$ac_ext
5572fi
5573
5574fi
5575fi
5576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5577$as_echo "$ac_cv_header_stdc" >&6; }
5578if test $ac_cv_header_stdc = yes; then
5579
5580$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5581
5582fi
5583
5584# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5585for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5586 inttypes.h stdint.h unistd.h
5587do :
5588 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5589ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5590"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005591if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005592 cat >>confdefs.h <<_ACEOF
5593#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5594_ACEOF
5595
5596fi
5597
5598done
5599
5600
5601
5602 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 +02005603if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005604 MINIX=yes
5605else
5606 MINIX=
5607fi
5608
5609
5610 if test "$MINIX" = yes; then
5611
5612$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5613
5614
5615$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5616
5617
5618$as_echo "#define _MINIX 1" >>confdefs.h
5619
5620 fi
5621
5622
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5624$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005625if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005626 $as_echo_n "(cached) " >&6
5627else
5628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5629/* end confdefs.h. */
5630
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005631# define __EXTENSIONS__ 1
5632 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005633int
5634main ()
5635{
5636
5637 ;
5638 return 0;
5639}
5640_ACEOF
5641if ac_fn_c_try_compile "$LINENO"; then :
5642 ac_cv_safe_to_define___extensions__=yes
5643else
5644 ac_cv_safe_to_define___extensions__=no
5645fi
5646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5647fi
5648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5649$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5650 test $ac_cv_safe_to_define___extensions__ = yes &&
5651 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5652
5653 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5654
5655 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5656
5657 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5658
5659 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5660
5661
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
Xavier de Gaye95750b12016-07-09 11:05:42 +02005663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5664$as_echo_n "checking for the Android API level... " >&6; }
5665cat >> conftest.c <<EOF
5666#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005667android_api = __ANDROID_API__
5668arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005669#else
5670#error not Android
5671#endif
5672EOF
5673
5674if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005675 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5676 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5678$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005679 if test -z "$ANDROID_API_LEVEL"; then
5680 echo 'Fatal: you must define __ANDROID_API__'
5681 exit 1
5682 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005683
5684cat >>confdefs.h <<_ACEOF
5685#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5686_ACEOF
5687
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005688
5689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5690$as_echo_n "checking for the Android arm ABI... " >&6; }
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5692$as_echo "$_arm_arch" >&6; }
5693 if test "$_arm_arch" = 7; then
5694 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5695 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5696 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005697else
5698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5699$as_echo "not Android" >&6; }
5700fi
5701rm -f conftest.c conftest.out
5702
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703# Check for unsupported systems
5704case $ac_sys_system/$ac_sys_release in
5705atheos*|Linux*/1*)
5706 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5707 echo See README for details.
5708 exit 1;;
5709esac
5710
5711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5713$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
5715# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005716if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717 withval=$with_suffix;
5718 case $withval in
5719 no) EXEEXT=;;
5720 yes) EXEEXT=.exe;;
5721 *) EXEEXT=$withval;;
5722 esac
5723fi
5724
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5726$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
5728# Test whether we're running on a non-case-sensitive system, in which
5729# case we give a warning if no ext is given
5730
Matthias Kloseb9621712010-04-24 17:59:49 +00005731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5732$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733if test ! -d CaseSensitiveTestDir; then
5734mkdir CaseSensitiveTestDir
5735fi
5736
5737if test -d casesensitivetestdir
5738then
Matthias Kloseb9621712010-04-24 17:59:49 +00005739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5740$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741 BUILDEXEEXT=.exe
5742else
Matthias Kloseb9621712010-04-24 17:59:49 +00005743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5744$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745 BUILDEXEEXT=$EXEEXT
5746fi
5747rmdir CaseSensitiveTestDir
5748
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749case $ac_sys_system in
5750hp*|HP*)
5751 case $CC in
5752 cc|*/cc) CC="$CC -Ae";;
5753 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754esac
5755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5758$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759if test -z "$LIBRARY"
5760then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005761 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5764$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766# LDLIBRARY is the name of the library to link against (as opposed to the
5767# name of the library into which to insert object files). BLDLIBRARY is also
5768# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5769# is blank as the main program is not linked directly against LDLIBRARY.
5770# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5771# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5772# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5773# DLLLIBRARY is the shared (i.e., DLL) library.
5774#
5775# RUNSHARED is used to run shared python without installed libraries
5776#
5777# INSTSONAME is the name of the shared library that will be use to install
5778# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005779#
5780# LDVERSION is the shared library version number, normally the Python version
5781# with the ABI build flags appended.
5782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784
5785
5786
5787
5788
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005789
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790LDLIBRARY="$LIBRARY"
5791BLDLIBRARY='$(LDLIBRARY)'
5792INSTSONAME='$(LDLIBRARY)'
5793DLLLIBRARY=''
5794LDLIBRARYDIR=''
5795RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005796LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797
5798# LINKCC is the command that links the python executable -- default is $(CC).
5799# If CXX is set, and if it is needed to link a main function that was
5800# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5801# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5804$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805if test -z "$LINKCC"
5806then
5807 LINKCC='$(PURIFY) $(MAINCC)'
5808 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 QNX*)
5810 # qcc must be used because the other compilers do not
5811 # support -N.
5812 LINKCC=qcc;;
5813 esac
5814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5816$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817
Stefan Krahe6dcd372020-08-29 17:00:08 +02005818# EXPORTSYMS holds the list of exported symbols for AIX.
5819# EXPORTSFROM holds the module name exporting symbols on AIX.
5820EXPORTSYMS=
5821EXPORTSFROM=
5822
5823
5824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5825$as_echo_n "checking EXPORTSYMS... " >&6; }
5826case $ac_sys_system in
5827AIX*)
5828 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06005829 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02005830 ;;
5831esac
5832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5833$as_echo "$EXPORTSYMS" >&6; }
5834
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5836# make sure we default having it set to "no": this is used by
5837# distutils.unixccompiler to know if it should add --enable-new-dtags
5838# to linker command lines, and failing to detect GNU ld simply results
5839# in the same bahaviour as before.
5840
Matthias Kloseb9621712010-04-24 17:59:49 +00005841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5842$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843ac_prog=ld
5844if test "$GCC" = yes; then
5845 ac_prog=`$CC -print-prog-name=ld`
5846fi
5847case `"$ac_prog" -V 2>&1 < /dev/null` in
5848 *GNU*)
5849 GNULD=yes;;
5850 *)
5851 GNULD=no;;
5852esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5854$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855
Matthias Kloseb9621712010-04-24 17:59:49 +00005856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5857$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005859if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860 enableval=$enable_shared;
5861fi
5862
5863
5864if test -z "$enable_shared"
5865then
5866 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005867 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868 enable_shared="yes";;
5869 *)
5870 enable_shared="no";;
5871 esac
5872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5874$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875
Matthias Kloseb9621712010-04-24 17:59:49 +00005876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5877$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005879if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005880 enableval=$enable_profiling;
5881fi
5882
5883if test "x$enable_profiling" = xyes; then
5884 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005885 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887/* end confdefs.h. */
5888int main() { return 0; }
5889_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005890if ac_fn_c_try_link "$LINENO"; then :
5891
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005893 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005895rm -f core conftest.err conftest.$ac_objext \
5896 conftest$ac_exeext conftest.$ac_ext
5897 CC="$ac_save_cc"
5898else
5899 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5902$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903
doko@ubuntu.comba015832012-06-30 16:52:05 +02005904if test "x$enable_profiling" = xyes; then
5905 BASECFLAGS="-pg $BASECFLAGS"
5906 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907fi
5908
Matthias Kloseb9621712010-04-24 17:59:49 +00005909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5910$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911
5912# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5913# library that we build, but we do not want to link against it (we
5914# will find it with a -framework option). For this reason there is an
5915# extra variable BLDLIBRARY against which Python and the extension
5916# modules are linked, BLDLIBRARY. This is normally the same as
5917# LDLIBRARY, but empty for MacOSX framework builds.
5918if test "$enable_framework"
5919then
5920 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005921 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 BLDLIBRARY=''
5923else
5924 BLDLIBRARY='$(LDLIBRARY)'
5925fi
5926
5927# Other platforms follow
5928if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005929 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930
Matthias Kloseb9621712010-04-24 17:59:49 +00005931$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932
5933 case $ac_sys_system in
5934 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).dll.a'
5936 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 ;;
5938 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).so'
5940 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005941 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005943 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005944 then
5945 PY3LIBRARY=libpython3.so
5946 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ;;
pxinwrc1174262020-12-15 06:14:43 +08005948 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 LDLIBRARY='libpython$(LDVERSION).so'
5950 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005951 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005953 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005954 then
5955 PY3LIBRARY=libpython3.so
5956 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ;;
5958 hp*|HP*)
5959 case `uname -m` in
5960 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005961 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
5963 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005964 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ;;
5966 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005967 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005968 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005971 LDLIBRARY='libpython$(LDVERSION).dylib'
5972 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005973 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005975 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005976 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005977 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005978 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979
5980 esac
5981else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005982 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983 case $ac_sys_system in
5984 CYGWIN*)
5985 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005986 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987 ;;
5988 esac
5989fi
5990
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005991if test "$cross_compiling" = yes; then
5992 RUNSHARED=
5993fi
5994
Matthias Kloseb9621712010-04-24 17:59:49 +00005995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5996$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005999if test -n "$ac_tool_prefix"; then
6000 for ac_prog in ar aal
6001 do
6002 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6003set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6005$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006006if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008else
6009 if test -n "$AR"; then
6010 ac_cv_prog_AR="$AR" # Let the user override the test.
6011else
6012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6013for as_dir in $PATH
6014do
6015 IFS=$as_save_IFS
6016 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006019 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021 break 2
6022 fi
6023done
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025IFS=$as_save_IFS
6026
6027fi
6028fi
6029AR=$ac_cv_prog_AR
6030if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6032$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033else
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6035$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036fi
6037
6038
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006039 test -n "$AR" && break
6040 done
6041fi
6042if test -z "$AR"; then
6043 ac_ct_AR=$AR
6044 for ac_prog in ar aal
6045do
6046 # Extract the first word of "$ac_prog", so it can be a program name with args.
6047set dummy $ac_prog; ac_word=$2
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6049$as_echo_n "checking for $ac_word... " >&6; }
6050if ${ac_cv_prog_ac_ct_AR+:} false; then :
6051 $as_echo_n "(cached) " >&6
6052else
6053 if test -n "$ac_ct_AR"; then
6054 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6055else
6056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6057for as_dir in $PATH
6058do
6059 IFS=$as_save_IFS
6060 test -z "$as_dir" && as_dir=.
6061 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006062 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006063 ac_cv_prog_ac_ct_AR="$ac_prog"
6064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6065 break 2
6066 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006068 done
6069IFS=$as_save_IFS
6070
6071fi
6072fi
6073ac_ct_AR=$ac_cv_prog_ac_ct_AR
6074if test -n "$ac_ct_AR"; then
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6076$as_echo "$ac_ct_AR" >&6; }
6077else
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6079$as_echo "no" >&6; }
6080fi
6081
6082
6083 test -n "$ac_ct_AR" && break
6084done
6085
6086 if test "x$ac_ct_AR" = x; then
6087 AR="ar"
6088 else
6089 case $cross_compiling:$ac_tool_warned in
6090yes:)
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6092$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6093ac_tool_warned=yes ;;
6094esac
6095 AR=$ac_ct_AR
6096 fi
6097fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098
6099
6100# tweak ARFLAGS only if the user didn't set it on the command line
6101
6102if test -z "$ARFLAGS"
6103then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006104 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105fi
6106
doko@ubuntu.com58844492012-06-30 18:25:32 +02006107if test -n "$ac_tool_prefix"; then
6108 for ac_prog in readelf
6109 do
6110 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6111set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6113$as_echo_n "checking for $ac_word... " >&6; }
6114if ${ac_cv_prog_READELF+:} false; then :
6115 $as_echo_n "(cached) " >&6
6116else
6117 if test -n "$READELF"; then
6118 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6119else
6120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6121for as_dir in $PATH
6122do
6123 IFS=$as_save_IFS
6124 test -z "$as_dir" && as_dir=.
6125 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006127 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6129 break 2
6130 fi
6131done
6132 done
6133IFS=$as_save_IFS
6134
6135fi
6136fi
6137READELF=$ac_cv_prog_READELF
6138if test -n "$READELF"; then
6139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6140$as_echo "$READELF" >&6; }
6141else
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6143$as_echo "no" >&6; }
6144fi
6145
6146
6147 test -n "$READELF" && break
6148 done
6149fi
6150if test -z "$READELF"; then
6151 ac_ct_READELF=$READELF
6152 for ac_prog in readelf
6153do
6154 # Extract the first word of "$ac_prog", so it can be a program name with args.
6155set dummy $ac_prog; ac_word=$2
6156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6157$as_echo_n "checking for $ac_word... " >&6; }
6158if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6159 $as_echo_n "(cached) " >&6
6160else
6161 if test -n "$ac_ct_READELF"; then
6162 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6163else
6164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6165for as_dir in $PATH
6166do
6167 IFS=$as_save_IFS
6168 test -z "$as_dir" && as_dir=.
6169 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006171 ac_cv_prog_ac_ct_READELF="$ac_prog"
6172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6173 break 2
6174 fi
6175done
6176 done
6177IFS=$as_save_IFS
6178
6179fi
6180fi
6181ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6182if test -n "$ac_ct_READELF"; then
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6184$as_echo "$ac_ct_READELF" >&6; }
6185else
6186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6187$as_echo "no" >&6; }
6188fi
6189
6190
6191 test -n "$ac_ct_READELF" && break
6192done
6193
6194 if test "x$ac_ct_READELF" = x; then
6195 READELF=":"
6196 else
6197 case $cross_compiling:$ac_tool_warned in
6198yes:)
6199{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6200$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6201ac_tool_warned=yes ;;
6202esac
6203 READELF=$ac_ct_READELF
6204 fi
6205fi
6206
6207if test "$cross_compiling" = yes; then
6208 case "$READELF" in
6209 readelf|:)
6210 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6211 ;;
6212 esac
6213fi
6214
6215
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006216
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006218hp*|HP*)
6219 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220 if test -z "$INSTALL"
6221 then
6222 INSTALL="${srcdir}/install-sh -c"
6223 fi
6224esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225# Find a good install program. We prefer a C program (faster),
6226# so one script is as good as another. But avoid the broken or
6227# incompatible versions:
6228# SysV /etc/install, /usr/sbin/install
6229# SunOS /usr/etc/install
6230# IRIX /sbin/install
6231# AIX /bin/install
6232# AmigaOS /C/install, which installs bootblocks on floppy discs
6233# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6234# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6235# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6236# OS/2's system install, which has a completely different semantic
6237# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006238# Reject install programs that cannot install multiple files.
6239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6240$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006242if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006243 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244else
6245 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6246for as_dir in $PATH
6247do
6248 IFS=$as_save_IFS
6249 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006250 # Account for people who put trailing slashes in PATH elements.
6251case $as_dir/ in #((
6252 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006253 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006254 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006255 /usr/ucb/* ) ;;
6256 *)
6257 # OSF1 and SCO ODT 3.0 have their own names for install.
6258 # Don't use installbsd from OSF since it installs stuff as root
6259 # by default.
6260 for ac_prog in ginstall scoinst install; do
6261 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006262 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263 if test $ac_prog = install &&
6264 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6265 # AIX install. It has an incompatible calling convention.
6266 :
6267 elif test $ac_prog = install &&
6268 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6269 # program-specific install script used by HP pwplus--don't use.
6270 :
6271 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006272 rm -rf conftest.one conftest.two conftest.dir
6273 echo one > conftest.one
6274 echo two > conftest.two
6275 mkdir conftest.dir
6276 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6277 test -s conftest.one && test -s conftest.two &&
6278 test -s conftest.dir/conftest.one &&
6279 test -s conftest.dir/conftest.two
6280 then
6281 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6282 break 3
6283 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284 fi
6285 fi
6286 done
6287 done
6288 ;;
6289esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006290
6291 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006292IFS=$as_save_IFS
6293
Matthias Kloseb9621712010-04-24 17:59:49 +00006294rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295
6296fi
6297 if test "${ac_cv_path_install+set}" = set; then
6298 INSTALL=$ac_cv_path_install
6299 else
6300 # As a last resort, use the slow shell script. Don't cache a
6301 # value for INSTALL within a source directory, because that will
6302 # break other packages using the cache if that directory is
6303 # removed, or if the value is a relative name.
6304 INSTALL=$ac_install_sh
6305 fi
6306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6308$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309
6310# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6311# It thinks the first close brace ends the variable substitution.
6312test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6313
6314test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6315
6316test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6317
Matthias Klose93a0ef12012-03-15 18:08:34 +01006318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6319$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6320if test -z "$MKDIR_P"; then
6321 if ${ac_cv_path_mkdir+:} false; then :
6322 $as_echo_n "(cached) " >&6
6323else
6324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6325for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6326do
6327 IFS=$as_save_IFS
6328 test -z "$as_dir" && as_dir=.
6329 for ac_prog in mkdir gmkdir; do
6330 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006331 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006332 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6333 'mkdir (GNU coreutils) '* | \
6334 'mkdir (coreutils) '* | \
6335 'mkdir (fileutils) '4.1*)
6336 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6337 break 3;;
6338 esac
6339 done
6340 done
6341 done
6342IFS=$as_save_IFS
6343
6344fi
6345
6346 test -d ./--version && rmdir ./--version
6347 if test "${ac_cv_path_mkdir+set}" = set; then
6348 MKDIR_P="$ac_cv_path_mkdir -p"
6349 else
6350 # As a last resort, use the slow shell script. Don't cache a
6351 # value for MKDIR_P within a source directory, because that will
6352 # break other packages using the cache if that directory is
6353 # removed, or if the value is a relative name.
6354 MKDIR_P="$ac_install_sh -d"
6355 fi
6356fi
6357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6358$as_echo "$MKDIR_P" >&6; }
6359
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360
6361# Not every filesystem supports hard links
6362
6363if test -z "$LN" ; then
6364 case $ac_sys_system in
6365 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006366 *) LN=ln;;
6367 esac
6368fi
6369
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006370# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006371
6372ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006373
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6376$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006377
6378# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006379if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380 withval=$with_pydebug;
6381if test "$withval" != no
6382then
6383
Matthias Kloseb9621712010-04-24 17:59:49 +00006384$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385
Matthias Kloseb9621712010-04-24 17:59:49 +00006386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6387$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006388 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006389 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006390else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006392fi
6393else
Matthias Kloseb9621712010-04-24 17:59:49 +00006394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6395$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396fi
6397
6398
Victor Stinnerf4e47032019-04-25 00:56:28 +02006399# Check for --with-trace-refs
6400# --with-trace-refs
6401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6402$as_echo_n "checking for --with-trace-refs... " >&6; }
6403
6404# Check whether --with-trace-refs was given.
6405if test "${with_trace_refs+set}" = set; then :
6406 withval=$with_trace_refs;
6407else
6408 with_trace_refs=no
6409fi
6410
6411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6412$as_echo "$with_trace_refs" >&6; }
6413
6414if test "$with_trace_refs" = "yes"
6415then
6416
6417$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6418
6419fi
6420
6421# Check for --with-assertions.
6422# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006423assertions='false'
6424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6425$as_echo_n "checking for --with-assertions... " >&6; }
6426
6427# Check whether --with-assertions was given.
6428if test "${with_assertions+set}" = set; then :
6429 withval=$with_assertions;
6430if test "$withval" != no
6431then
6432 assertions='true'
6433fi
6434fi
6435
6436if test "$assertions" = 'true'; then
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6438$as_echo "yes" >&6; }
6439elif test "$Py_DEBUG" = 'true'; then
6440 assertions='true'
6441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6442$as_echo "implied by --with-pydebug" >&6; }
6443else
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6445$as_echo "no" >&6; }
6446fi
6447
Brett Cannon63d98bc2016-09-06 17:12:40 -07006448# Enable optimization flags
6449
6450
6451Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6453$as_echo_n "checking for --enable-optimizations... " >&6; }
6454# Check whether --enable-optimizations was given.
6455if test "${enable_optimizations+set}" = set; then :
6456 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006457if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006458then
6459 Py_OPT='true'
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6461$as_echo "yes" >&6; };
6462else
6463 Py_OPT='false'
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6465$as_echo "no" >&6; };
6466fi
6467else
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6469$as_echo "no" >&6; }
6470fi
6471
6472if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006473 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6474 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006475 # 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 +00006476 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006477 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006478 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006479 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01006480 case $CC in
6481 *gcc*)
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
6483$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
6484if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
6485 $as_echo_n "(cached) " >&6
6486else
6487
6488 ax_check_save_flags=$CFLAGS
6489 CFLAGS="$CFLAGS -fno-semantic-interposition"
6490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6491/* end confdefs.h. */
6492
6493int
6494main ()
6495{
6496
6497 ;
6498 return 0;
6499}
6500_ACEOF
6501if ac_fn_c_try_compile "$LINENO"; then :
6502 ax_cv_check_cflags___fno_semantic_interposition=yes
6503else
6504 ax_cv_check_cflags___fno_semantic_interposition=no
6505fi
6506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6507 CFLAGS=$ax_check_save_flags
6508fi
6509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
6510$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
6511if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
6512
Pablo Galindob451b0e2020-10-21 22:46:52 +01006513 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6514 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006515
6516else
6517 :
6518fi
6519
Pablo Galindob451b0e2020-10-21 22:46:52 +01006520 ;;
6521 esac
6522
6523
Brett Cannon63d98bc2016-09-06 17:12:40 -07006524else
6525 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006526 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006527 DEF_MAKE_RULE="all"
6528fi
6529
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006530
6531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6532$as_echo_n "checking PROFILE_TASK... " >&6; }
6533if test -z "$PROFILE_TASK"
6534then
Victor Stinner67900052021-01-27 11:16:15 +01006535 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006536fi
6537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6538$as_echo "$PROFILE_TASK" >&6; }
6539
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006540# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6541# normal names in the default $PATH (ie: Ubuntu). They exist under the
6542# non-suffixed name in their versioned llvm directory.
6543
6544llvm_bin_dir=''
6545llvm_path="${PATH}"
6546if test "${CC}" = "clang"
6547then
6548 clang_bin=`which clang`
6549 # Some systems install clang elsewhere as a symlink to the real path
6550 # which is where the related llvm tools are located.
6551 if test -L "${clang_bin}"
6552 then
6553 clang_dir=`dirname "${clang_bin}"`
6554 clang_bin=`readlink "${clang_bin}"`
6555 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6556 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6557 fi
6558fi
6559
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006560# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6562$as_echo_n "checking for --with-lto... " >&6; }
6563
6564# Check whether --with-lto was given.
6565if test "${with_lto+set}" = set; then :
6566 withval=$with_lto;
6567if test "$withval" != no
6568then
6569 Py_LTO='true'
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6571$as_echo "yes" >&6; };
6572else
6573 Py_LTO='false'
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6575$as_echo "no" >&6; };
6576fi
6577else
6578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579$as_echo "no" >&6; }
6580fi
6581
6582if test "$Py_LTO" = 'true' ; then
6583 case $CC in
6584 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006585
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006586 if test -n "$ac_tool_prefix"; then
6587 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6588set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6590$as_echo_n "checking for $ac_word... " >&6; }
6591if ${ac_cv_path_LLVM_AR+:} false; then :
6592 $as_echo_n "(cached) " >&6
6593else
6594 case $LLVM_AR in
6595 [\\/]* | ?:[\\/]*)
6596 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6597 ;;
6598 *)
6599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6600for as_dir in ${llvm_path}
6601do
6602 IFS=$as_save_IFS
6603 test -z "$as_dir" && as_dir=.
6604 for ac_exec_ext in '' $ac_executable_extensions; do
6605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6606 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6607 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6608 break 2
6609 fi
6610done
6611 done
6612IFS=$as_save_IFS
6613
6614 ;;
6615esac
6616fi
6617LLVM_AR=$ac_cv_path_LLVM_AR
6618if test -n "$LLVM_AR"; then
6619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6620$as_echo "$LLVM_AR" >&6; }
6621else
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6623$as_echo "no" >&6; }
6624fi
6625
6626
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006627fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006628if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006629 ac_pt_LLVM_AR=$LLVM_AR
6630 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006631set dummy llvm-ar; ac_word=$2
6632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6633$as_echo_n "checking for $ac_word... " >&6; }
6634if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6635 $as_echo_n "(cached) " >&6
6636else
6637 case $ac_pt_LLVM_AR in
6638 [\\/]* | ?:[\\/]*)
6639 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6640 ;;
6641 *)
6642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6643for as_dir in ${llvm_path}
6644do
6645 IFS=$as_save_IFS
6646 test -z "$as_dir" && as_dir=.
6647 for ac_exec_ext in '' $ac_executable_extensions; do
6648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6649 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6651 break 2
6652 fi
6653done
6654 done
6655IFS=$as_save_IFS
6656
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006657 ;;
6658esac
6659fi
6660ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6661if test -n "$ac_pt_LLVM_AR"; then
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6663$as_echo "$ac_pt_LLVM_AR" >&6; }
6664else
6665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6666$as_echo "no" >&6; }
6667fi
6668
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006669 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006670 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006671 else
6672 case $cross_compiling:$ac_tool_warned in
6673yes:)
6674{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6675$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6676ac_tool_warned=yes ;;
6677esac
6678 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006679 fi
6680else
6681 LLVM_AR="$ac_cv_path_LLVM_AR"
6682fi
6683
6684
6685 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6686 then
6687 LLVM_AR_FOUND="found"
6688 else
6689 LLVM_AR_FOUND="not-found"
6690 fi
6691 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6692 then
6693 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6694 if test -n "${found_llvm_ar}"
6695 then
6696 LLVM_AR='/usr/bin/xcrun llvm-ar'
6697 LLVM_AR_FOUND=found
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6699$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6700 fi
6701 fi
6702 if test $LLVM_AR_FOUND = not-found
6703 then
6704 LLVM_PROFR_ERR=yes
6705 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6706 else
6707 LLVM_AR_ERR=no
6708 fi
6709 AR="${LLVM_AR}"
6710 case $ac_sys_system in
6711 Darwin*)
6712 # Any changes made here should be reflected in the GCC+Darwin case below
6713 LTOFLAGS="-flto -Wl,-export_dynamic"
6714 ;;
6715 *)
6716 LTOFLAGS="-flto"
6717 ;;
6718 esac
6719 ;;
6720 *gcc*)
6721 case $ac_sys_system in
6722 Darwin*)
6723 LTOFLAGS="-flto -Wl,-export_dynamic"
6724 ;;
6725 *)
6726 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6727 ;;
6728 esac
6729 ;;
6730 esac
6731
6732 if test "$ac_cv_prog_cc_g" = "yes"
6733 then
6734 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6735 # to get debug symbols.
6736 LTOFLAGS="$LTOFLAGS -g"
6737 fi
6738
stratakisf92c7aa2018-12-04 15:54:01 +01006739 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006740 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006741fi
6742
6743# Enable PGO flags.
6744
6745
6746
6747
6748
6749
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006750if test -n "$ac_tool_prefix"; then
6751 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6752set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6754$as_echo_n "checking for $ac_word... " >&6; }
6755if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6756 $as_echo_n "(cached) " >&6
6757else
6758 case $LLVM_PROFDATA in
6759 [\\/]* | ?:[\\/]*)
6760 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6761 ;;
6762 *)
6763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6764for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006765do
6766 IFS=$as_save_IFS
6767 test -z "$as_dir" && as_dir=.
6768 for ac_exec_ext in '' $ac_executable_extensions; do
6769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006770 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6772 break 2
6773 fi
6774done
6775 done
6776IFS=$as_save_IFS
6777
Gregory P. Smith799520c2016-09-07 16:10:00 -07006778 ;;
6779esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006780fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006781LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6782if test -n "$LLVM_PROFDATA"; then
6783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6784$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785else
6786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6787$as_echo "no" >&6; }
6788fi
6789
6790
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006791fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006792if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006793 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6794 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006795set dummy llvm-profdata; ac_word=$2
6796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6797$as_echo_n "checking for $ac_word... " >&6; }
6798if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6799 $as_echo_n "(cached) " >&6
6800else
6801 case $ac_pt_LLVM_PROFDATA in
6802 [\\/]* | ?:[\\/]*)
6803 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6804 ;;
6805 *)
6806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6807for as_dir in ${llvm_path}
6808do
6809 IFS=$as_save_IFS
6810 test -z "$as_dir" && as_dir=.
6811 for ac_exec_ext in '' $ac_executable_extensions; do
6812 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6813 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6814 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6815 break 2
6816 fi
6817done
6818 done
6819IFS=$as_save_IFS
6820
Gregory P. Smith799520c2016-09-07 16:10:00 -07006821 ;;
6822esac
6823fi
6824ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6825if test -n "$ac_pt_LLVM_PROFDATA"; then
6826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6827$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6828else
6829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6830$as_echo "no" >&6; }
6831fi
6832
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006833 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006834 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006835 else
6836 case $cross_compiling:$ac_tool_warned in
6837yes:)
6838{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6839$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6840ac_tool_warned=yes ;;
6841esac
6842 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006843 fi
6844else
6845 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6846fi
6847
6848
6849if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6850then
6851 LLVM_PROF_FOUND="found"
6852else
6853 LLVM_PROF_FOUND="not-found"
6854fi
6855if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6856then
6857 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6858 if test -n "${found_llvm_profdata}"
6859 then
6860 # llvm-profdata isn't directly in $PATH in some cases.
6861 # https://apple.stackexchange.com/questions/197053/
6862 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6863 LLVM_PROF_FOUND=found
6864 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6865$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6866 fi
6867fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006868LLVM_PROF_ERR=no
6869case $CC in
6870 *clang*)
6871 # Any changes made here should be reflected in the GCC+Darwin case below
6872 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6873 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006874 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006875 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6876 if test $LLVM_PROF_FOUND = not-found
6877 then
6878 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006879 if test "${REQUIRE_PGO}" = "yes"
6880 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006881 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 -07006882 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006883 fi
6884 ;;
6885 *gcc*)
6886 case $ac_sys_system in
6887 Darwin*)
6888 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6889 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006890 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006891 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006892 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006893 then
6894 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006895 if test "${REQUIRE_PGO}" = "yes"
6896 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006897 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 -07006898 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006899 fi
6900 ;;
6901 *)
6902 PGO_PROF_GEN_FLAG="-fprofile-generate"
6903 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6904 LLVM_PROF_MERGER="true"
6905 LLVM_PROF_FILE=""
6906 ;;
6907 esac
6908 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006909 *icc*)
6910 PGO_PROF_GEN_FLAG="-prof-gen"
6911 PGO_PROF_USE_FLAG="-prof-use"
6912 LLVM_PROF_MERGER="true"
6913 LLVM_PROF_FILE=""
6914 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006915esac
6916
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6918# merged with this chunk of code?
6919
6920# Optimizer/debugger flags
6921# ------------------------
6922# (The following bit of code is complicated enough - please keep things
6923# indented properly. Just pretend you're editing Python code. ;-)
6924
6925# There are two parallel sets of case statements below, one that checks to
6926# see if OPT was set and one that does BASECFLAGS setting based upon
6927# compiler and platform. BASECFLAGS tweaks need to be made even if the
6928# user set OPT.
6929
Victor Stinner23a683a2019-04-12 21:27:37 +02006930case $CC in
6931 *clang*)
6932 cc_is_clang=1
6933 ;;
6934 *)
6935 if $CC --version 2>&1 | grep -q clang
6936 then
6937 cc_is_clang=1
6938 else
6939 cc_is_clang=
6940 fi
6941esac
6942
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006943# tweak OPT based on compiler and platform, only if the user didn't set
6944# it on the command line
6945
Victor Stinner9ed34a82017-05-02 22:35:58 +02006946
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006947if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006948then
6949 case $GCC in
6950 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006951 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6952 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6953 WRAP="-fwrapv"
6954 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006955
Victor Stinner35f3d242017-04-21 12:35:24 +02006956 if test -n "${cc_is_clang}"
6957 then
6958 # Clang also needs -fwrapv
6959 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006960 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6961 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006962 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006963 fi
6964
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006965 case $ac_cv_prog_cc_g in
6966 yes)
6967 if test "$Py_DEBUG" = 'true' ; then
6968 # Optimization messes up debuggers, so turn it off for
6969 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006970 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006971 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006972 else
Victor Stinner28205b22017-04-21 11:24:34 +02006973 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006974 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975 else
Victor Stinner28205b22017-04-21 11:24:34 +02006976 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977 fi
6978 ;;
6979 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006980 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981 ;;
6982 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 case $ac_sys_system in
6985 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6986 ;;
6987 esac
6988 ;;
6989
6990 *)
6991 OPT="-O"
6992 ;;
6993 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994fi
6995
6996
6997
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006998
stratakiscf10a752018-12-19 18:19:01 +01006999
Ronald Oussoren41761932020-11-08 10:05:27 +01007000# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007001UNIVERSAL_ARCH_FLAGS=
7002
7003
7004# tweak BASECFLAGS based on compiler and platform
7005case $GCC in
7006yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007007 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007008
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7010$as_echo_n "checking for -Wextra... " >&6; }
7011 ac_save_cc="$CC"
7012 CC="$CC -Wextra -Werror"
7013 if ${ac_cv_extra_warnings+:} false; then :
7014 $as_echo_n "(cached) " >&6
7015else
7016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7017/* end confdefs.h. */
7018
7019
7020int
7021main ()
7022{
7023
7024 ;
7025 return 0;
7026}
7027
7028_ACEOF
7029if ac_fn_c_try_compile "$LINENO"; then :
7030
7031 ac_cv_extra_warnings=yes
7032
7033else
7034
7035 ac_cv_extra_warnings=no
7036
7037fi
7038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7039fi
7040
7041 CC="$ac_save_cc"
7042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7043$as_echo "$ac_cv_extra_warnings" >&6; }
7044
7045 if test $ac_cv_extra_warnings = yes
7046 then
7047 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7048 fi
7049
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007050 # Python doesn't violate C99 aliasing rules, but older versions of
7051 # GCC produce warnings for legal Python code. Enable
7052 # -fno-strict-aliasing on versions of GCC that support but produce
7053 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00007054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7055$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007056 ac_save_cc="$CC"
7057 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007058 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007059 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007060 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007061else
Matthias Kloseb9621712010-04-24 17:59:49 +00007062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007063/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007064
Matthias Kloseb159a552010-04-25 21:00:44 +00007065
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007066int
7067main ()
7068{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007069
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007070 ;
7071 return 0;
7072}
Matthias Kloseb159a552010-04-25 21:00:44 +00007073
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007075if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007076
7077 CC="$ac_save_cc -fstrict-aliasing"
7078 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007080/* end confdefs.h. */
7081
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007082 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007083int
7084main ()
7085{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007086double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007087 ;
7088 return 0;
7089}
Matthias Kloseb159a552010-04-25 21:00:44 +00007090
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007092if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007093
7094 ac_cv_no_strict_aliasing=no
7095
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007096else
Matthias Kloseb159a552010-04-25 21:00:44 +00007097
7098 ac_cv_no_strict_aliasing=yes
7099
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007100fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007102
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007103else
Matthias Kloseb159a552010-04-25 21:00:44 +00007104
7105 ac_cv_no_strict_aliasing=no
7106
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007107fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007109fi
7110
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007111 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007112 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7114$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007115 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007116 then
7117 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7118 fi
7119
Zachary Ware5af85642015-12-21 12:09:17 -06007120 # ICC doesn't recognize the option, but only emits a warning
7121 ## XXX does it emit an unused result warning and can it be disabled?
7122 case "$CC" in
7123 *icc*)
7124 ac_cv_disable_unused_result_warning=no
7125 ;;
7126 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7128$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7129 ac_save_cc="$CC"
7130 CC="$CC -Wunused-result -Werror"
7131 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007132 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007133 $as_echo_n "(cached) " >&6
7134else
7135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7136/* end confdefs.h. */
7137
7138
7139int
7140main ()
7141{
7142
7143 ;
7144 return 0;
7145}
7146
7147_ACEOF
7148if ac_fn_c_try_compile "$LINENO"; then :
7149
7150 ac_cv_disable_unused_result_warning=yes
7151
7152else
7153
7154 ac_cv_disable_unused_result_warning=no
7155
7156fi
7157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7158fi
7159
7160 CFLAGS="$save_CFLAGS"
7161 CC="$ac_save_cc"
7162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7163$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007164 ;;
7165 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007166
7167 if test $ac_cv_disable_unused_result_warning = yes
7168 then
7169 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007170 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7171 fi
7172
7173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7174$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7175 ac_save_cc="$CC"
7176 CC="$CC -Wunused-parameter -Werror"
7177 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7178 $as_echo_n "(cached) " >&6
7179else
7180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7181/* end confdefs.h. */
7182
7183
7184int
7185main ()
7186{
7187
7188 ;
7189 return 0;
7190}
7191
7192_ACEOF
7193if ac_fn_c_try_compile "$LINENO"; then :
7194
7195 ac_cv_disable_unused_parameter_warning=yes
7196
7197else
7198
7199 ac_cv_disable_unused_parameter_warning=no
7200
7201fi
7202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7203fi
7204
7205 CC="$ac_save_cc"
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7207$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7208
7209 if test $ac_cv_disable_unused_parameter_warning = yes
7210 then
7211 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7212 fi
7213
7214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7215$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7216 ac_save_cc="$CC"
7217 CC="$CC -Wmissing-field-initializers -Werror"
7218 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7219 $as_echo_n "(cached) " >&6
7220else
7221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7222/* end confdefs.h. */
7223
7224
7225int
7226main ()
7227{
7228
7229 ;
7230 return 0;
7231}
7232
7233_ACEOF
7234if ac_fn_c_try_compile "$LINENO"; then :
7235
7236 ac_cv_disable_missing_field_initializers=yes
7237
7238else
7239
7240 ac_cv_disable_missing_field_initializers=no
7241
7242fi
7243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7244fi
7245
7246 CC="$ac_save_cc"
7247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7248$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7249
7250 if test $ac_cv_disable_missing_field_initializers = yes
7251 then
7252 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007253 fi
7254
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7256$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7257 ac_save_cc="$CC"
7258 CC="$CC -Wsign-compare"
7259 save_CFLAGS="$CFLAGS"
7260 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7261 $as_echo_n "(cached) " >&6
7262else
7263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7264/* end confdefs.h. */
7265
7266
7267int
7268main ()
7269{
7270
7271 ;
7272 return 0;
7273}
7274
7275_ACEOF
7276if ac_fn_c_try_compile "$LINENO"; then :
7277
7278 ac_cv_enable_sign_compare_warning=yes
7279
7280else
7281
7282 ac_cv_enable_sign_compare_warning=no
7283
7284fi
7285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7286fi
7287
7288 CFLAGS="$save_CFLAGS"
7289 CC="$ac_save_cc"
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7291$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7292
7293 if test $ac_cv_enable_sign_compare_warning = yes
7294 then
7295 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7296 fi
7297
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7299$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7300 ac_save_cc="$CC"
7301 CC="$CC -Wunreachable-code"
7302 save_CFLAGS="$CFLAGS"
7303 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7304 $as_echo_n "(cached) " >&6
7305else
7306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7307/* end confdefs.h. */
7308
7309
7310int
7311main ()
7312{
7313
7314 ;
7315 return 0;
7316}
7317
7318_ACEOF
7319if ac_fn_c_try_compile "$LINENO"; then :
7320
7321 ac_cv_enable_unreachable_code_warning=yes
7322
7323else
7324
7325 ac_cv_enable_unreachable_code_warning=no
7326
7327fi
7328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7329fi
7330
7331 CFLAGS="$save_CFLAGS"
7332 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007333
7334 # Don't enable unreachable code warning in debug mode, since it usually
7335 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007336 # Issue #24324: Unfortunately, the unreachable code warning does not work
7337 # correctly on gcc and has been silently removed from the compiler.
7338 # It is supported on clang but on OS X systems gcc may be an alias
7339 # for clang. Try to determine if the compiler is not really gcc and,
7340 # if so, only then enable the warning.
7341 if test $ac_cv_enable_unreachable_code_warning = yes && \
7342 test "$Py_DEBUG" != "true" && \
7343 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007344 then
7345 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007346 else
7347 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007348 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7350$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007351
INADA Naokie3364842018-06-05 20:40:53 +09007352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7353$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7354 ac_save_cc="$CC"
7355 CC="$CC -Werror -Wstrict-prototypes"
7356 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7357 $as_echo_n "(cached) " >&6
7358else
7359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7360/* end confdefs.h. */
7361
7362
7363int
7364main ()
7365{
7366
7367 ;
7368 return 0;
7369}
7370
7371_ACEOF
7372if ac_fn_c_try_compile "$LINENO"; then :
7373
7374 ac_cv_enable_strict_prototypes_warning=yes
7375
7376else
7377
7378 ac_cv_enable_strict_prototypes_warning=no
7379
7380fi
7381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7382fi
7383
7384 CC="$ac_save_cc"
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7386$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7387
7388 if test $ac_cv_enable_strict_prototypes_warning = yes
7389 then
7390 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7391 fi
7392
Victor Stinner193ee0a2017-02-06 14:24:00 +01007393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7394$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7395 ac_save_cc="$CC"
7396 CC="$CC -Werror=implicit-function-declaration"
7397 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7398 $as_echo_n "(cached) " >&6
7399else
7400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7401/* end confdefs.h. */
7402
7403
7404int
7405main ()
7406{
7407
7408 ;
7409 return 0;
7410}
7411
7412_ACEOF
7413if ac_fn_c_try_compile "$LINENO"; then :
7414
7415 ac_cv_enable_implicit_function_declaration_error=yes
7416
7417else
7418
7419 ac_cv_enable_implicit_function_declaration_error=no
7420
7421fi
7422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7423fi
7424
7425 CC="$ac_save_cc"
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7427$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7428
7429 if test $ac_cv_enable_implicit_function_declaration_error = yes
7430 then
7431 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7432 fi
7433
Vinay Sajip0b60f642019-10-15 08:26:12 +01007434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7435$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7436 ac_save_cc="$CC"
7437 CC="$CC -fvisibility=hidden"
7438 if ${ac_cv_enable_visibility+:} false; then :
7439 $as_echo_n "(cached) " >&6
7440else
7441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7442/* end confdefs.h. */
7443
7444
7445int
7446main ()
7447{
7448
7449 ;
7450 return 0;
7451}
7452
7453_ACEOF
7454if ac_fn_c_try_compile "$LINENO"; then :
7455
7456 ac_cv_enable_visibility=yes
7457
7458else
7459
7460 ac_cv_enable_visibility=no
7461
7462fi
7463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7464fi
7465
7466 CC="$ac_save_cc"
7467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7468$as_echo "$ac_cv_enable_visibility" >&6; }
7469
7470 if test $ac_cv_enable_visibility = yes
7471 then
7472 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7473 fi
7474
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7476 # support. Without this, treatment of subnormals doesn't follow
7477 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007478 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479 alpha*)
7480 BASECFLAGS="$BASECFLAGS -mieee"
7481 ;;
7482 esac
7483
7484 case $ac_sys_system in
7485 SCO_SV*)
7486 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7487 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007488
Ned Deily87adb6e2013-10-18 21:09:56 -07007489 Darwin*)
7490 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7491 # used to be here, but non-Apple gcc doesn't accept them.
7492 if test "${CC}" = gcc
7493 then
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007495$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007496 case "${UNIVERSALSDK}" in
7497 */MacOSX10.4u.sdk)
7498 # Build using 10.4 SDK, force usage of gcc when the
7499 # compiler is gcc, otherwise the user will get very
7500 # confusing error messages when building on OSX 10.6
7501 CC=gcc-4.0
7502 CPP=cpp-4.0
7503 ;;
7504 esac
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007506$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007507 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508
Ned Deily87adb6e2013-10-18 21:09:56 -07007509 if test "${enable_universalsdk}"
7510 then
7511 case "$UNIVERSAL_ARCHS" in
7512 32-bit)
7513 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7514 LIPO_32BIT_FLAGS=""
7515 ARCH_RUN_32BIT=""
7516 ;;
7517 64-bit)
7518 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7519 LIPO_32BIT_FLAGS=""
7520 ARCH_RUN_32BIT="true"
7521 ;;
7522 all)
7523 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7524 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7525 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7526 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01007527 universal2)
7528 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
7529 LIPO_32BIT_FLAGS=""
7530 ARCH_RUN_32BIT="true"
7531 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007532 intel)
7533 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7534 LIPO_32BIT_FLAGS="-extract i386"
7535 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7536 ;;
7537 intel-32)
7538 UNIVERSAL_ARCH_FLAGS="-arch i386"
7539 LIPO_32BIT_FLAGS=""
7540 ARCH_RUN_32BIT=""
7541 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007542 intel-64)
7543 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7544 LIPO_32BIT_FLAGS=""
7545 ARCH_RUN_32BIT="true"
7546 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007547 3-way)
7548 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7549 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7550 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7551 ;;
7552 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01007553 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 -07007554 ;;
7555 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556
Ned Deily87adb6e2013-10-18 21:09:56 -07007557 if test "${UNIVERSALSDK}" != "/"
7558 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007559 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7560 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007561 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007562 else
7563 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7564 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007565 fi
7566 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567
Ned Deily87adb6e2013-10-18 21:09:56 -07007568 # Calculate an appropriate deployment target for this build:
7569 # The deployment target value is used explicitly to enable certain
7570 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007571 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007572 # component of the string returned by distutils.get_platform().
7573 #
7574 # Use the value from:
7575 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7576 # 2. the operating system version of the build machine if >= 10.6
7577 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7578 # below to pick either 10.3, 10.4, or 10.5 as the target.
7579 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580
Ned Deily87adb6e2013-10-18 21:09:56 -07007581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7582$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007583 cur_target_major=`sw_vers -productVersion | \
7584 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7585 cur_target_minor=`sw_vers -productVersion | \
7586 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7587 cur_target="${cur_target_major}.${cur_target_minor}"
7588 if test ${cur_target_major} -eq 10 && \
7589 test ${cur_target_minor} -ge 3 && \
7590 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007591 then
Ned Deily36820b62014-06-25 13:44:22 -07007592 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007593 cur_target=10.3
7594 if test ${enable_universalsdk}
7595 then
7596 case "$UNIVERSAL_ARCHS" in
7597 all|3-way|intel|64-bit)
7598 # These configurations were first supported in 10.5
7599 cur_target='10.5'
7600 ;;
7601 esac
7602 else
7603 if test `/usr/bin/arch` = "i386"
7604 then
7605 # 10.4 was the first release to support Intel archs
7606 cur_target="10.4"
7607 fi
7608 fi
7609 fi
7610 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007611
Ned Deily87adb6e2013-10-18 21:09:56 -07007612 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7613 # environment with a value that is the same as what we'll use
7614 # in the Makefile to ensure that we'll get the same compiler
7615 # environment during configure and build time.
7616 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7617 export MACOSX_DEPLOYMENT_TARGET
7618 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7620$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007621
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
7623$as_echo_n "checking if specified universal architectures work... " >&6; }
7624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7625/* end confdefs.h. */
7626#include <stdio.h>
7627int
7628main ()
7629{
7630printf("%d", 42);
7631 ;
7632 return 0;
7633}
7634_ACEOF
7635if ac_fn_c_try_link "$LINENO"; then :
7636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7637$as_echo "yes" >&6; }
7638else
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7640$as_echo "no" >&6; }
7641 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
7642
7643fi
7644rm -f core conftest.err conftest.$ac_objext \
7645 conftest$ac_exeext conftest.$ac_ext
7646
Ned Deily87adb6e2013-10-18 21:09:56 -07007647 # end of Darwin* tests
7648 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649 esac
7650 ;;
7651
7652*)
7653 case $ac_sys_system in
7654 OpenUNIX*|UnixWare*)
7655 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7656 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657 SCO_SV*)
7658 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7659 ;;
7660 esac
7661 ;;
7662esac
7663
Zachary Ware5af85642015-12-21 12:09:17 -06007664case "$CC" in
7665*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007666 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007667 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7668 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007669*xlc*)
7670 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7671 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007672esac
7673
T. Woutersddbfa2c2017-05-23 01:30:49 +02007674if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675 :
7676else
7677 OPT="-DNDEBUG $OPT"
7678fi
7679
7680if test "$ac_arch_flags"
7681then
7682 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7683fi
7684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685# On some compilers, pthreads are available without further options
7686# (e.g. MacOS X). On some of these systems, the compiler will not
7687# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7688# So we have to see first whether pthreads are available without
7689# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7691$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007692if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694else
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696 ac_cv_pthread_is_default=no
7697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699/* end confdefs.h. */
7700
Stefan Krah7dba5942012-11-22 22:49:11 +01007701#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702#include <pthread.h>
7703
7704void* routine(void* p){return NULL;}
7705
7706int main(){
7707 pthread_t p;
7708 if(pthread_create(&p,NULL,routine,NULL)!=0)
7709 return 1;
7710 (void)pthread_detach(p);
7711 return 0;
7712}
7713
7714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007715if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716
7717 ac_cv_pthread_is_default=yes
7718 ac_cv_kthread=no
7719 ac_cv_pthread=no
7720
7721else
Matthias Kloseb9621712010-04-24 17:59:49 +00007722 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7725 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726fi
7727
7728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729fi
7730
Matthias Kloseb9621712010-04-24 17:59:49 +00007731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7732$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733
7734
7735if test $ac_cv_pthread_is_default = yes
7736then
7737 ac_cv_kpthread=no
7738else
7739# -Kpthread, if available, provides the right #defines
7740# and linker options to make pthread_create available
7741# Some compilers won't report that they do not support -Kpthread,
7742# so we need to run a program to see whether it really made the
7743# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7745$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007746if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748else
7749 ac_save_cc="$CC"
7750CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007751if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752 ac_cv_kpthread=no
7753else
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755/* end confdefs.h. */
7756
Stefan Krah7dba5942012-11-22 22:49:11 +01007757#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007758#include <pthread.h>
7759
7760void* routine(void* p){return NULL;}
7761
7762int main(){
7763 pthread_t p;
7764 if(pthread_create(&p,NULL,routine,NULL)!=0)
7765 return 1;
7766 (void)pthread_detach(p);
7767 return 0;
7768}
7769
7770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007771if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007772 ac_cv_kpthread=yes
7773else
Matthias Kloseb9621712010-04-24 17:59:49 +00007774 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7777 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778fi
7779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780CC="$ac_save_cc"
7781fi
7782
Matthias Kloseb9621712010-04-24 17:59:49 +00007783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7784$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007785fi
7786
7787if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7788then
7789# -Kthread, if available, provides the right #defines
7790# and linker options to make pthread_create available
7791# Some compilers won't report that they do not support -Kthread,
7792# so we need to run a program to see whether it really made the
7793# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7795$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007796if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007798else
7799 ac_save_cc="$CC"
7800CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007801if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007802 ac_cv_kthread=no
7803else
Matthias Kloseb9621712010-04-24 17:59:49 +00007804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007805/* end confdefs.h. */
7806
Stefan Krah7dba5942012-11-22 22:49:11 +01007807#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007808#include <pthread.h>
7809
7810void* routine(void* p){return NULL;}
7811
7812int main(){
7813 pthread_t p;
7814 if(pthread_create(&p,NULL,routine,NULL)!=0)
7815 return 1;
7816 (void)pthread_detach(p);
7817 return 0;
7818}
7819
7820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007821if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007822 ac_cv_kthread=yes
7823else
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007828fi
7829
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007830CC="$ac_save_cc"
7831fi
7832
Matthias Kloseb9621712010-04-24 17:59:49 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7834$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835fi
7836
7837if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7838then
7839# -pthread, if available, provides the right #defines
7840# and linker options to make pthread_create available
7841# Some compilers won't report that they do not support -pthread,
7842# so we need to run a program to see whether it really made the
7843# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7845$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007846if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007848else
7849 ac_save_cc="$CC"
7850CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007851if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007852 ac_cv_pthread=no
7853else
Matthias Kloseb9621712010-04-24 17:59:49 +00007854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007855/* end confdefs.h. */
7856
Stefan Krah7dba5942012-11-22 22:49:11 +01007857#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007858#include <pthread.h>
7859
7860void* routine(void* p){return NULL;}
7861
7862int main(){
7863 pthread_t p;
7864 if(pthread_create(&p,NULL,routine,NULL)!=0)
7865 return 1;
7866 (void)pthread_detach(p);
7867 return 0;
7868}
7869
7870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007871if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007872 ac_cv_pthread=yes
7873else
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007878fi
7879
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007880CC="$ac_save_cc"
7881fi
7882
Matthias Kloseb9621712010-04-24 17:59:49 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7884$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007885fi
7886
7887# If we have set a CC compiler flag for thread support then
7888# check if it works for CXX, too.
7889ac_cv_cxx_thread=no
7890if test ! -z "$CXX"
7891then
Matthias Kloseb9621712010-04-24 17:59:49 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7893$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007894ac_save_cxx="$CXX"
7895
7896if test "$ac_cv_kpthread" = "yes"
7897then
7898 CXX="$CXX -Kpthread"
7899 ac_cv_cxx_thread=yes
7900elif test "$ac_cv_kthread" = "yes"
7901then
7902 CXX="$CXX -Kthread"
7903 ac_cv_cxx_thread=yes
7904elif test "$ac_cv_pthread" = "yes"
7905then
7906 CXX="$CXX -pthread"
7907 ac_cv_cxx_thread=yes
7908fi
7909
7910if test $ac_cv_cxx_thread = yes
7911then
7912 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7913 $CXX -c conftest.$ac_ext 2>&5
7914 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7915 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7916 then
7917 ac_cv_cxx_thread=yes
7918 else
7919 ac_cv_cxx_thread=no
7920 fi
7921 rm -fr conftest*
7922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7924$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007925fi
7926CXX="$ac_save_cxx"
7927
7928
7929# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7931$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007932if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007934else
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007936/* end confdefs.h. */
7937#include <stdlib.h>
7938#include <stdarg.h>
7939#include <string.h>
7940#include <float.h>
7941
7942int
7943main ()
7944{
7945
7946 ;
7947 return 0;
7948}
7949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007950if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007951 ac_cv_header_stdc=yes
7952else
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007954fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7956
7957if test $ac_cv_header_stdc = yes; then
7958 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007960/* end confdefs.h. */
7961#include <string.h>
7962
7963_ACEOF
7964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 $EGREP "memchr" >/dev/null 2>&1; then :
7966
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007967else
7968 ac_cv_header_stdc=no
7969fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007970rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007971
7972fi
7973
7974if test $ac_cv_header_stdc = yes; then
7975 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007977/* end confdefs.h. */
7978#include <stdlib.h>
7979
7980_ACEOF
7981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 $EGREP "free" >/dev/null 2>&1; then :
7983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007984else
7985 ac_cv_header_stdc=no
7986fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007987rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007988
7989fi
7990
7991if test $ac_cv_header_stdc = yes; then
7992 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007993 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007994 :
7995else
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007997/* end confdefs.h. */
7998#include <ctype.h>
7999#include <stdlib.h>
8000#if ((' ' & 0x0FF) == 0x020)
8001# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8002# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8003#else
8004# define ISLOWER(c) \
8005 (('a' <= (c) && (c) <= 'i') \
8006 || ('j' <= (c) && (c) <= 'r') \
8007 || ('s' <= (c) && (c) <= 'z'))
8008# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8009#endif
8010
8011#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8012int
8013main ()
8014{
8015 int i;
8016 for (i = 0; i < 256; i++)
8017 if (XOR (islower (i), ISLOWER (i))
8018 || toupper (i) != TOUPPER (i))
8019 return 2;
8020 return 0;
8021}
8022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008023if ac_fn_c_try_run "$LINENO"; then :
8024
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008025else
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8029 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008030fi
8031
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008032fi
8033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8035$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008036if test $ac_cv_header_stdc = yes; then
8037
Matthias Kloseb9621712010-04-24 17:59:49 +00008038$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008039
8040fi
8041
stratakise768c862018-01-23 16:11:24 +01008042for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008043fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02008044ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07008045sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07008046utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01008047poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01008048sys/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 +01008049sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08008050sys/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 +01008051sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00008052sys/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 -07008053libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008054linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimescd9fed62020-11-13 19:48:52 +01008055sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
8056sys/mman.h sys/eventfd.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008057do :
8058 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8059ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008060if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008061 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008062#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008063_ACEOF
8064
8065fi
8066
Guido van Rossum627b2d71993-12-24 10:39:16 +00008067done
8068
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008069ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008070for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8073$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008074if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00008076else
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008078/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008079#include <sys/types.h>
8080#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
Martin v. Löwis11437992002-04-12 09:54:03 +00008082int
8083main ()
8084{
8085if ((DIR *) 0)
8086return 0;
8087 ;
8088 return 0;
8089}
8090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008091if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008093else
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008098eval ac_res=\$$as_ac_Header
8099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8100$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008101if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008103#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008104_ACEOF
8105
8106ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008107fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008108
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008109done
8110# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8111if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8113$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008114if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008116else
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121/* Override any GCC internal prototype to avoid an error.
8122 Use char because int might match the return type of a GCC
8123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008124#ifdef __cplusplus
8125extern "C"
8126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008127char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008128int
8129main ()
8130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 ;
8133 return 0;
8134}
8135_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008136for ac_lib in '' dir; do
8137 if test -z "$ac_lib"; then
8138 ac_res="none required"
8139 else
8140 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008141 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008143 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008146rm -f core conftest.err conftest.$ac_objext \
8147 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008148 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151done
Victor Stinnere0be4232011-10-25 13:06:09 +02008152if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154else
8155 ac_cv_search_opendir=no
8156fi
8157rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008158LIBS=$ac_func_search_save_LIBS
8159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8161$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008163if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008166fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008167
Michael W. Hudson54241132001-12-07 15:38:26 +00008168else
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8170$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008171if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008173else
8174 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008177
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178/* Override any GCC internal prototype to avoid an error.
8179 Use char because int might match the return type of a GCC
8180 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008181#ifdef __cplusplus
8182extern "C"
8183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008184char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008185int
8186main ()
8187{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008189 ;
8190 return 0;
8191}
8192_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008193for ac_lib in '' x; do
8194 if test -z "$ac_lib"; then
8195 ac_res="none required"
8196 else
8197 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008198 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008200 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008203rm -f core conftest.err conftest.$ac_objext \
8204 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008205 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008208done
Victor Stinnere0be4232011-10-25 13:06:09 +02008209if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008210
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211else
8212 ac_cv_search_opendir=no
8213fi
8214rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008215LIBS=$ac_func_search_save_LIBS
8216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8218$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008220if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008222
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008223fi
8224
8225fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008226
Matthias Kloseb9621712010-04-24 17:59:49 +00008227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8228$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008229if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008231else
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008233/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008234#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008235int
8236main ()
8237{
8238return makedev(0, 0);
8239 ;
8240 return 0;
8241}
8242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008243if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008244 ac_cv_header_sys_types_h_makedev=yes
8245else
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248rm -f core conftest.err conftest.$ac_objext \
8249 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008250
8251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8253$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008254
8255if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008256ac_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 +02008257if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008258
Matthias Kloseb9621712010-04-24 17:59:49 +00008259$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008260
8261fi
8262
8263
8264
8265 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008266 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 +02008267if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008268
Matthias Kloseb9621712010-04-24 17:59:49 +00008269$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008270
8271fi
8272
8273
8274 fi
8275fi
8276
Michael W. Hudson54241132001-12-07 15:38:26 +00008277
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008278# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8279# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8280SAVE_CFLAGS=$CFLAGS
8281CFLAGS="-std=c99 $CFLAGS"
8282for ac_header in bluetooth/bluetooth.h
8283do :
8284 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8285if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8286 cat >>confdefs.h <<_ACEOF
8287#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8288_ACEOF
8289
8290fi
8291
8292done
8293
8294CFLAGS=$SAVE_CFLAGS
8295
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008296# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8297for ac_header in net/if.h
8298do :
8299 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8300#ifdef STDC_HEADERS
8301# include <stdlib.h>
8302# include <stddef.h>
8303#else
8304# ifdef HAVE_STDLIB_H
8305# include <stdlib.h>
8306# endif
8307#endif
8308#ifdef HAVE_SYS_SOCKET_H
8309# include <sys/socket.h>
8310#endif
8311
8312"
Victor Stinnere0be4232011-10-25 13:06:09 +02008313if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008314 cat >>confdefs.h <<_ACEOF
8315#define HAVE_NET_IF_H 1
8316_ACEOF
8317
8318fi
8319
8320done
8321
8322
Martin v. Löwis11017b12006-01-14 18:12:57 +00008323# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008324for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008325do :
8326 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 +00008327#ifdef HAVE_ASM_TYPES_H
8328#include <asm/types.h>
8329#endif
8330#ifdef HAVE_SYS_SOCKET_H
8331#include <sys/socket.h>
8332#endif
8333
Matthias Kloseb9621712010-04-24 17:59:49 +00008334"
Victor Stinnere0be4232011-10-25 13:06:09 +02008335if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008336 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008337#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008338_ACEOF
8339
8340fi
8341
8342done
8343
8344
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008345# On Linux, qrtr.h requires asm/types.h
8346for ac_header in linux/qrtr.h
8347do :
8348 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8349#ifdef HAVE_ASM_TYPES_H
8350#include <asm/types.h>
8351#endif
8352#ifdef HAVE_SYS_SOCKET_H
8353#include <sys/socket.h>
8354#endif
8355
8356"
8357if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8358 cat >>confdefs.h <<_ACEOF
8359#define HAVE_LINUX_QRTR_H 1
8360_ACEOF
8361
8362fi
8363
8364done
8365
8366
caaveryeffc12f2017-09-06 18:18:10 -04008367for ac_header in linux/vm_sockets.h
8368do :
8369 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8370#ifdef HAVE_SYS_SOCKET_H
8371#include <sys/socket.h>
8372#endif
8373
8374"
8375if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8376 cat >>confdefs.h <<_ACEOF
8377#define HAVE_LINUX_VM_SOCKETS_H 1
8378_ACEOF
8379
8380fi
8381
8382done
8383
8384
karl ding360371f2020-04-29 15:31:19 -07008385# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8386for 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 +02008387do :
8388 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8389ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8390#ifdef HAVE_SYS_SOCKET_H
8391#include <sys/socket.h>
8392#endif
8393
8394"
8395if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8396 cat >>confdefs.h <<_ACEOF
8397#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8398_ACEOF
8399
8400fi
8401
8402done
8403
8404
Guido van Rossum627b2d71993-12-24 10:39:16 +00008405# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008406was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8408$as_echo_n "checking for clock_t in time.h... " >&6; }
8409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008410/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008411#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008412
8413_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008416 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008417else
Martin v. Löwis11437992002-04-12 09:54:03 +00008418
8419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008421
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008422
Guido van Rossum627b2d71993-12-24 10:39:16 +00008423fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008424rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008425
Matthias Kloseb9621712010-04-24 17:59:49 +00008426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8427$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008428
Matthias Kloseb9621712010-04-24 17:59:49 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8430$as_echo_n "checking for makedev... " >&6; }
8431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008432/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008433
Jesus Cea740f53a2010-04-28 11:35:30 +00008434#if defined(MAJOR_IN_MKDEV)
8435#include <sys/mkdev.h>
8436#elif defined(MAJOR_IN_SYSMACROS)
8437#include <sys/sysmacros.h>
8438#else
8439#include <sys/types.h>
8440#endif
8441
Neal Norwitz11690112002-07-30 01:08:28 +00008442int
8443main ()
8444{
Jesus Cea740f53a2010-04-28 11:35:30 +00008445
8446 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008447 ;
8448 return 0;
8449}
Matthias Kloseb159a552010-04-25 21:00:44 +00008450
Neal Norwitz11690112002-07-30 01:08:28 +00008451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008452if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008453 ac_cv_has_makedev=yes
8454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008457rm -f core conftest.err conftest.$ac_objext \
8458 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8460$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008461if test "$ac_cv_has_makedev" = "yes"; then
8462
Matthias Kloseb9621712010-04-24 17:59:49 +00008463$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008464
8465fi
8466
Christian Heimes985ecdc2013-11-20 11:46:18 +01008467# byte swapping
8468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8469$as_echo_n "checking for le64toh... " >&6; }
8470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8471/* end confdefs.h. */
8472
8473#ifdef HAVE_ENDIAN_H
8474#include <endian.h>
8475#elif defined(HAVE_SYS_ENDIAN_H)
8476#include <sys/endian.h>
8477#endif
8478
8479int
8480main ()
8481{
8482
8483 le64toh(1)
8484 ;
8485 return 0;
8486}
8487
8488_ACEOF
8489if ac_fn_c_try_link "$LINENO"; then :
8490 ac_cv_has_le64toh=yes
8491else
8492 ac_cv_has_le64toh=no
8493fi
8494rm -f core conftest.err conftest.$ac_objext \
8495 conftest$ac_exeext conftest.$ac_ext
8496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8497$as_echo "$ac_cv_has_le64toh" >&6; }
8498if test "$ac_cv_has_le64toh" = "yes"; then
8499
8500$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8501
8502fi
8503
Martin v. Löwis399a6892002-10-04 10:22:02 +00008504use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008505# Don't use largefile support for GNU/Hurd
8506case $ac_sys_system in GNU*)
8507 use_lfs=no
8508esac
8509
Martin v. Löwis399a6892002-10-04 10:22:02 +00008510if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008511# Two defines needed to enable largefile support on various platforms
8512# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008513case $ac_sys_system/$ac_sys_release in
8514AIX*)
8515
8516$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8517
8518 ;;
8519esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008520
Matthias Kloseb9621712010-04-24 17:59:49 +00008521$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008522
8523
Matthias Kloseb9621712010-04-24 17:59:49 +00008524$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008525
Martin v. Löwis399a6892002-10-04 10:22:02 +00008526fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008527
Guido van Rossum84e7b241996-08-19 21:59:00 +00008528# Add some code to confdefs.h so that the test for off_t works on SCO
8529cat >> confdefs.h <<\EOF
8530#if defined(SCO_DS)
8531#undef _OFF_T
8532#endif
8533EOF
8534
Guido van Rossumef2255b2000-03-10 22:30:29 +00008535# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008536ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008537if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008538
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008539else
Martin v. Löwis11437992002-04-12 09:54:03 +00008540
8541cat >>confdefs.h <<_ACEOF
8542#define mode_t int
8543_ACEOF
8544
8545fi
8546
Matthias Kloseb9621712010-04-24 17:59:49 +00008547ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008548if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008549
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008550else
Martin v. Löwis11437992002-04-12 09:54:03 +00008551
8552cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008554_ACEOF
8555
8556fi
8557
Matthias Kloseb9621712010-04-24 17:59:49 +00008558ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008559if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008560
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008561else
Martin v. Löwis11437992002-04-12 09:54:03 +00008562
8563cat >>confdefs.h <<_ACEOF
8564#define pid_t int
8565_ACEOF
8566
8567fi
8568
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008569
Martin v. Löwis11437992002-04-12 09:54:03 +00008570cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008571#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008572_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008573
Matthias Kloseb9621712010-04-24 17:59:49 +00008574ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008575if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008576
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008577else
Martin v. Löwis11437992002-04-12 09:54:03 +00008578
8579cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008581_ACEOF
8582
8583fi
8584
Matthias Kloseb9621712010-04-24 17:59:49 +00008585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8586$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008587if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008589else
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008591/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008592#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008593
8594_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008595if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008597 ac_cv_type_uid_t=yes
8598else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008599 ac_cv_type_uid_t=no
8600fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008601rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008602
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8605$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008606if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008607
Matthias Kloseb9621712010-04-24 17:59:49 +00008608$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008609
8610
Matthias Kloseb9621712010-04-24 17:59:49 +00008611$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008612
8613fi
8614
Mark Dickinson983bc162012-12-02 12:11:38 +00008615
Matthias Kloseb9621712010-04-24 17:59:49 +00008616ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008617if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618
Matthias Kloseb9621712010-04-24 17:59:49 +00008619$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008620
8621fi
8622
Stefan Krah1919b7e2012-03-21 18:25:23 +01008623ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8624if test "x$ac_cv_type___uint128_t" = xyes; then :
8625
8626$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8627
8628fi
8629
Jack Jansendd19cf82001-12-06 22:36:17 +00008630
Michael W. Hudson54241132001-12-07 15:38:26 +00008631# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008632# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633# The cast to long int works around a bug in the HP C Compiler
8634# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8635# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8636# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8638$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008639if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008641else
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 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 +00008643
Martin v. Löwis11437992002-04-12 09:54:03 +00008644else
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 if test "$ac_cv_type_int" = yes; then
8646 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008648as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008649See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 else
8651 ac_cv_sizeof_int=0
8652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008654
Martin v. Löwis11437992002-04-12 09:54:03 +00008655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8657$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658
8659
8660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008662#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008663_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008664
8665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666# The cast to long int works around a bug in the HP C Compiler
8667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8669# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8671$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008672if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008674else
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 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 +00008676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677else
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 if test "$ac_cv_type_long" = yes; then
8679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008681as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008682See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683 else
8684 ac_cv_sizeof_long=0
8685 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687
Martin v. Löwis11437992002-04-12 09:54:03 +00008688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8690$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691
8692
8693
Martin v. Löwis11437992002-04-12 09:54:03 +00008694cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008695#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008696_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008697
8698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699# The cast to long int works around a bug in the HP C Compiler
8700# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8701# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8702# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8704$as_echo_n "checking size of long long... " >&6; }
8705if ${ac_cv_sizeof_long_long+:} false; then :
8706 $as_echo_n "(cached) " >&6
8707else
8708 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8709
8710else
8711 if test "$ac_cv_type_long_long" = yes; then
8712 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8714as_fn_error 77 "cannot compute sizeof (long long)
8715See \`config.log' for more details" "$LINENO" 5; }
8716 else
8717 ac_cv_sizeof_long_long=0
8718 fi
8719fi
8720
8721fi
8722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8723$as_echo "$ac_cv_sizeof_long_long" >&6; }
8724
8725
8726
8727cat >>confdefs.h <<_ACEOF
8728#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8729_ACEOF
8730
8731
8732# The cast to long int works around a bug in the HP C Compiler
8733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8735# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8737$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 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 +00008742
Martin v. Löwis11437992002-04-12 09:54:03 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 if test "$ac_cv_type_void_p" = yes; then
8745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008747as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008748See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749 else
8750 ac_cv_sizeof_void_p=0
8751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753
Martin v. Löwis11437992002-04-12 09:54:03 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8756$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757
8758
8759
Martin v. Löwis11437992002-04-12 09:54:03 +00008760cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008761#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008762_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008763
8764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765# The cast to long int works around a bug in the HP C Compiler
8766# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8767# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8768# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8770$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008771if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 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 +00008775
Martin v. Löwis11437992002-04-12 09:54:03 +00008776else
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 if test "$ac_cv_type_short" = yes; then
8778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008780as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008781See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008782 else
8783 ac_cv_sizeof_short=0
8784 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786
Martin v. Löwis11437992002-04-12 09:54:03 +00008787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8789$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008790
8791
8792
Martin v. Löwis11437992002-04-12 09:54:03 +00008793cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008794#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008795_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008796
8797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798# The cast to long int works around a bug in the HP C Compiler
8799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8801# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8803$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008804if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008806else
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 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 +00008808
Martin v. Löwis11437992002-04-12 09:54:03 +00008809else
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 if test "$ac_cv_type_float" = yes; then
8811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008813as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008814See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815 else
8816 ac_cv_sizeof_float=0
8817 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008819
Martin v. Löwis11437992002-04-12 09:54:03 +00008820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8822$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823
8824
8825
Martin v. Löwis11437992002-04-12 09:54:03 +00008826cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008827#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008828_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008829
8830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831# The cast to long int works around a bug in the HP C Compiler
8832# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8833# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8834# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8836$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008837if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008839else
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 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 +00008841
Martin v. Löwis11437992002-04-12 09:54:03 +00008842else
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 if test "$ac_cv_type_double" = yes; then
8844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008846as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008847See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008848 else
8849 ac_cv_sizeof_double=0
8850 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008852
Martin v. Löwis11437992002-04-12 09:54:03 +00008853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8855$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856
8857
8858
Martin v. Löwis11437992002-04-12 09:54:03 +00008859cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008860#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008861_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008862
8863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864# The cast to long int works around a bug in the HP C Compiler
8865# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8866# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8867# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8869$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008870if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008871 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008872else
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 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 +00008874
Martin v. Löwis11437992002-04-12 09:54:03 +00008875else
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 if test "$ac_cv_type_fpos_t" = yes; then
8877 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008879as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008880See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881 else
8882 ac_cv_sizeof_fpos_t=0
8883 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008885
Martin v. Löwis11437992002-04-12 09:54:03 +00008886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8888$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008889
8890
8891
Martin v. Löwis11437992002-04-12 09:54:03 +00008892cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008893#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008894_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008895
Michael W. Hudson54241132001-12-07 15:38:26 +00008896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897# The cast to long int works around a bug in the HP C Compiler
8898# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8899# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8900# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8902$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008903if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008905else
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 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 +00008907
Martin v. Löwis18e16552006-02-15 17:27:45 +00008908else
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 if test "$ac_cv_type_size_t" = yes; then
8910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008912as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008913See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914 else
8915 ac_cv_sizeof_size_t=0
8916 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008918
Martin v. Löwis18e16552006-02-15 17:27:45 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8921$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008922
8923
8924
Martin v. Löwis18e16552006-02-15 17:27:45 +00008925cat >>confdefs.h <<_ACEOF
8926#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8927_ACEOF
8928
8929
Christian Heimes400adb02008-02-01 08:12:03 +00008930# The cast to long int works around a bug in the HP C Compiler
8931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8933# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8935$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008936if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008938else
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 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 +00008940
Christian Heimes400adb02008-02-01 08:12:03 +00008941else
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 if test "$ac_cv_type_pid_t" = yes; then
8943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008945as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008946See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008947 else
8948 ac_cv_sizeof_pid_t=0
8949 fi
8950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008951
Christian Heimes400adb02008-02-01 08:12:03 +00008952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8954$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008955
8956
8957
8958cat >>confdefs.h <<_ACEOF
8959#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8960_ACEOF
8961
8962
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008963# The cast to long int works around a bug in the HP C Compiler
8964# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8965# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8966# This bug is HP SR number 8606223364.
8967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8968$as_echo_n "checking size of uintptr_t... " >&6; }
8969if ${ac_cv_sizeof_uintptr_t+:} false; then :
8970 $as_echo_n "(cached) " >&6
8971else
8972 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8973
8974else
8975 if test "$ac_cv_type_uintptr_t" = yes; then
8976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8978as_fn_error 77 "cannot compute sizeof (uintptr_t)
8979See \`config.log' for more details" "$LINENO" 5; }
8980 else
8981 ac_cv_sizeof_uintptr_t=0
8982 fi
8983fi
8984
8985fi
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8987$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8988
8989
8990
8991cat >>confdefs.h <<_ACEOF
8992#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8993_ACEOF
8994
8995
Michael W. Hudson54241132001-12-07 15:38:26 +00008996
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008997
Eitan Adler3055c942018-05-15 22:58:09 -07008998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8999$as_echo_n "checking for long double... " >&6; }
9000if ${ac_cv_type_long_double+:} false; then :
9001 $as_echo_n "(cached) " >&6
9002else
9003 if test "$GCC" = yes; then
9004 ac_cv_type_long_double=yes
9005 else
9006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9007/* end confdefs.h. */
9008/* The Stardent Vistra knows sizeof (long double), but does
9009 not support it. */
9010 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009011int
9012main ()
9013{
Eitan Adler3055c942018-05-15 22:58:09 -07009014static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
9015 sizeof (double) <= sizeof (long double))];
9016test_array [0] = 0;
9017return test_array [0];
9018
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009019 ;
9020 return 0;
9021}
9022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009023if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07009024 ac_cv_type_long_double=yes
9025else
9026 ac_cv_type_long_double=no
9027fi
9028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9029 fi
9030fi
9031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
9032$as_echo "$ac_cv_type_long_double" >&6; }
9033 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009034
Matthias Kloseb9621712010-04-24 17:59:49 +00009035$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009036
Eitan Adler3055c942018-05-15 22:58:09 -07009037 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009038
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009039# The cast to long int works around a bug in the HP C Compiler
9040# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9041# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9042# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
9044$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009045if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009047else
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 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 +00009049
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009050else
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 if test "$ac_cv_type_long_double" = yes; then
9052 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009054as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009055See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009056 else
9057 ac_cv_sizeof_long_double=0
9058 fi
9059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009060
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9063$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009064
9065
9066
9067cat >>confdefs.h <<_ACEOF
9068#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9069_ACEOF
9070
9071
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009073# The cast to long int works around a bug in the HP C Compiler
9074# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9075# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9076# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9078$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009079if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00009081else
Matthias Kloseb9621712010-04-24 17:59:49 +00009082 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 +00009083
Thomas Woutersb2137042007-02-01 18:02:27 +00009084else
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 if test "$ac_cv_type__Bool" = yes; then
9086 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9087$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009088as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009089See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009090 else
9091 ac_cv_sizeof__Bool=0
9092 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009094
Thomas Woutersb2137042007-02-01 18:02:27 +00009095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9097$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009098
9099
9100
Thomas Woutersb2137042007-02-01 18:02:27 +00009101cat >>confdefs.h <<_ACEOF
9102#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9103_ACEOF
9104
9105
Thomas Woutersb2137042007-02-01 18:02:27 +00009106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009107# The cast to long int works around a bug in the HP C Compiler
9108# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9109# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9110# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9112$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009113if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009114 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009115else
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009117#ifdef HAVE_SYS_TYPES_H
9118#include <sys/types.h>
9119#endif
9120
Matthias Kloseb9621712010-04-24 17:59:49 +00009121"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009123else
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 if test "$ac_cv_type_off_t" = yes; then
9125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009127as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009128See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009129 else
9130 ac_cv_sizeof_off_t=0
9131 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009133
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9136$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009137
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009138
9139
Martin v. Löwis11437992002-04-12 09:54:03 +00009140cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009141#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009142_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009143
Michael W. Hudson54241132001-12-07 15:38:26 +00009144
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009145
Matthias Kloseb9621712010-04-24 17:59:49 +00009146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9147$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009148if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009149 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009152
Matthias Kloseb9621712010-04-24 17:59:49 +00009153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9154$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009155else
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009158fi
9159
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009160# The cast to long int works around a bug in the HP C Compiler
9161# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9162# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9163# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9165$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009166if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009167 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009168else
Matthias Kloseb9621712010-04-24 17:59:49 +00009169 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009170#ifdef HAVE_SYS_TYPES_H
9171#include <sys/types.h>
9172#endif
9173#ifdef HAVE_TIME_H
9174#include <time.h>
9175#endif
9176
Matthias Kloseb9621712010-04-24 17:59:49 +00009177"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009179else
Matthias Kloseb9621712010-04-24 17:59:49 +00009180 if test "$ac_cv_type_time_t" = yes; then
9181 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9182$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009183as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009184See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009185 else
9186 ac_cv_sizeof_time_t=0
9187 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009189
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9192$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009193
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009194
9195
Martin v. Löwis11437992002-04-12 09:54:03 +00009196cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009197#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009198_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009199
Michael W. Hudson54241132001-12-07 15:38:26 +00009200
9201
Trent Mick635f6fb2000-08-23 21:33:05 +00009202# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009203ac_save_cc="$CC"
9204if test "$ac_cv_kpthread" = "yes"
9205then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009206elif test "$ac_cv_kthread" = "yes"
9207then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009208elif test "$ac_cv_pthread" = "yes"
9209then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009210fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009211
Matthias Kloseb9621712010-04-24 17:59:49 +00009212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9213$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009214have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009216/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009217
9218 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009219int
9220main ()
9221{
Guido van Rossum12580492000-09-24 16:47:19 +00009222pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009223 ;
9224 return 0;
9225}
Matthias Kloseb159a552010-04-25 21:00:44 +00009226
Martin v. Löwis11437992002-04-12 09:54:03 +00009227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009228if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009229 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9233$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009234if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009235 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009236# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9237# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9238# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9240$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009241if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009242 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009243else
Matthias Kloseb9621712010-04-24 17:59:49 +00009244 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009245#ifdef HAVE_PTHREAD_H
9246#include <pthread.h>
9247#endif
9248
Matthias Kloseb9621712010-04-24 17:59:49 +00009249"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009250
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009251else
Matthias Kloseb9621712010-04-24 17:59:49 +00009252 if test "$ac_cv_type_pthread_t" = yes; then
9253 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9254$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009255as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009256See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009257 else
9258 ac_cv_sizeof_pthread_t=0
9259 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009261
Trent Mick635f6fb2000-08-23 21:33:05 +00009262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9264$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009265
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009266
9267
Martin v. Löwis11437992002-04-12 09:54:03 +00009268cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009269#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009270_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009271
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009272
Trent Mick635f6fb2000-08-23 21:33:05 +00009273fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009274
9275# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9276# This checking will be unnecessary after removing deprecated TLS API.
9277# The cast to long int works around a bug in the HP C Compiler
9278# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9279# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9280# This bug is HP SR number 8606223364.
9281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9282$as_echo_n "checking size of pthread_key_t... " >&6; }
9283if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9284 $as_echo_n "(cached) " >&6
9285else
9286 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9287"; then :
9288
9289else
9290 if test "$ac_cv_type_pthread_key_t" = yes; then
9291 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9292$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9293as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9294See \`config.log' for more details" "$LINENO" 5; }
9295 else
9296 ac_cv_sizeof_pthread_key_t=0
9297 fi
9298fi
9299
9300fi
9301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9302$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9303
9304
9305
9306cat >>confdefs.h <<_ACEOF
9307#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9308_ACEOF
9309
9310
9311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9312$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9313if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9315/* end confdefs.h. */
9316#include <pthread.h>
9317int
9318main ()
9319{
9320pthread_key_t k; k * 1;
9321 ;
9322 return 0;
9323}
9324_ACEOF
9325if ac_fn_c_try_compile "$LINENO"; then :
9326 ac_pthread_key_t_is_arithmetic_type=yes
9327else
9328 ac_pthread_key_t_is_arithmetic_type=no
9329
9330fi
9331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9333$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9334 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9335
9336$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9337
9338 fi
9339else
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9341$as_echo "no" >&6; }
9342fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009343CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009344
Michael W. Hudson54241132001-12-07 15:38:26 +00009345
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009346case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009347 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009348 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9349 ;;
9350 Darwin/*)
9351 OTHER_LIBTOOL_OPT=""
9352 ;;
9353esac
9354
9355
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009356
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009357case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009358 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009359 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9360 if test "${enable_universalsdk}"; then
9361 :
9362 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009363 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009364 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009365 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009366 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009367 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009368 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009369 if test ${gcc_version} '<' 4.0
9370 then
9371 LIBTOOL_CRUFT="-lcc_dynamic"
9372 else
9373 LIBTOOL_CRUFT=""
9374 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009375 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009376 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009377else
Matthias Kloseb9621712010-04-24 17:59:49 +00009378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009379/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009380
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009381 #include <unistd.h>
9382 int main(int argc, char*argv[])
9383 {
9384 if (sizeof(long) == 4) {
9385 return 0;
9386 } else {
9387 return 1;
9388 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009389 }
9390
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009392if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009393 ac_osx_32bit=yes
9394else
Matthias Kloseb9621712010-04-24 17:59:49 +00009395 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9398 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009399fi
9400
9401
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009402 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009403 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009404 i386)
9405 MACOSX_DEFAULT_ARCH="i386"
9406 ;;
9407 ppc)
9408 MACOSX_DEFAULT_ARCH="ppc"
9409 ;;
9410 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009411 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009412 ;;
9413 esac
9414 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009415 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009416 i386)
9417 MACOSX_DEFAULT_ARCH="x86_64"
9418 ;;
9419 ppc)
9420 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +01009421 ;;
9422 arm64)
9423 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009424 ;;
9425 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009426 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009427 ;;
9428 esac
9429
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009430 fi
9431
9432 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009433 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009434 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009435esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9437$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009438if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009439then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009440 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009442 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009443
Matthias Kloseb9621712010-04-24 17:59:49 +00009444$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009445
Matthias Kloseb9621712010-04-24 17:59:49 +00009446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9447$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009448 if test $enable_shared = "yes"
9449 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009450 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 +00009451 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009452else
Matthias Kloseb9621712010-04-24 17:59:49 +00009453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9454$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009455fi
9456
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9458$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009459case $ac_sys_system/$ac_sys_release in
9460 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009461
Matthias Kloseb9621712010-04-24 17:59:49 +00009462$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009463
Matthias Kloseb9621712010-04-24 17:59:49 +00009464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9465$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009466 ;;
9467 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9469$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009470 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009471esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009472
Guido van Rossum0a516c91994-09-12 10:58:40 +00009473# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474
Michael W. Hudson54241132001-12-07 15:38:26 +00009475
9476
9477
9478
Benjamin Peterson99f03762010-04-11 22:15:28 +00009479
Thomas Wouters477c8d52006-05-27 19:21:47 +00009480
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009481# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9482# -- usually .so, .sl on HP-UX, .dll on Cygwin
9483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9484$as_echo_n "checking the extension of shared libraries... " >&6; }
9485if test -z "$SHLIB_SUFFIX"; then
9486 case $ac_sys_system in
9487 hp*|HP*)
9488 case `uname -m` in
9489 ia64) SHLIB_SUFFIX=.so;;
9490 *) SHLIB_SUFFIX=.sl;;
9491 esac
9492 ;;
9493 CYGWIN*) SHLIB_SUFFIX=.dll;;
9494 *) SHLIB_SUFFIX=.so;;
9495 esac
9496fi
9497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9498$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009499
Guido van Rossum0a516c91994-09-12 10:58:40 +00009500# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009501# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009502# (Shared libraries in this instance are shared modules to be loaded into
9503# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9505$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009506if test -z "$LDSHARED"
9507then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009508 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009509 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009510 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009511 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009512 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009514 if test "$GCC" = "yes" ; then
9515 LDSHARED='$(CC) -shared'
9516 LDCXXSHARED='$(CXX) -shared'
9517 else
9518 LDSHARED='$(CC) -G'
9519 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009520 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009521 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009522 if test "$GCC" = "yes" ; then
9523 LDSHARED='$(CC) -shared'
9524 LDCXXSHARED='$(CXX) -shared'
9525 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009526 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009527 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009528 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009529 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009530 LDSHARED='$(CC) -bundle'
9531 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009532 if test "$enable_framework" ; then
9533 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009534 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9535 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009536 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009537 else
9538 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009539 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009540 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009541 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009542 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009543 LDSHARED='$(CC) -bundle'
9544 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009545 if test "$enable_framework" ; then
9546 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009547 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9548 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009549 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009550 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009551 # No framework, use the Python app as bundle-loader
9552 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009553 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009554 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009555 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009556 Darwin/*)
9557 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9558 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009559
Ned Deily36820b62014-06-25 13:44:22 -07009560 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9561 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9562 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9563 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9564 if test ${dep_target_major} -eq 10 && \
9565 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009566 then
Ned Deily36820b62014-06-25 13:44:22 -07009567 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009568 LDSHARED='$(CC) -bundle'
9569 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009570 if test "$enable_framework" ; then
9571 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009572 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9573 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009574 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009575 else
9576 # No framework, use the Python app as bundle-loader
9577 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9578 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009579 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009580 fi
Ned Deily36820b62014-06-25 13:44:22 -07009581 else
9582 # building for OS X 10.3 and later
9583 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9584 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9585 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009586 fi
9587 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009588 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009589 LDSHARED='$(CC) -shared'
9590 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009591 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009592 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009593 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009594 LDSHARED='$(CC) -shared'
9595 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009596 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009597 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009598 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009599 OpenBSD*)
9600 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9601 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009602 LDSHARED='$(CC) -shared $(CCSHARED)'
9603 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009604 else
9605 case `uname -r` in
9606 [01].* | 2.[0-7] | 2.[0-7].*)
9607 LDSHARED="ld -Bshareable ${LDFLAGS}"
9608 ;;
9609 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009610 LDSHARED='$(CC) -shared $(CCSHARED)'
9611 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009612 ;;
9613 esac
9614 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009615 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009616 LDSHARED='$(CC) -shared'
9617 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009618 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009619 if test "$GCC" = "yes" ; then
9620 LDSHARED='$(CC) -shared'
9621 LDCXXSHARED='$(CXX) -shared'
9622 else
9623 LDSHARED='$(CC) -G'
9624 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009625 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009626 SCO_SV*)
9627 LDSHARED='$(CC) -Wl,-G,-Bexport'
9628 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9629 CYGWIN*)
9630 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9631 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009632 *) LDSHARED="ld";;
9633 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9636$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009637LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009638BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009639# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009640# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9642$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009643if test -z "$CCSHARED"
9644then
Guido van Rossum07397971997-04-29 21:49:50 +00009645 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009646 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009647 then CCSHARED="-fPIC";
9648 elif test `uname -p` = sparc;
9649 then CCSHARED="-xcode=pic32";
9650 else CCSHARED="-Kpic";
9651 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009652 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009653 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009654 else CCSHARED="+z";
9655 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009656 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009657 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009658 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009659 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009660 if test "$GCC" = "yes"
9661 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009662 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009663 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009664 SCO_SV*)
9665 if test "$GCC" = "yes"
9666 then CCSHARED="-fPIC"
9667 else CCSHARED="-Kpic -belf"
9668 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009669 VxWorks*)
9670 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009671 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9674$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009675# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009676# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9678$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009679if test -z "$LINKFORSHARED"
9680then
Guido van Rossum07397971997-04-29 21:49:50 +00009681 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009682 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009683 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009684 LINKFORSHARED="-Wl,-E -Wl,+s";;
9685# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009686 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009687 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009688 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009690 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009691
9692 # Issue #18075: the default maximum stack size (8MBytes) is too
9693 # small for the default recursion limit. Increase the stack size
9694 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009695 # Note: This matches the value of THREAD_STACK_SIZE in
9696 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009697 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9698
Jack Jansene578a632001-08-15 01:27:14 +00009699 if test "$enable_framework"
9700 then
Jack Jansenda49e192005-01-07 13:08:22 +00009701 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009702 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009703 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009704 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009705 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009706 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009707 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009708 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9709 then
9710 LINKFORSHARED="-Wl,--export-dynamic"
9711 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009712 SunOS/5*) case $CC in
9713 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009714 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009715 then
9716 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009717 fi;;
9718 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009719 CYGWIN*)
9720 if test $enable_shared = "no"
9721 then
9722 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9723 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009724 QNX*)
9725 # -Wl,-E causes the symbols to be added to the dynamic
9726 # symbol table so that they can be found when a module
9727 # is loaded. -N 2048K causes the stack size to be set
9728 # to 2048 kilobytes so that the stack doesn't overflow
9729 # when running test_compile.py.
9730 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009731 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +08009732 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009733 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9736$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009737
Michael W. Hudson54241132001-12-07 15:38:26 +00009738
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009739
Matthias Kloseb9621712010-04-24 17:59:49 +00009740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9741$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009742if test ! "$LIBRARY" = "$LDLIBRARY"
9743then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009744 case $ac_sys_system in
9745 CYGWIN*)
9746 # Cygwin needs CCSHARED when building extension DLLs
9747 # but not when building the interpreter DLL.
9748 CFLAGSFORSHARED='';;
9749 *)
9750 CFLAGSFORSHARED='$(CCSHARED)'
9751 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9754$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009755
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009756# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9757# library (with --enable-shared).
9758# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009759# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9760# if it is not required, since it creates a dependency of the shared library
9761# to LIBS. This, in turn, means that applications linking the shared libpython
9762# don't need to link LIBS explicitly. The default should be only changed
9763# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009764
Matthias Kloseb9621712010-04-24 17:59:49 +00009765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9766$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009767case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009768 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009769 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009770esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9772$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009773
9774
Guido van Rossum627b2d71993-12-24 10:39:16 +00009775# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9777$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009778if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009779 $as_echo_n "(cached) " >&6
9780else
9781 ac_check_lib_save_LIBS=$LIBS
9782LIBS="-lsendfile $LIBS"
9783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9784/* end confdefs.h. */
9785
9786/* Override any GCC internal prototype to avoid an error.
9787 Use char because int might match the return type of a GCC
9788 builtin and then its argument prototype would still apply. */
9789#ifdef __cplusplus
9790extern "C"
9791#endif
9792char sendfile ();
9793int
9794main ()
9795{
9796return sendfile ();
9797 ;
9798 return 0;
9799}
9800_ACEOF
9801if ac_fn_c_try_link "$LINENO"; then :
9802 ac_cv_lib_sendfile_sendfile=yes
9803else
9804 ac_cv_lib_sendfile_sendfile=no
9805fi
9806rm -f core conftest.err conftest.$ac_objext \
9807 conftest$ac_exeext conftest.$ac_ext
9808LIBS=$ac_check_lib_save_LIBS
9809fi
9810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9811$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009812if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009813 cat >>confdefs.h <<_ACEOF
9814#define HAVE_LIBSENDFILE 1
9815_ACEOF
9816
9817 LIBS="-lsendfile $LIBS"
9818
9819fi
9820
Matthias Kloseb9621712010-04-24 17:59:49 +00009821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9822$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009823if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009825else
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009827LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831/* Override any GCC internal prototype to avoid an error.
9832 Use char because int might match the return type of a GCC
9833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009834#ifdef __cplusplus
9835extern "C"
9836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009837char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009838int
9839main ()
9840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ;
9843 return 0;
9844}
9845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009846if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009848else
Matthias Kloseb9621712010-04-24 17:59:49 +00009849 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009851rm -f core conftest.err conftest.$ac_objext \
9852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009853LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9856$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009857if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 cat >>confdefs.h <<_ACEOF
9859#define HAVE_LIBDL 1
9860_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009861
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009862 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009863
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009864fi
9865 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9867$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009868if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009870else
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009872LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876/* Override any GCC internal prototype to avoid an error.
9877 Use char because int might match the return type of a GCC
9878 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009879#ifdef __cplusplus
9880extern "C"
9881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009882char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009883int
9884main ()
9885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 ;
9888 return 0;
9889}
9890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009893else
Matthias Kloseb9621712010-04-24 17:59:49 +00009894 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009896rm -f core conftest.err conftest.$ac_objext \
9897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009898LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9901$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009902if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 cat >>confdefs.h <<_ACEOF
9904#define HAVE_LIBDLD 1
9905_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009906
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009907 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009908
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009909fi
9910 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009911
Michael Felt0d3ccb42017-12-30 22:39:20 +01009912# checks for uuid.h location
9913for ac_header in uuid/uuid.h uuid.h
9914do :
9915 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9916ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9917if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9918 cat >>confdefs.h <<_ACEOF
9919#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9920_ACEOF
9921
9922fi
9923
9924done
9925
9926
Berker Peksag9a10ff42017-11-08 23:09:16 +03009927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9928$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9930/* end confdefs.h. */
9931#include <uuid/uuid.h>
9932int
9933main ()
9934{
9935
9936#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009937void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009938#endif
9939
9940 ;
9941 return 0;
9942}
9943_ACEOF
9944if ac_fn_c_try_compile "$LINENO"; then :
9945
9946$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9947
9948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9949$as_echo "yes" >&6; }
9950else
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9952$as_echo "no" >&6; }
9953
9954fi
9955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9956
Michael Felt0d3ccb42017-12-30 22:39:20 +01009957# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009958# FreeBSD and OpenBSD provides support as well
9959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9960$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9962/* end confdefs.h. */
9963#include <uuid.h>
9964int
9965main ()
9966{
9967
9968#ifndef uuid_create
9969void *x = uuid_create
9970#endif
9971
9972 ;
9973 return 0;
9974}
9975_ACEOF
9976if ac_fn_c_try_compile "$LINENO"; then :
9977
9978$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9979
9980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9981$as_echo "yes" >&6; }
9982else
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984$as_echo "no" >&6; }
9985
9986fi
9987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9988
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009989# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9990# stream in big-endian byte-order
9991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9992$as_echo_n "checking for uuid_enc_be... " >&6; }
9993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9994/* end confdefs.h. */
9995#include <uuid.h>
9996int
9997main ()
9998{
9999
10000#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040010001void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010002#endif
10003
10004 ;
10005 return 0;
10006}
10007_ACEOF
10008if ac_fn_c_try_compile "$LINENO"; then :
10009
10010$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
10011
10012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10013$as_echo "yes" >&6; }
10014else
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10016$as_echo "no" >&6; }
10017
10018fi
10019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10020
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010021# 'Real Time' functions on Solaris
10022# posix4 on Solaris 2.6
10023# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +030010024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010025$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010026if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010028else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010029 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000010030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010033/* Override any GCC internal prototype to avoid an error.
10034 Use char because int might match the return type of a GCC
10035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010036#ifdef __cplusplus
10037extern "C"
10038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010039char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010040int
10041main ()
10042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010043return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010044 ;
10045 return 0;
10046}
10047_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048for ac_lib in '' pthread rt posix4; do
10049 if test -z "$ac_lib"; then
10050 ac_res="none required"
10051 else
10052 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010053 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010054 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010055 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000010057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010058rm -f core conftest.err conftest.$ac_objext \
10059 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +020010060 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010061 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063done
Victor Stinnere0be4232011-10-25 13:06:09 +020010064if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066else
10067 ac_cv_search_sem_init=no
10068fi
10069rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010070LIBS=$ac_func_search_save_LIBS
10071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10073$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +000010075if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010076 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010077
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010078fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010079
Martin v. Löwis519adae2003-09-20 10:47:47 +000010080
Martin v. Löwis19d17342003-06-14 21:03:05 +000010081# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +000010082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10083$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010084if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010085 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000010086else
10087 ac_check_lib_save_LIBS=$LIBS
10088LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010090/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092/* Override any GCC internal prototype to avoid an error.
10093 Use char because int might match the return type of a GCC
10094 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010095#ifdef __cplusplus
10096extern "C"
10097#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010098char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010099int
10100main ()
10101{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010103 ;
10104 return 0;
10105}
10106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010107if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010108 ac_cv_lib_intl_textdomain=yes
10109else
Matthias Kloseb9621712010-04-24 17:59:49 +000010110 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010112rm -f core conftest.err conftest.$ac_objext \
10113 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010114LIBS=$ac_check_lib_save_LIBS
10115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10117$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010118if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010119
Matthias Kloseb9621712010-04-24 17:59:49 +000010120$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010121
Brett Cannonc6d936e2009-06-07 20:09:53 +000010122 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010123fi
10124
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010125
10126# checks for system dependent C++ extensions support
10127case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10129$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010131/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010132
Georg Brandl59e87bd2011-02-15 19:48:59 +000010133 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010134int
10135main ()
10136{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010137loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010138 ;
10139 return 0;
10140}
Matthias Kloseb159a552010-04-25 21:00:44 +000010141
Martin v. Löwis11437992002-04-12 09:54:03 +000010142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010143if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010144
Matthias Kloseb159a552010-04-25 21:00:44 +000010145
Matthias Kloseb9621712010-04-24 17:59:49 +000010146$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010147
Matthias Kloseb159a552010-04-25 21:00:44 +000010148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010149$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010150
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010151else
Matthias Kloseb159a552010-04-25 21:00:44 +000010152
10153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010154$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010155
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010157rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010158 conftest$ac_exeext conftest.$ac_ext
10159# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10160# of the AIX system used to build/package Python executable. This tag serves
10161# as a baseline for bdist module packages
10162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10163$as_echo_n "checking for the system builddate... " >&6; }
10164 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10165
10166cat >>confdefs.h <<_ACEOF
10167#define AIX_BUILDDATE $AIX_BUILDDATE
10168_ACEOF
10169
10170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10171$as_echo "$AIX_BUILDDATE" >&6; }
10172 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010173 *) ;;
10174esac
10175
Christian Heimes985ecdc2013-11-20 11:46:18 +010010176# check for systems that require aligned memory access
10177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10178$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010179if ${ac_cv_aligned_required+:} false; then :
10180 $as_echo_n "(cached) " >&6
10181else
10182 if test "$cross_compiling" = yes; then :
10183 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010184else
10185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10186/* end confdefs.h. */
10187
10188int main()
10189{
10190 char s[16];
10191 int i, *p1, *p2;
10192 for (i=0; i < 16; i++)
10193 s[i] = i;
10194 p1 = (int*)(s+1);
10195 p2 = (int*)(s+2);
10196 if (*p1 == *p2)
10197 return 1;
10198 return 0;
10199}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010200_ACEOF
10201if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010202 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010203else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010204 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010205fi
10206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10207 conftest.$ac_objext conftest.beam conftest.$ac_ext
10208fi
10209
10210
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010211fi
10212
10213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10214$as_echo "$ac_cv_aligned_required" >&6; }
10215if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010216
10217$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10218
10219fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010220
10221# str, bytes and memoryview hash algorithm
10222
10223
10224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10225$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10226
10227# Check whether --with-hash_algorithm was given.
10228if test "${with_hash_algorithm+set}" = set; then :
10229 withval=$with_hash_algorithm;
10230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10231$as_echo "$withval" >&6; }
10232case "$withval" in
10233 siphash24)
10234 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10235
10236 ;;
10237 fnv)
10238 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10239
10240 ;;
10241 *)
10242 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10243 ;;
10244esac
10245
10246else
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10248$as_echo "default" >&6; }
10249fi
10250
10251
Paul Ganssle62972d92020-05-16 04:20:06 -040010252validate_tzpath() {
10253 # Checks that each element of hte path is an absolute path
10254 if test -z "$1"; then
10255 # Empty string is allowed: it indicates no system TZPATH
10256 return 0
10257 fi
10258
10259 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050010260 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040010261 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10262 return 1;
10263 fi
10264}
10265
10266TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10268$as_echo_n "checking for --with-tzpath... " >&6; }
10269
10270# Check whether --with-tzpath was given.
10271if test "${with_tzpath+set}" = set; then :
10272 withval=$with_tzpath;
10273case "$withval" in
10274 yes)
10275 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10276 ;;
10277 *)
10278 validate_tzpath "$withval"
10279 TZPATH="$withval"
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10281$as_echo "\"$withval\"" >&6; }
10282 ;;
10283esac
10284
10285else
10286 validate_tzpath "$TZPATH"
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10288$as_echo "\"$TZPATH\"" >&6; }
10289fi
10290
10291
10292
Charles-François Natalid30b0222014-05-08 23:08:51 +010010293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10294$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10295
10296# Check whether --with-address_sanitizer was given.
10297if test "${with_address_sanitizer+set}" = set; then :
10298 withval=$with_address_sanitizer;
10299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10300$as_echo "$withval" >&6; }
10301BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10302LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010303# ASan works by controlling memory allocation, our own malloc interferes.
10304with_pymalloc="no"
10305
10306else
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10308$as_echo "no" >&6; }
10309fi
10310
10311
10312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10313$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10314
10315# Check whether --with-memory_sanitizer was given.
10316if test "${with_memory_sanitizer+set}" = set; then :
10317 withval=$with_memory_sanitizer;
10318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10319$as_echo "$withval" >&6; }
10320BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10321LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10322# MSan works by controlling memory allocation, our own malloc interferes.
10323with_pymalloc="no"
10324
10325else
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10327$as_echo "no" >&6; }
10328fi
10329
10330
10331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10332$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10333
10334# Check whether --with-undefined_behavior_sanitizer was given.
10335if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10336 withval=$with_undefined_behavior_sanitizer;
10337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10338$as_echo "$withval" >&6; }
10339BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10340LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010341
10342else
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10344$as_echo "no" >&6; }
10345fi
10346
10347
Guido van Rossum70c7f481998-03-26 18:44:10 +000010348# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10350$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010351if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010353else
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010355LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359/* Override any GCC internal prototype to avoid an error.
10360 Use char because int might match the return type of a GCC
10361 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010362#ifdef __cplusplus
10363extern "C"
10364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010365char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010366int
10367main ()
10368{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010369return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 ;
10371 return 0;
10372}
10373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010374if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010376else
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010379rm -f core conftest.err conftest.$ac_objext \
10380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010381LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10384$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010385if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010386 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010387fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010388 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10390$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010391if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010393else
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010395LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010399/* Override any GCC internal prototype to avoid an error.
10400 Use char because int might match the return type of a GCC
10401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010402#ifdef __cplusplus
10403extern "C"
10404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010405char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010406int
10407main ()
10408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 ;
10411 return 0;
10412}
10413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010416else
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010419rm -f core conftest.err conftest.$ac_objext \
10420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010421LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10424$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010425if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010426 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010427fi
10428 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010429
Matthias Kloseb9621712010-04-24 17:59:49 +000010430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10431$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010433# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010434if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010435 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10437$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010438LIBS="$withval $LIBS"
10439
10440else
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010443fi
10444
Guido van Rossum7f43da71994-08-01 12:15:30 +000010445
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010446
10447
10448
10449
10450
10451
Victor Stinnerb477d192020-01-22 22:48:16 +010010452
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010453if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10454 if test -n "$ac_tool_prefix"; then
10455 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10456set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10458$as_echo_n "checking for $ac_word... " >&6; }
10459if ${ac_cv_path_PKG_CONFIG+:} false; then :
10460 $as_echo_n "(cached) " >&6
10461else
10462 case $PKG_CONFIG in
10463 [\\/]* | ?:[\\/]*)
10464 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10465 ;;
10466 *)
10467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10468for as_dir in $PATH
10469do
10470 IFS=$as_save_IFS
10471 test -z "$as_dir" && as_dir=.
10472 for ac_exec_ext in '' $ac_executable_extensions; do
10473 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10474 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10475 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10476 break 2
10477 fi
10478done
10479 done
10480IFS=$as_save_IFS
10481
10482 ;;
10483esac
10484fi
10485PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10486if test -n "$PKG_CONFIG"; then
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10488$as_echo "$PKG_CONFIG" >&6; }
10489else
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10491$as_echo "no" >&6; }
10492fi
10493
10494
10495fi
10496if test -z "$ac_cv_path_PKG_CONFIG"; then
10497 ac_pt_PKG_CONFIG=$PKG_CONFIG
10498 # Extract the first word of "pkg-config", so it can be a program name with args.
10499set dummy pkg-config; ac_word=$2
10500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10501$as_echo_n "checking for $ac_word... " >&6; }
10502if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10503 $as_echo_n "(cached) " >&6
10504else
10505 case $ac_pt_PKG_CONFIG in
10506 [\\/]* | ?:[\\/]*)
10507 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10508 ;;
10509 *)
10510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10511for as_dir in $PATH
10512do
10513 IFS=$as_save_IFS
10514 test -z "$as_dir" && as_dir=.
10515 for ac_exec_ext in '' $ac_executable_extensions; do
10516 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10517 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10518 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10519 break 2
10520 fi
10521done
10522 done
10523IFS=$as_save_IFS
10524
10525 ;;
10526esac
10527fi
10528ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10529if test -n "$ac_pt_PKG_CONFIG"; then
10530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10531$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10532else
10533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10534$as_echo "no" >&6; }
10535fi
10536
10537 if test "x$ac_pt_PKG_CONFIG" = x; then
10538 PKG_CONFIG=""
10539 else
10540 case $cross_compiling:$ac_tool_warned in
10541yes:)
10542{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10543$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10544ac_tool_warned=yes ;;
10545esac
10546 PKG_CONFIG=$ac_pt_PKG_CONFIG
10547 fi
10548else
10549 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10550fi
10551
10552fi
10553if test -n "$PKG_CONFIG"; then
10554 _pkg_min_version=0.9.0
10555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10556$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10557 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10559$as_echo "yes" >&6; }
10560 else
10561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563 PKG_CONFIG=""
10564 fi
10565fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010566
10567# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10569$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010570
10571# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010572if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010573 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010574else
10575 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010576fi
10577
10578
Matthias Kloseb9621712010-04-24 17:59:49 +000010579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10580$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010581
10582# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10584$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010585
10586# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010587if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010588 withval=$with_system_ffi;
10589fi
10590
10591
Zachary Waref40d4dd2016-09-17 01:25:24 -050010592if test "$ac_sys_system" = "Darwin"
10593then
10594 case "$with_system_ffi" in
10595 "")
10596 with_system_ffi="no"
10597 ;;
10598 yes|no)
10599 ;;
10600 *)
10601 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10602 ;;
10603 esac
10604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10605$as_echo "$with_system_ffi" >&6; }
10606else
10607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10608$as_echo "yes" >&6; }
10609 if test "$with_system_ffi" != ""
10610 then
10611 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10612$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10613 fi
10614 with_system_ffi="yes"
10615fi
Zachary Ware935043d2016-09-09 17:01:21 -070010616
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010617if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010618 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10619else
10620 LIBFFI_INCLUDEDIR=""
10621fi
10622
10623
Stefan Krah60187b52012-03-23 19:06:27 +010010624# Check for use of the system libmpdec library
10625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10626$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10627
10628# Check whether --with-system_libmpdec was given.
10629if test "${with_system_libmpdec+set}" = set; then :
10630 withval=$with_system_libmpdec;
10631else
10632 with_system_libmpdec="no"
10633fi
10634
10635
10636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10637$as_echo "$with_system_libmpdec" >&6; }
10638
Stefan Krah815280e2020-02-29 19:43:42 +010010639# Check whether _decimal should use a coroutine-local or thread-local context
10640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10641$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10642
10643# Check whether --with-decimal_contextvar was given.
10644if test "${with_decimal_contextvar+set}" = set; then :
10645 withval=$with_decimal_contextvar;
10646else
10647 with_decimal_contextvar="yes"
10648fi
10649
10650
10651if test "$with_decimal_contextvar" != "no"
10652then
10653
10654$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10655
10656fi
10657
10658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10659$as_echo "$with_decimal_contextvar" >&6; }
10660
Benjamin Peterson076ed002010-10-31 17:11:02 +000010661# Check for support for loadable sqlite extensions
10662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10663$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10664# Check whether --enable-loadable-sqlite-extensions was given.
10665if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10666 enableval=$enable_loadable_sqlite_extensions;
10667else
10668 enable_loadable_sqlite_extensions="no"
10669fi
10670
10671
10672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10673$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10674
Ned Deilyd819b932013-09-06 01:07:05 -070010675# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10676
10677
10678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10679$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10680
10681# Check whether --with-tcltk-includes was given.
10682if test "${with_tcltk_includes+set}" = set; then :
10683 withval=$with_tcltk_includes;
10684else
10685 with_tcltk_includes="default"
10686fi
10687
10688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10689$as_echo "$with_tcltk_includes" >&6; }
10690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10691$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10692
10693# Check whether --with-tcltk-libs was given.
10694if test "${with_tcltk_libs+set}" = set; then :
10695 withval=$with_tcltk_libs;
10696else
10697 with_tcltk_libs="default"
10698fi
10699
10700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10701$as_echo "$with_tcltk_libs" >&6; }
10702if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10703then
10704 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10705 then
10706 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10707 fi
10708 TCLTK_INCLUDES=""
10709 TCLTK_LIBS=""
10710else
10711 TCLTK_INCLUDES="$with_tcltk_includes"
10712 TCLTK_LIBS="$with_tcltk_libs"
10713fi
10714
Matthias Klose55708cc2009-04-30 08:06:49 +000010715# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10717$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010718
10719# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010720if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010721 withval=$with_dbmliborder;
10722if test x$with_dbmliborder = xyes
10723then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010724as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010725else
10726 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10727 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10728 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010729 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010730 fi
10731 done
10732fi
10733fi
10734
Matthias Kloseb9621712010-04-24 17:59:49 +000010735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10736$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010737
Martin v. Löwis11437992002-04-12 09:54:03 +000010738# Templates for things AC_DEFINEd more than once.
10739# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010740
10741
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010742if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010743then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010744 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010746
10747 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010748 if test "$ac_sys_system" = "SunOS"; then
10749 CFLAGS="$CFLAGS -D_REENTRANT"
10750 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010751elif test "$ac_cv_kpthread" = "yes"
10752then
10753 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010754 if test "$ac_cv_cxx_thread" = "yes"; then
10755 CXX="$CXX -Kpthread"
10756 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010757 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010758elif test "$ac_cv_kthread" = "yes"
10759then
10760 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010761 if test "$ac_cv_cxx_thread" = "yes"; then
10762 CXX="$CXX -Kthread"
10763 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010764 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010765elif test "$ac_cv_pthread" = "yes"
10766then
10767 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010768 if test "$ac_cv_cxx_thread" = "yes"; then
10769 CXX="$CXX -pthread"
10770 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010771 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010772else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010773 if test ! -z "$withval" -a -d "$withval"
10774 then LDFLAGS="$LDFLAGS -L$withval"
10775 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010776
10777 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010778 # define _POSIX_THREADS in unistd.h. Some apparently don't
10779 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10781$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010784
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010785#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010786#ifdef _POSIX_THREADS
10787yes
10788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010789
10790_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010793 unistd_defines_pthreads=yes
10794else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010795 unistd_defines_pthreads=no
10796fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010797rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010798
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10800$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010801
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010803
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010804 # Just looking for pthread_create in libpthread is not enough:
10805 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10806 # So we really have to include pthread.h, and then link.
10807 _libs=$LIBS
10808 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10810$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010812/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010813
10814#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010815#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010816
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010817void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010818int
10819main ()
10820{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010821
10822pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010823 ;
10824 return 0;
10825}
10826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010827if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10830$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010831 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010832
Guido van Rossum02a1c402000-02-25 19:26:31 +000010833else
Martin v. Löwis11437992002-04-12 09:54:03 +000010834
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010835 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010837if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010838
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010839 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010840
Guido van Rossumad678af1998-10-02 14:42:15 +000010841else
Guido van Rossumad678af1998-10-02 14:42:15 +000010842
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10844$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010845if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010847else
Martin v. Löwis11437992002-04-12 09:54:03 +000010848 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010849LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010853/* Override any GCC internal prototype to avoid an error.
10854 Use char because int might match the return type of a GCC
10855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010856#ifdef __cplusplus
10857extern "C"
10858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010859char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010860int
10861main ()
10862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010863return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010864 ;
10865 return 0;
10866}
10867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010868if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010869 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010870else
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010873rm -f core conftest.err conftest.$ac_objext \
10874 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010875LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10878$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010879if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010880
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010881 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010882 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010883
Greg Steinadf63d62000-07-05 10:38:09 +000010884else
Greg Steinadf63d62000-07-05 10:38:09 +000010885
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10887$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010888if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010890else
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010892LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010896/* Override any GCC internal prototype to avoid an error.
10897 Use char because int might match the return type of a GCC
10898 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010899#ifdef __cplusplus
10900extern "C"
10901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010902char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010903int
10904main ()
10905{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010906return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 ;
10908 return 0;
10909}
10910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010911if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010912 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010913else
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010916rm -f core conftest.err conftest.$ac_objext \
10917 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010918LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10921$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010922if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010923
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010924 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010925 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010926
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010927else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10930$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010931if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010932 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010933else
Martin v. Löwis11437992002-04-12 09:54:03 +000010934 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010935LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010939/* Override any GCC internal prototype to avoid an error.
10940 Use char because int might match the return type of a GCC
10941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010942#ifdef __cplusplus
10943extern "C"
10944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010945char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010946int
10947main ()
10948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010950 ;
10951 return 0;
10952}
10953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010954if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010955 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010956else
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010959rm -f core conftest.err conftest.$ac_objext \
10960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010961LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10964$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010965if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010966
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010967 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010968 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010969
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010970else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010971
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10973$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010974if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010976else
Martin v. Löwis11437992002-04-12 09:54:03 +000010977 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010978LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982/* Override any GCC internal prototype to avoid an error.
10983 Use char because int might match the return type of a GCC
10984 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010985#ifdef __cplusplus
10986extern "C"
10987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010988char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010989int
10990main ()
10991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010993 ;
10994 return 0;
10995}
10996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010999else
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011002rm -f core conftest.err conftest.$ac_objext \
11003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011004LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
11007$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011008if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000011009
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011010 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011011 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011012
Guido van Rossumb93a8621998-05-07 13:27:32 +000011013else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011014
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011015 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
11016
Guido van Rossum2d38f911996-06-26 19:47:01 +000011017fi
11018
Guido van Rossum627b2d71993-12-24 10:39:16 +000011019
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011020fi
11021
Guido van Rossum0be3e491997-05-22 20:33:33 +000011022fi
11023
Guido van Rossum49545951997-12-02 19:28:29 +000011024fi
11025
Guido van Rossumb93a8621998-05-07 13:27:32 +000011026fi
11027
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011029rm -f core conftest.err conftest.$ac_objext \
11030 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011031
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
11033$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011034if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011036else
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011038LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042/* Override any GCC internal prototype to avoid an error.
11043 Use char because int might match the return type of a GCC
11044 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011045#ifdef __cplusplus
11046extern "C"
11047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011048char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011049int
11050main ()
11051{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 ;
11054 return 0;
11055}
11056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011057if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011059else
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011062rm -f core conftest.err conftest.$ac_objext \
11063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011064LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11067$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011068if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011069
Martin v. Löwis130fb172001-07-19 11:00:41 +000011070 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011071
Guido van Rossum627b2d71993-12-24 10:39:16 +000011072fi
11073
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011074
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011075fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011076
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011077if test "$posix_threads" = "yes"; then
11078 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011079
Matthias Kloseb9621712010-04-24 17:59:49 +000011080$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011081
11082 fi
11083
11084 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11085 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011086 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000011087$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011088
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011089 ;;
11090 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011091$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011092
11093 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011094 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011095$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011096
11097 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011098 esac
11099
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11101$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011102 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011104else
Matthias Kloseb9621712010-04-24 17:59:49 +000011105 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011106 ac_cv_pthread_system_supported=no
11107else
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011109/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011110
11111 #include <stdio.h>
11112 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011113 void *foo(void *parm) {
11114 return NULL;
11115 }
11116 main() {
11117 pthread_attr_t attr;
11118 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110011119 if (pthread_attr_init(&attr)) return (-1);
11120 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
11121 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
11122 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011123 }
11124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011125if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011126 ac_cv_pthread_system_supported=yes
11127else
Matthias Kloseb9621712010-04-24 17:59:49 +000011128 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011132fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134
Guido van Rossum627b2d71993-12-24 10:39:16 +000011135fi
11136
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11138$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011139 if test "$ac_cv_pthread_system_supported" = "yes"; then
11140
Matthias Kloseb9621712010-04-24 17:59:49 +000011141$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011142
11143 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 for ac_func in pthread_sigmask
11145do :
11146 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011147if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011148 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011149#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011150_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011151 case $ac_sys_system in
11152 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011153
Matthias Kloseb9621712010-04-24 17:59:49 +000011154$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011155
11156 ;;
11157 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011158fi
11159done
11160
pdoxe14679c2017-10-05 00:01:56 -070011161 for ac_func in pthread_getcpuclockid
11162do :
11163 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11164if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11165 cat >>confdefs.h <<_ACEOF
11166#define HAVE_PTHREAD_GETCPUCLOCKID 1
11167_ACEOF
11168
11169fi
11170done
11171
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011172fi
11173
11174
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011175# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011176
Matthias Kloseb9621712010-04-24 17:59:49 +000011177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11178$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011179# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011180if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011181 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011182 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11184$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011185 ipv6=no
11186 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011187 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11188$as_echo "yes" >&6; }
11189 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011190
11191 ipv6=yes
11192 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011193 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011194else
Martin v. Löwis11437992002-04-12 09:54:03 +000011195
Matthias Kloseb9621712010-04-24 17:59:49 +000011196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011197/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011198 /* AF_INET6 available check */
11199#include <sys/types.h>
11200#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011201int
11202main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011203{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011204int domain = AF_INET6;
11205 ;
11206 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011207}
Martin v. Löwis11437992002-04-12 09:54:03 +000011208_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011209if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011210
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11212$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011213 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011214
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011215else
Matthias Kloseb159a552010-04-25 21:00:44 +000011216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011219 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011220
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011221fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011224if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11226$as_echo_n "checking if RFC2553 API is available... " >&6; }
11227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011228/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011229
11230 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011231#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011232int
11233main ()
11234{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011235struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011236 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 ;
11238 return 0;
11239}
Matthias Kloseb159a552010-04-25 21:00:44 +000011240
Martin v. Löwis11437992002-04-12 09:54:03 +000011241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011242if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011243
11244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011245$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011246 ipv6=yes
11247
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011248else
Matthias Kloseb159a552010-04-25 21:00:44 +000011249
11250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011251$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011252 ipv6=no
11253
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011256fi
11257
11258if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011259 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011260
11261fi
11262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263fi
11264
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011265
11266ipv6type=unknown
11267ipv6lib=none
11268ipv6trylibc=no
11269
11270if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11272$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011273 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11274 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011275 case $i in
11276 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011278/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011279
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011280#include <netinet/in.h>
11281#ifdef IPV6_INRIA_VERSION
11282yes
11283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011284_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011286 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011287 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011288fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011289rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011290
11291 ;;
11292 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011294/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011295
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011296#include <netinet/in.h>
11297#ifdef __KAME__
11298yes
11299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011300_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011302 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011303 ipv6type=$i;
11304 ipv6lib=inet6
11305 ipv6libdir=/usr/local/v6/lib
11306 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011307fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011308rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011309
11310 ;;
11311 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011313/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011314
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011315#include <features.h>
11316#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11317yes
11318#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011319_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011322 ipv6type=$i;
11323 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011324fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011325rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011326
11327 ;;
11328 linux-inet6)
11329 if test -d /usr/inet6; then
11330 ipv6type=$i
11331 ipv6lib=inet6
11332 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011333 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011334 fi
11335 ;;
11336 solaris)
11337 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011338 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011339 ipv6type=$i
11340 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011341 fi
11342 fi
11343 ;;
11344 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011347
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011348#include <sys/param.h>
11349#ifdef _TOSHIBA_INET6
11350yes
11351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011352_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011355 ipv6type=$i;
11356 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011357 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011358fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011359rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011360
11361 ;;
11362 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011365
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011366#include </usr/local/v6/include/sys/v6config.h>
11367#ifdef __V6D__
11368yes
11369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011370_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011371if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011373 ipv6type=$i;
11374 ipv6lib=v6;
11375 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011376 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011377fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011378rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011379
11380 ;;
11381 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011384
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011385#include <sys/param.h>
11386#ifdef _ZETA_MINAMI_INET6
11387yes
11388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011389_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011390if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011392 ipv6type=$i;
11393 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011394 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011395fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011396rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011397
11398 ;;
11399 esac
11400 if test "$ipv6type" != "unknown"; then
11401 break
11402 fi
11403 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11405$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011406fi
11407
11408if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11409 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11410 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11411 echo "using lib$ipv6lib"
11412 else
11413 if test $ipv6trylibc = "yes"; then
11414 echo "using libc"
11415 else
11416 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11417 echo "You need to fetch lib$ipv6lib.a from appropriate"
11418 echo 'ipv6 kit and compile beforehand.'
11419 exit 1
11420 fi
11421 fi
11422fi
11423
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11425$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11427/* end confdefs.h. */
11428 /* CAN_RAW_FD_FRAMES available check */
11429#include <linux/can/raw.h>
11430int
11431main ()
11432{
11433int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11434 ;
11435 return 0;
11436}
11437_ACEOF
11438if ac_fn_c_try_compile "$LINENO"; then :
11439
11440
11441$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11442
11443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11444$as_echo "yes" >&6; }
11445
11446else
11447
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11449$as_echo "no" >&6; }
11450
11451fi
11452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11453
Zackery Spytz97e0de02020-04-09 06:03:49 -060011454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11455$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11457/* end confdefs.h. */
11458
11459#include <linux/can/raw.h>
11460int
11461main ()
11462{
11463int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11464 ;
11465 return 0;
11466}
11467_ACEOF
11468if ac_fn_c_try_compile "$LINENO"; then :
11469
11470
11471$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11472
11473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11474$as_echo "yes" >&6; }
11475
11476else
11477
11478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11479$as_echo "no" >&6; }
11480
11481fi
11482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11483
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011484# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11486$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011489if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011490 withval=$with_doc_strings;
11491fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011492
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011493
11494if test -z "$with_doc_strings"
11495then with_doc_strings="yes"
11496fi
11497if test "$with_doc_strings" != "no"
11498then
11499
Matthias Kloseb9621712010-04-24 17:59:49 +000011500$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011501
11502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11504$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011505
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011506# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11508$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011511if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512 withval=$with_pymalloc;
11513fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011514
Neil Schemenauera35c6882001-02-27 04:45:05 +000011515
Neil Schemenauer16c22972002-03-22 15:34:49 +000011516if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011517then
11518 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011519fi
11520if test "$with_pymalloc" != "no"
11521then
Martin v. Löwis11437992002-04-12 09:54:03 +000011522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011524
11525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11527$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011528
Nick Coghlan6ea41862017-06-11 13:16:15 +100011529# Check for --with-c-locale-coercion
11530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11531$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11532
11533# Check whether --with-c-locale-coercion was given.
11534if test "${with_c_locale_coercion+set}" = set; then :
11535 withval=$with_c_locale_coercion;
11536fi
11537
11538
11539if test -z "$with_c_locale_coercion"
11540then
11541 with_c_locale_coercion="yes"
11542fi
11543if test "$with_c_locale_coercion" != "no"
11544then
11545
11546$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11547
11548fi
11549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11550$as_echo "$with_c_locale_coercion" >&6; }
11551
Benjamin Peterson05159c42009-12-03 03:01:27 +000011552# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11554$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011555
11556# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011557if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011558 withval=$with_valgrind;
11559else
11560 with_valgrind=no
11561fi
11562
Matthias Kloseb9621712010-04-24 17:59:49 +000011563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11564$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011565if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 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 +020011567if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011570
11571else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011572 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011573
11574fi
11575
11576
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011577 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011578fi
11579
Łukasz Langaa785c872016-09-09 17:37:37 -070011580# Check for DTrace support
11581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11582$as_echo_n "checking for --with-dtrace... " >&6; }
11583
11584# Check whether --with-dtrace was given.
11585if test "${with_dtrace+set}" = set; then :
11586 withval=$with_dtrace;
11587else
11588 with_dtrace=no
11589fi
11590
11591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11592$as_echo "$with_dtrace" >&6; }
11593
11594
11595
11596
11597
11598DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011599DTRACE_HEADERS=
11600DTRACE_OBJS=
11601
11602if test "$with_dtrace" = "yes"
11603then
11604 # Extract the first word of "dtrace", so it can be a program name with args.
11605set dummy dtrace; ac_word=$2
11606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11607$as_echo_n "checking for $ac_word... " >&6; }
11608if ${ac_cv_path_DTRACE+:} false; then :
11609 $as_echo_n "(cached) " >&6
11610else
11611 case $DTRACE in
11612 [\\/]* | ?:[\\/]*)
11613 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11614 ;;
11615 *)
11616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11617for as_dir in $PATH
11618do
11619 IFS=$as_save_IFS
11620 test -z "$as_dir" && as_dir=.
11621 for ac_exec_ext in '' $ac_executable_extensions; do
11622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11623 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11624 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11625 break 2
11626 fi
11627done
11628 done
11629IFS=$as_save_IFS
11630
11631 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11632 ;;
11633esac
11634fi
11635DTRACE=$ac_cv_path_DTRACE
11636if test -n "$DTRACE"; then
11637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11638$as_echo "$DTRACE" >&6; }
11639else
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11641$as_echo "no" >&6; }
11642fi
11643
11644
11645 if test "$DTRACE" = "not found"; then
11646 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11647 fi
11648
11649$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11650
11651 DTRACE_HEADERS="Include/pydtrace_probes.h"
11652
11653 # On OS X, DTrace providers do not need to be explicitly compiled and
11654 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11655 # generation flag '-G'. We check for presence of this flag, rather than
11656 # hardcoding support by OS, in the interest of robustness.
11657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11658$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11659if ${ac_cv_dtrace_link+:} false; then :
11660 $as_echo_n "(cached) " >&6
11661else
11662 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011663 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011664 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011665 ac_cv_dtrace_link=yes
11666
11667fi
11668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11669$as_echo "$ac_cv_dtrace_link" >&6; }
11670 if test "$ac_cv_dtrace_link" = "yes"; then
11671 DTRACE_OBJS="Python/pydtrace.o"
11672 fi
11673fi
11674
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011675# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011676
Guido van Rossum98935bf2001-09-05 19:13:16 +000011677DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011678
Guido van Rossume97ee181999-12-20 21:27:22 +000011679# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060011680# platforms have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011681for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011682do :
11683 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011684if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011685 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011686#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011687_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011688
Guido van Rossume97ee181999-12-20 21:27:22 +000011689fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011690done
Guido van Rossume97ee181999-12-20 21:27:22 +000011691
Michael W. Hudson54241132001-12-07 15:38:26 +000011692
Guido van Rossume97ee181999-12-20 21:27:22 +000011693# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11694# loading of modules.
11695
Matthias Kloseb9621712010-04-24 17:59:49 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11697$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011698if test -z "$DYNLOADFILE"
11699then
11700 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011701 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011702 *)
11703 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11704 # out any dynamic loading
11705 if test "$ac_cv_func_dlopen" = yes
11706 then DYNLOADFILE="dynload_shlib.o"
11707 else DYNLOADFILE="dynload_stub.o"
11708 fi
11709 ;;
11710 esac
11711fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11713$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011714if test "$DYNLOADFILE" != "dynload_stub.o"
11715then
Martin v. Löwis11437992002-04-12 09:54:03 +000011716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011718
11719fi
11720
Neil Schemenauer4e425612001-06-19 15:44:15 +000011721# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11722
Michael W. Hudson54241132001-12-07 15:38:26 +000011723
Matthias Kloseb9621712010-04-24 17:59:49 +000011724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11725$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011726if test -z "$MACHDEP_OBJS"
11727then
Jack Jansene578a632001-08-15 01:27:14 +000011728 MACHDEP_OBJS=$extra_machdep_objs
11729else
11730 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011731fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011732if test -z "$MACHDEP_OBJS"; then
11733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11734$as_echo "none" >&6; }
11735else
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11737$as_echo "$MACHDEP_OBJS" >&6; }
11738fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011739
Guido van Rossum627b2d71993-12-24 10:39:16 +000011740# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011741for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Kyle Evans1800c602020-10-11 15:18:53 -050011742 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11743 explicit_memset faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011744 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011745 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011746 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011747 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011748 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011749 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011750 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011751 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011752 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011753 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011754 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011755 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011756 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011757 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011758 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011759 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11760 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011761 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Pablo Galindoa57b3d32020-11-17 00:00:38 +000011762 sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011763 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Alexey Izbyshev976da902020-10-24 03:47:01 +030011764 truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011765 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011766do :
11767 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11768ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011769if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011770 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011771#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011772_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011773
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011774fi
11775done
11776
Michael W. Hudson54241132001-12-07 15:38:26 +000011777
Benjamin Peterson40caa052018-09-12 15:52:40 -070011778# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11779# links. Some libc implementations have a stub lchmod implementation that always
11780# returns an error.
11781if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011782 for ac_func in lchmod
11783do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011784 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11785if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011786 cat >>confdefs.h <<_ACEOF
11787#define HAVE_LCHMOD 1
11788_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011789
11790fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011791done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011792
11793fi
11794
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011795ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11796 #include <dirent.h>
11797"
11798if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11799
11800$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11801
11802fi
11803
11804
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011805# For some functions, having a definition is not sufficient, since
11806# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11808$as_echo_n "checking for chroot... " >&6; }
11809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011810/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011811#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011812int
11813main ()
11814{
11815void *x=chroot
11816 ;
11817 return 0;
11818}
11819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011820if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011821
Matthias Kloseb9621712010-04-24 17:59:49 +000011822$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011823
Matthias Kloseb159a552010-04-25 21:00:44 +000011824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011825$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011826else
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11828$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011829
11830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11833$as_echo_n "checking for link... " >&6; }
11834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011835/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011836#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011837int
11838main ()
11839{
11840void *x=link
11841 ;
11842 return 0;
11843}
11844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011845if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011846
Matthias Kloseb9621712010-04-24 17:59:49 +000011847$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011848
Matthias Kloseb159a552010-04-25 21:00:44 +000011849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011850$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11853$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011854
11855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11858$as_echo_n "checking for symlink... " >&6; }
11859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011860/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011861#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011862int
11863main ()
11864{
11865void *x=symlink
11866 ;
11867 return 0;
11868}
11869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011870if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011871
Matthias Kloseb9621712010-04-24 17:59:49 +000011872$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011873
Matthias Kloseb159a552010-04-25 21:00:44 +000011874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011875$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011876else
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11878$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011879
11880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11883$as_echo_n "checking for fchdir... " >&6; }
11884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011885/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011886#include <unistd.h>
11887int
11888main ()
11889{
11890void *x=fchdir
11891 ;
11892 return 0;
11893}
11894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011895if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011898
Matthias Kloseb159a552010-04-25 21:00:44 +000011899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011900$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011901else
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11903$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011904
11905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11908$as_echo_n "checking for fsync... " >&6; }
11909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011910/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011911#include <unistd.h>
11912int
11913main ()
11914{
11915void *x=fsync
11916 ;
11917 return 0;
11918}
11919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011920if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011921
Matthias Kloseb9621712010-04-24 17:59:49 +000011922$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011923
Matthias Kloseb159a552010-04-25 21:00:44 +000011924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011925$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011926else
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11928$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011929
11930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11933$as_echo_n "checking for fdatasync... " >&6; }
11934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011935/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011936#include <unistd.h>
11937int
11938main ()
11939{
11940void *x=fdatasync
11941 ;
11942 return 0;
11943}
11944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011945if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011946
Matthias Kloseb9621712010-04-24 17:59:49 +000011947$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011948
Matthias Kloseb159a552010-04-25 21:00:44 +000011949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011950$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011951else
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11953$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011954
11955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11958$as_echo_n "checking for epoll... " >&6; }
11959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011960/* end confdefs.h. */
11961#include <sys/epoll.h>
11962int
11963main ()
11964{
11965void *x=epoll_create
11966 ;
11967 return 0;
11968}
11969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011970if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011973
Matthias Kloseb159a552010-04-25 21:00:44 +000011974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011975$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011976else
Matthias Kloseb9621712010-04-24 17:59:49 +000011977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11978$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011979
11980fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11983$as_echo_n "checking for epoll_create1... " >&6; }
11984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11985/* end confdefs.h. */
11986#include <sys/epoll.h>
11987int
11988main ()
11989{
11990void *x=epoll_create1
11991 ;
11992 return 0;
11993}
11994_ACEOF
11995if ac_fn_c_try_compile "$LINENO"; then :
11996
11997$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11998
11999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12000$as_echo "yes" >&6; }
12001else
12002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12003$as_echo "no" >&6; }
12004
12005fi
12006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
12008$as_echo_n "checking for kqueue... " >&6; }
12009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012010/* end confdefs.h. */
12011
12012#include <sys/types.h>
12013#include <sys/event.h>
12014
12015int
12016main ()
12017{
12018int x=kqueue()
12019 ;
12020 return 0;
12021}
12022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012023if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012024
Matthias Kloseb9621712010-04-24 17:59:49 +000012025$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012026
Matthias Kloseb159a552010-04-25 21:00:44 +000012027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012028$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012029else
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12031$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012032
12033fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
12036$as_echo_n "checking for prlimit... " >&6; }
12037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12038/* end confdefs.h. */
12039
12040#include <sys/time.h>
12041#include <sys/resource.h>
12042
12043int
12044main ()
12045{
12046void *x=prlimit
12047 ;
12048 return 0;
12049}
12050_ACEOF
12051if ac_fn_c_try_compile "$LINENO"; then :
12052
12053$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
12054
12055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12056$as_echo "yes" >&6; }
12057else
12058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059$as_echo "no" >&6; }
12060
12061fi
12062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren41761932020-11-08 10:05:27 +010012063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12064$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
12065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12066/* end confdefs.h. */
12067#include <mach-o/dyld.h>
12068int
12069main ()
12070{
12071void *x=_dyld_shared_cache_contains_path
12072 ;
12073 return 0;
12074}
12075_ACEOF
12076if ac_fn_c_try_compile "$LINENO"; then :
12077
12078$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
12079
12080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12081$as_echo "yes" >&6; }
12082else
12083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12084$as_echo "no" >&6; }
12085
12086fi
12087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012088
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12090$as_echo_n "checking for memfd_create... " >&6; }
12091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12092/* end confdefs.h. */
12093
12094#ifdef HAVE_SYS_MMAN_H
12095#include <sys/mman.h>
12096#endif
12097#ifdef HAVE_SYS_MEMFD_H
12098#include <sys/memfd.h>
12099#endif
12100
12101int
12102main ()
12103{
12104void *x=memfd_create
12105 ;
12106 return 0;
12107}
12108_ACEOF
12109if ac_fn_c_try_compile "$LINENO"; then :
12110
12111$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12112
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12114$as_echo "yes" >&6; }
12115else
12116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12117$as_echo "no" >&6; }
12118
12119fi
12120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12121
Christian Heimescd9fed62020-11-13 19:48:52 +010012122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
12123$as_echo_n "checking for eventfd... " >&6; }
12124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12125/* end confdefs.h. */
12126
12127#ifdef HAVE_SYS_EVENTFD_H
12128#include <sys/eventfd.h>
12129#endif
12130
12131int
12132main ()
12133{
12134int x = eventfd(0, EFD_CLOEXEC)
12135 ;
12136 return 0;
12137}
12138_ACEOF
12139if ac_fn_c_try_compile "$LINENO"; then :
12140
12141$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h
12142
12143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12144$as_echo "yes" >&6; }
12145else
12146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12147$as_echo "no" >&6; }
12148
12149fi
12150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12151
Martin v. Löwisd5843682002-11-21 20:41:28 +000012152# On some systems (eg. FreeBSD 5), we would find a definition of the
12153# functions ctermid_r, setgroups in the library, but no prototype
12154# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12155# address to avoid compiler warnings and potential miscompilations
12156# because of the missing prototypes.
12157
Matthias Kloseb9621712010-04-24 17:59:49 +000012158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12159$as_echo_n "checking for ctermid_r... " >&6; }
12160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012161/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012162
Martin v. Löwisd5843682002-11-21 20:41:28 +000012163#include <stdio.h>
12164
Martin v. Löwisd5843682002-11-21 20:41:28 +000012165int
12166main ()
12167{
12168void* p = ctermid_r
12169 ;
12170 return 0;
12171}
12172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012173if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012174
Matthias Kloseb9621712010-04-24 17:59:49 +000012175$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012176
Matthias Kloseb159a552010-04-25 21:00:44 +000012177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012178$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012179else
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12181$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012182
12183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12185
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12187$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012188if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012189 $as_echo_n "(cached) " >&6
12190else
12191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012192/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012193#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012194int
12195main ()
12196{
12197void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012198
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012199 ;
12200 return 0;
12201}
12202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012203if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012204 ac_cv_flock_decl=yes
12205else
12206 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012207
12208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012210
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012211fi
12212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12213$as_echo "$ac_cv_flock_decl" >&6; }
12214if test "x${ac_cv_flock_decl}" = xyes; then
12215 for ac_func in flock
12216do :
12217 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012218if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012219 cat >>confdefs.h <<_ACEOF
12220#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012221_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012222
Antoine Pitroua3000072010-09-07 14:52:42 +000012223else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012225$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012226if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012227 $as_echo_n "(cached) " >&6
12228else
12229 ac_check_lib_save_LIBS=$LIBS
12230LIBS="-lbsd $LIBS"
12231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12232/* end confdefs.h. */
12233
12234/* Override any GCC internal prototype to avoid an error.
12235 Use char because int might match the return type of a GCC
12236 builtin and then its argument prototype would still apply. */
12237#ifdef __cplusplus
12238extern "C"
12239#endif
12240char flock ();
12241int
12242main ()
12243{
12244return flock ();
12245 ;
12246 return 0;
12247}
12248_ACEOF
12249if ac_fn_c_try_link "$LINENO"; then :
12250 ac_cv_lib_bsd_flock=yes
12251else
12252 ac_cv_lib_bsd_flock=no
12253fi
12254rm -f core conftest.err conftest.$ac_objext \
12255 conftest$ac_exeext conftest.$ac_ext
12256LIBS=$ac_check_lib_save_LIBS
12257fi
12258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12259$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012260if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012261 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012262
12263
12264$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12265
12266
12267fi
12268
12269
12270fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012271done
12272
Antoine Pitroua3000072010-09-07 14:52:42 +000012273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274
Matthias Kloseb9621712010-04-24 17:59:49 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12276$as_echo_n "checking for getpagesize... " >&6; }
12277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012278/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012279
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012280#include <unistd.h>
12281
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012282int
12283main ()
12284{
12285void* p = getpagesize
12286 ;
12287 return 0;
12288}
12289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012290if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012291
Matthias Kloseb9621712010-04-24 17:59:49 +000012292$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012293
Matthias Kloseb159a552010-04-25 21:00:44 +000012294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012295$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012296else
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12298$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012299
12300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012302
Victor Stinner984890f2011-11-24 13:53:38 +010012303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12304$as_echo_n "checking for broken unsetenv... " >&6; }
12305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12306/* end confdefs.h. */
12307
12308#include <stdlib.h>
12309
12310int
12311main ()
12312{
12313int res = unsetenv("DUMMY")
12314 ;
12315 return 0;
12316}
12317_ACEOF
12318if ac_fn_c_try_compile "$LINENO"; then :
12319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12320$as_echo "no" >&6; }
12321else
12322
12323$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12324
12325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12326$as_echo "yes" >&6; }
12327
12328fi
12329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12330
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012331for ac_prog in true
12332do
12333 # Extract the first word of "$ac_prog", so it can be a program name with args.
12334set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12336$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012337if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012339else
12340 if test -n "$TRUE"; then
12341 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12342else
12343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12344for as_dir in $PATH
12345do
12346 IFS=$as_save_IFS
12347 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012349 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012350 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012351 $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 +000012352 break 2
12353 fi
12354done
Matthias Kloseb9621712010-04-24 17:59:49 +000012355 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012357
12358fi
12359fi
12360TRUE=$ac_cv_prog_TRUE
12361if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12363$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012364else
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12366$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012367fi
12368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012370 test -n "$TRUE" && break
12371done
12372test -n "$TRUE" || TRUE="/bin/true"
12373
12374
Matthias Kloseb9621712010-04-24 17:59:49 +000012375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12376$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012377if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012379else
12380 ac_check_lib_save_LIBS=$LIBS
12381LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012383/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385/* Override any GCC internal prototype to avoid an error.
12386 Use char because int might match the return type of a GCC
12387 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012388#ifdef __cplusplus
12389extern "C"
12390#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012391char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012392int
12393main ()
12394{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012395return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012396 ;
12397 return 0;
12398}
12399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012400if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012401 ac_cv_lib_c_inet_aton=yes
12402else
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012405rm -f core conftest.err conftest.$ac_objext \
12406 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012407LIBS=$ac_check_lib_save_LIBS
12408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12410$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012411if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012412 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012413else
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12415$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012416if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012418else
12419 ac_check_lib_save_LIBS=$LIBS
12420LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012422/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012424/* Override any GCC internal prototype to avoid an error.
12425 Use char because int might match the return type of a GCC
12426 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012427#ifdef __cplusplus
12428extern "C"
12429#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012430char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012431int
12432main ()
12433{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012434return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012435 ;
12436 return 0;
12437}
12438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012440 ac_cv_lib_resolv_inet_aton=yes
12441else
Matthias Kloseb9621712010-04-24 17:59:49 +000012442 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012444rm -f core conftest.err conftest.$ac_objext \
12445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012446LIBS=$ac_check_lib_save_LIBS
12447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12449$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012450if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012451 cat >>confdefs.h <<_ACEOF
12452#define HAVE_LIBRESOLV 1
12453_ACEOF
12454
12455 LIBS="-lresolv $LIBS"
12456
12457fi
12458
12459
12460fi
12461
12462
Christian Heimesd0764e22007-12-04 15:00:33 +000012463# On Tru64, chflags seems to be present, but calling it will
12464# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12466$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012467if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012469else
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012471 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012472else
Matthias Kloseb9621712010-04-24 17:59:49 +000012473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012474/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012475
Christian Heimesd0764e22007-12-04 15:00:33 +000012476#include <sys/stat.h>
12477#include <unistd.h>
12478int main(int argc, char*argv[])
12479{
12480 if(chflags(argv[0], 0) != 0)
12481 return 1;
12482 return 0;
12483}
Ned Deily3eb67d52011-06-28 00:00:28 -070012484
Christian Heimesd0764e22007-12-04 15:00:33 +000012485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012486if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012487 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012488else
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12492 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012493fi
12494
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012495
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12498$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012499if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012501if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012502 ac_cv_have_chflags="yes"
12503else
12504 ac_cv_have_chflags="no"
12505fi
12506
12507fi
12508if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012509
Matthias Kloseb9621712010-04-24 17:59:49 +000012510$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012511
12512fi
12513
Matthias Kloseb9621712010-04-24 17:59:49 +000012514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12515$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012516if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012518else
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012520 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012521else
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012523/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012524
Christian Heimesd0764e22007-12-04 15:00:33 +000012525#include <sys/stat.h>
12526#include <unistd.h>
12527int main(int argc, char*argv[])
12528{
12529 if(lchflags(argv[0], 0) != 0)
12530 return 1;
12531 return 0;
12532}
Ned Deily3eb67d52011-06-28 00:00:28 -070012533
Christian Heimesd0764e22007-12-04 15:00:33 +000012534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012535if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012536 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012537else
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12541 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012542fi
12543
12544
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12547$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012548if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012550if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012551 ac_cv_have_lchflags="yes"
12552else
12553 ac_cv_have_lchflags="no"
12554fi
12555
12556fi
12557if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012558
Matthias Kloseb9621712010-04-24 17:59:49 +000012559$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012560
12561fi
12562
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012563case $ac_sys_system/$ac_sys_release in
12564Darwin/*)
12565 _CUR_CFLAGS="${CFLAGS}"
12566 _CUR_LDFLAGS="${LDFLAGS}"
12567 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12568 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12569 ;;
12570esac
12571
Matthias Kloseb9621712010-04-24 17:59:49 +000012572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12573$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012574if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012576else
12577 ac_check_lib_save_LIBS=$LIBS
12578LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012580/* end confdefs.h. */
12581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582/* Override any GCC internal prototype to avoid an error.
12583 Use char because int might match the return type of a GCC
12584 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012585#ifdef __cplusplus
12586extern "C"
12587#endif
12588char inflateCopy ();
12589int
12590main ()
12591{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012593 ;
12594 return 0;
12595}
12596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012597if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012598 ac_cv_lib_z_inflateCopy=yes
12599else
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012602rm -f core conftest.err conftest.$ac_objext \
12603 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012604LIBS=$ac_check_lib_save_LIBS
12605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12607$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012608if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012609
Matthias Kloseb9621712010-04-24 17:59:49 +000012610$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012611
12612fi
12613
12614
12615case $ac_sys_system/$ac_sys_release in
12616Darwin/*)
12617 CFLAGS="${_CUR_CFLAGS}"
12618 LDFLAGS="${_CUR_LDFLAGS}"
12619 ;;
12620esac
12621
Matthias Kloseb9621712010-04-24 17:59:49 +000012622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12623$as_echo_n "checking for hstrerror... " >&6; }
12624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012625/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012626
Martin v. Löwise9416172003-05-03 10:12:45 +000012627#include <netdb.h>
12628
Martin v. Löwise9416172003-05-03 10:12:45 +000012629int
12630main ()
12631{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012632void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012633 ;
12634 return 0;
12635}
12636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012637if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012638
Matthias Kloseb9621712010-04-24 17:59:49 +000012639$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012640
Matthias Kloseb159a552010-04-25 21:00:44 +000012641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012642$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012643else
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12645$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012646
12647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012648rm -f core conftest.err conftest.$ac_objext \
12649 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012650
Matthias Kloseb9621712010-04-24 17:59:49 +000012651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12652$as_echo_n "checking for inet_aton... " >&6; }
12653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012654/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012655
Martin v. Löwis86d66262006-02-17 08:40:11 +000012656#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012657#include <sys/socket.h>
12658#include <netinet/in.h>
12659#include <arpa/inet.h>
12660
Martin v. Löwise9416172003-05-03 10:12:45 +000012661int
12662main ()
12663{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012664void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012665 ;
12666 return 0;
12667}
12668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012669if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012672
Matthias Kloseb159a552010-04-25 21:00:44 +000012673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012674$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012675else
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12677$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012678
12679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012680rm -f core conftest.err conftest.$ac_objext \
12681 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012682
Matthias Kloseb9621712010-04-24 17:59:49 +000012683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12684$as_echo_n "checking for inet_pton... " >&6; }
12685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012686/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012687
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012688#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012689#include <sys/socket.h>
12690#include <netinet/in.h>
12691#include <arpa/inet.h>
12692
Martin v. Löwise9416172003-05-03 10:12:45 +000012693int
12694main ()
12695{
12696void* p = inet_pton
12697 ;
12698 return 0;
12699}
12700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012701if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012704
Matthias Kloseb159a552010-04-25 21:00:44 +000012705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012706$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012707else
Matthias Kloseb9621712010-04-24 17:59:49 +000012708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12709$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012710
12711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012713
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012714# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12716$as_echo_n "checking for setgroups... " >&6; }
12717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012719
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012720#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012721#ifdef HAVE_GRP_H
12722#include <grp.h>
12723#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012724
Martin v. Löwisd5843682002-11-21 20:41:28 +000012725int
12726main ()
12727{
12728void* p = setgroups
12729 ;
12730 return 0;
12731}
12732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012733if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012736
Matthias Kloseb159a552010-04-25 21:00:44 +000012737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012738$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012739else
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12741$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012742
12743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012745
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012746# check for openpty and forkpty
12747
12748for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012749do :
12750 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012751if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012752 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012753#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012754_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012755
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012756else
Matthias Kloseb9621712010-04-24 17:59:49 +000012757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12758$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012759if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012761else
Martin v. Löwis11437992002-04-12 09:54:03 +000012762 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012763LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012767/* Override any GCC internal prototype to avoid an error.
12768 Use char because int might match the return type of a GCC
12769 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012770#ifdef __cplusplus
12771extern "C"
12772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012773char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012774int
12775main ()
12776{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012778 ;
12779 return 0;
12780}
12781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012782if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012784else
Matthias Kloseb9621712010-04-24 17:59:49 +000012785 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012786fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012787rm -f core conftest.err conftest.$ac_objext \
12788 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012789LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12792$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012793if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012795 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012796else
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12798$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012799if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012801else
12802 ac_check_lib_save_LIBS=$LIBS
12803LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012805/* end confdefs.h. */
12806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012807/* Override any GCC internal prototype to avoid an error.
12808 Use char because int might match the return type of a GCC
12809 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012810#ifdef __cplusplus
12811extern "C"
12812#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012813char openpty ();
12814int
12815main ()
12816{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012817return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012818 ;
12819 return 0;
12820}
12821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012822if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012823 ac_cv_lib_bsd_openpty=yes
12824else
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012827rm -f core conftest.err conftest.$ac_objext \
12828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012829LIBS=$ac_check_lib_save_LIBS
12830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12832$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012833if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012835 LIBS="$LIBS -lbsd"
12836fi
12837
12838
12839fi
12840
Fred Drake8cef4cf2000-06-28 16:40:38 +000012841
12842fi
12843done
12844
12845for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012846do :
12847 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012848if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012849 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012850#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012851_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012852
Fred Drake8cef4cf2000-06-28 16:40:38 +000012853else
Matthias Kloseb9621712010-04-24 17:59:49 +000012854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12855$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012856if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012858else
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012860LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012864/* Override any GCC internal prototype to avoid an error.
12865 Use char because int might match the return type of a GCC
12866 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012867#ifdef __cplusplus
12868extern "C"
12869#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012870char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012871int
12872main ()
12873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 ;
12876 return 0;
12877}
12878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012879if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012881else
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012884rm -f core conftest.err conftest.$ac_objext \
12885 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012886LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12889$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012890if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012892 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012893else
Matthias Kloseb9621712010-04-24 17:59:49 +000012894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12895$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012896if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012898else
12899 ac_check_lib_save_LIBS=$LIBS
12900LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012902/* end confdefs.h. */
12903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904/* Override any GCC internal prototype to avoid an error.
12905 Use char because int might match the return type of a GCC
12906 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012907#ifdef __cplusplus
12908extern "C"
12909#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012910char forkpty ();
12911int
12912main ()
12913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012915 ;
12916 return 0;
12917}
12918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012919if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012920 ac_cv_lib_bsd_forkpty=yes
12921else
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012924rm -f core conftest.err conftest.$ac_objext \
12925 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012926LIBS=$ac_check_lib_save_LIBS
12927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12929$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012930if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012932 LIBS="$LIBS -lbsd"
12933fi
12934
12935
12936fi
12937
Fred Drake8cef4cf2000-06-28 16:40:38 +000012938
12939fi
12940done
12941
Jack Jansendd19cf82001-12-06 22:36:17 +000012942
Michael W. Hudson54241132001-12-07 15:38:26 +000012943# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012944for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012945do :
12946 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12947ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012948if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012950#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012951_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012952
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012954done
12955
Michael W. Hudson54241132001-12-07 15:38:26 +000012956
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012957ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012958if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012959 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012960
Martin v. Löwis1142de32002-03-29 16:28:31 +000012961else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012963 *" dup2.$ac_objext "* ) ;;
12964 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012966esac
12967
Martin v. Löwis1142de32002-03-29 16:28:31 +000012968fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012969
Martin v. Löwis1142de32002-03-29 16:28:31 +000012970
12971for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012972do :
12973 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012974if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012975 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012976#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012979/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012980#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012981int
12982main ()
12983{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012984getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012985 ;
12986 return 0;
12987}
12988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012989if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012990
Matthias Kloseb9621712010-04-24 17:59:49 +000012991$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012992
Guido van Rossum627b2d71993-12-24 10:39:16 +000012993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012995
Guido van Rossum627b2d71993-12-24 10:39:16 +000012996fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012997done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012998
Jack Jansen150753c2003-03-29 22:07:47 +000012999for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000013000do :
13001 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020013002if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000013003 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013004#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000013005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013007/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013008#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013009int
13010main ()
13011{
13012setpgrp(0,0);
13013 ;
13014 return 0;
13015}
13016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013017if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013020
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000013023
13024fi
13025done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013026
Michael W. Hudson54241132001-12-07 15:38:26 +000013027
Gregory P. Smith387512c2018-12-30 15:42:32 -080013028# We search for both crypt and crypt_r as one or the other may be defined
13029# This gets us our -lcrypt in LIBS when required on the target platform.
13030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
13031$as_echo_n "checking for library containing crypt... " >&6; }
13032if ${ac_cv_search_crypt+:} false; then :
13033 $as_echo_n "(cached) " >&6
13034else
13035 ac_func_search_save_LIBS=$LIBS
13036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13037/* end confdefs.h. */
13038
13039/* Override any GCC internal prototype to avoid an error.
13040 Use char because int might match the return type of a GCC
13041 builtin and then its argument prototype would still apply. */
13042#ifdef __cplusplus
13043extern "C"
13044#endif
13045char crypt ();
13046int
13047main ()
13048{
13049return crypt ();
13050 ;
13051 return 0;
13052}
13053_ACEOF
13054for ac_lib in '' crypt; do
13055 if test -z "$ac_lib"; then
13056 ac_res="none required"
13057 else
13058 ac_res=-l$ac_lib
13059 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13060 fi
13061 if ac_fn_c_try_link "$LINENO"; then :
13062 ac_cv_search_crypt=$ac_res
13063fi
13064rm -f core conftest.err conftest.$ac_objext \
13065 conftest$ac_exeext
13066 if ${ac_cv_search_crypt+:} false; then :
13067 break
13068fi
13069done
13070if ${ac_cv_search_crypt+:} false; then :
13071
13072else
13073 ac_cv_search_crypt=no
13074fi
13075rm conftest.$ac_ext
13076LIBS=$ac_func_search_save_LIBS
13077fi
13078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13079$as_echo "$ac_cv_search_crypt" >&6; }
13080ac_res=$ac_cv_search_crypt
13081if test "$ac_res" != no; then :
13082 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13083
13084fi
13085
13086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13087$as_echo_n "checking for library containing crypt_r... " >&6; }
13088if ${ac_cv_search_crypt_r+:} false; then :
13089 $as_echo_n "(cached) " >&6
13090else
13091 ac_func_search_save_LIBS=$LIBS
13092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13093/* end confdefs.h. */
13094
13095/* Override any GCC internal prototype to avoid an error.
13096 Use char because int might match the return type of a GCC
13097 builtin and then its argument prototype would still apply. */
13098#ifdef __cplusplus
13099extern "C"
13100#endif
13101char crypt_r ();
13102int
13103main ()
13104{
13105return crypt_r ();
13106 ;
13107 return 0;
13108}
13109_ACEOF
13110for ac_lib in '' crypt; do
13111 if test -z "$ac_lib"; then
13112 ac_res="none required"
13113 else
13114 ac_res=-l$ac_lib
13115 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13116 fi
13117 if ac_fn_c_try_link "$LINENO"; then :
13118 ac_cv_search_crypt_r=$ac_res
13119fi
13120rm -f core conftest.err conftest.$ac_objext \
13121 conftest$ac_exeext
13122 if ${ac_cv_search_crypt_r+:} false; then :
13123 break
13124fi
13125done
13126if ${ac_cv_search_crypt_r+:} false; then :
13127
13128else
13129 ac_cv_search_crypt_r=no
13130fi
13131rm conftest.$ac_ext
13132LIBS=$ac_func_search_save_LIBS
13133fi
13134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13135$as_echo "$ac_cv_search_crypt_r" >&6; }
13136ac_res=$ac_cv_search_crypt_r
13137if test "$ac_res" != no; then :
13138 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13139
13140fi
13141
13142
13143ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13144if test "x$ac_cv_func_crypt_r" = xyes; then :
13145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13146/* end confdefs.h. */
13147
13148#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13149#include <crypt.h>
13150
13151int
13152main ()
13153{
13154
13155struct crypt_data d;
13156char *r = crypt_r("", "", &d);
13157
13158 ;
13159 return 0;
13160}
13161_ACEOF
13162if ac_fn_c_try_compile "$LINENO"; then :
13163
13164$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13165
13166fi
13167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13168
13169fi
13170
13171
Victor Stinnere0be4232011-10-25 13:06:09 +020013172for ac_func in clock_gettime
13173do :
13174 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13175if test "x$ac_cv_func_clock_gettime" = xyes; then :
13176 cat >>confdefs.h <<_ACEOF
13177#define HAVE_CLOCK_GETTIME 1
13178_ACEOF
13179
13180else
13181
13182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13183$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13184if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13185 $as_echo_n "(cached) " >&6
13186else
13187 ac_check_lib_save_LIBS=$LIBS
13188LIBS="-lrt $LIBS"
13189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13190/* end confdefs.h. */
13191
13192/* Override any GCC internal prototype to avoid an error.
13193 Use char because int might match the return type of a GCC
13194 builtin and then its argument prototype would still apply. */
13195#ifdef __cplusplus
13196extern "C"
13197#endif
13198char clock_gettime ();
13199int
13200main ()
13201{
13202return clock_gettime ();
13203 ;
13204 return 0;
13205}
13206_ACEOF
13207if ac_fn_c_try_link "$LINENO"; then :
13208 ac_cv_lib_rt_clock_gettime=yes
13209else
13210 ac_cv_lib_rt_clock_gettime=no
13211fi
13212rm -f core conftest.err conftest.$ac_objext \
13213 conftest$ac_exeext conftest.$ac_ext
13214LIBS=$ac_check_lib_save_LIBS
13215fi
13216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13217$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13218if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13219
Victor Stinner7efb8332014-08-29 15:41:08 +020013220 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013221 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13222
13223
13224$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13225
13226
13227fi
13228
13229
13230fi
13231done
13232
13233
13234for ac_func in clock_getres
13235do :
13236 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13237if test "x$ac_cv_func_clock_getres" = xyes; then :
13238 cat >>confdefs.h <<_ACEOF
13239#define HAVE_CLOCK_GETRES 1
13240_ACEOF
13241
13242else
13243
13244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13245$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13246if ${ac_cv_lib_rt_clock_getres+:} false; then :
13247 $as_echo_n "(cached) " >&6
13248else
13249 ac_check_lib_save_LIBS=$LIBS
13250LIBS="-lrt $LIBS"
13251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13252/* end confdefs.h. */
13253
13254/* Override any GCC internal prototype to avoid an error.
13255 Use char because int might match the return type of a GCC
13256 builtin and then its argument prototype would still apply. */
13257#ifdef __cplusplus
13258extern "C"
13259#endif
13260char clock_getres ();
13261int
13262main ()
13263{
13264return clock_getres ();
13265 ;
13266 return 0;
13267}
13268_ACEOF
13269if ac_fn_c_try_link "$LINENO"; then :
13270 ac_cv_lib_rt_clock_getres=yes
13271else
13272 ac_cv_lib_rt_clock_getres=no
13273fi
13274rm -f core conftest.err conftest.$ac_objext \
13275 conftest$ac_exeext conftest.$ac_ext
13276LIBS=$ac_check_lib_save_LIBS
13277fi
13278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13279$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13280if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13281
13282 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13283
13284
13285fi
13286
13287
13288fi
13289done
13290
13291
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013292for ac_func in clock_settime
13293do :
13294 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13295if test "x$ac_cv_func_clock_settime" = xyes; then :
13296 cat >>confdefs.h <<_ACEOF
13297#define HAVE_CLOCK_SETTIME 1
13298_ACEOF
13299
13300else
13301
13302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13303$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13304if ${ac_cv_lib_rt_clock_settime+:} false; then :
13305 $as_echo_n "(cached) " >&6
13306else
13307 ac_check_lib_save_LIBS=$LIBS
13308LIBS="-lrt $LIBS"
13309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13310/* end confdefs.h. */
13311
13312/* Override any GCC internal prototype to avoid an error.
13313 Use char because int might match the return type of a GCC
13314 builtin and then its argument prototype would still apply. */
13315#ifdef __cplusplus
13316extern "C"
13317#endif
13318char clock_settime ();
13319int
13320main ()
13321{
13322return clock_settime ();
13323 ;
13324 return 0;
13325}
13326_ACEOF
13327if ac_fn_c_try_link "$LINENO"; then :
13328 ac_cv_lib_rt_clock_settime=yes
13329else
13330 ac_cv_lib_rt_clock_settime=no
13331fi
13332rm -f core conftest.err conftest.$ac_objext \
13333 conftest$ac_exeext conftest.$ac_ext
13334LIBS=$ac_check_lib_save_LIBS
13335fi
13336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13337$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13338if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13339
13340 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13341
13342
13343fi
13344
13345
13346fi
13347done
13348
13349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13351$as_echo_n "checking for major... " >&6; }
13352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013353/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013354
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013355#if defined(MAJOR_IN_MKDEV)
13356#include <sys/mkdev.h>
13357#elif defined(MAJOR_IN_SYSMACROS)
13358#include <sys/sysmacros.h>
13359#else
13360#include <sys/types.h>
13361#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013362
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013363int
13364main ()
13365{
13366
13367 makedev(major(0),minor(0));
13368
13369 ;
13370 return 0;
13371}
13372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013374
13375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013377
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13379$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013380
13381else
Skip Montanaro6dead952003-09-25 14:50:04 +000013382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13384$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013385
13386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013387rm -f core conftest.err conftest.$ac_objext \
13388 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013389
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013390# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013391# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13393$as_echo_n "checking for getaddrinfo... " >&6; }
13394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013395/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013396
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013397#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013398#include <sys/socket.h>
13399#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013400#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013401
Martin v. Löwis11437992002-04-12 09:54:03 +000013402int
13403main ()
13404{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013405getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013406 ;
13407 return 0;
13408}
13409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013410if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013411 have_getaddrinfo=yes
13412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013415rm -f core conftest.err conftest.$ac_objext \
13416 conftest$ac_exeext conftest.$ac_ext
13417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13418$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013419if test $have_getaddrinfo = yes
13420then
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13422$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013423 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013424 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013425else
Matthias Kloseb9621712010-04-24 17:59:49 +000013426 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013427
13428if test "${enable_ipv6+set}" = set; then
13429 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13430else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013431 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013432fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013433else
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013435/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013436
Stefan Krah19c21392012-11-22 23:47:32 +010013437#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013438#include <sys/types.h>
13439#include <netdb.h>
13440#include <string.h>
13441#include <sys/socket.h>
13442#include <netinet/in.h>
13443
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013444int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013445{
13446 int passive, gaierr, inet4 = 0, inet6 = 0;
13447 struct addrinfo hints, *ai, *aitop;
13448 char straddr[INET6_ADDRSTRLEN], strport[16];
13449
13450 for (passive = 0; passive <= 1; passive++) {
13451 memset(&hints, 0, sizeof(hints));
13452 hints.ai_family = AF_UNSPEC;
13453 hints.ai_flags = passive ? AI_PASSIVE : 0;
13454 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013455 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013456 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13457 (void)gai_strerror(gaierr);
13458 goto bad;
13459 }
13460 for (ai = aitop; ai; ai = ai->ai_next) {
13461 if (ai->ai_addr == NULL ||
13462 ai->ai_addrlen == 0 ||
13463 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13464 straddr, sizeof(straddr), strport, sizeof(strport),
13465 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13466 goto bad;
13467 }
13468 switch (ai->ai_family) {
13469 case AF_INET:
13470 if (strcmp(strport, "54321") != 0) {
13471 goto bad;
13472 }
13473 if (passive) {
13474 if (strcmp(straddr, "0.0.0.0") != 0) {
13475 goto bad;
13476 }
13477 } else {
13478 if (strcmp(straddr, "127.0.0.1") != 0) {
13479 goto bad;
13480 }
13481 }
13482 inet4++;
13483 break;
13484 case AF_INET6:
13485 if (strcmp(strport, "54321") != 0) {
13486 goto bad;
13487 }
13488 if (passive) {
13489 if (strcmp(straddr, "::") != 0) {
13490 goto bad;
13491 }
13492 } else {
13493 if (strcmp(straddr, "::1") != 0) {
13494 goto bad;
13495 }
13496 }
13497 inet6++;
13498 break;
13499 case AF_UNSPEC:
13500 goto bad;
13501 break;
13502 default:
13503 /* another family support? */
13504 break;
13505 }
13506 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013507 freeaddrinfo(aitop);
13508 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013509 }
13510
13511 if (!(inet4 == 0 || inet4 == 2))
13512 goto bad;
13513 if (!(inet6 == 0 || inet6 == 2))
13514 goto bad;
13515
13516 if (aitop)
13517 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013518 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013519
13520 bad:
13521 if (aitop)
13522 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013523 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013524}
13525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013527if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013528 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013529else
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13533 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013535
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013536fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013537
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013539
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13541$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13542
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013543if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013544then
13545 if test $ipv6 = yes
13546 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013547 echo 'Fatal: You must get working getaddrinfo() function.'
13548 echo ' or you can specify "--disable-ipv6"'.
13549 exit 1
13550 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013551else
Martin v. Löwis11437992002-04-12 09:54:03 +000013552
Matthias Kloseb9621712010-04-24 17:59:49 +000013553$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013554
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013555fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013556
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013557for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013558do :
13559 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013560if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013562#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013563_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013564
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013565fi
13566done
13567
Michael W. Hudson54241132001-12-07 15:38:26 +000013568
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13571$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013572if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013574else
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013576/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577#include <sys/types.h>
13578#include <sys/time.h>
13579#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013580
Martin v. Löwis11437992002-04-12 09:54:03 +000013581int
13582main ()
13583{
13584if ((struct tm *) 0)
13585return 0;
13586 ;
13587 return 0;
13588}
13589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013590if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013591 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013592else
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13598$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013599if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013602
13603fi
13604
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13606$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013607if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013611/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013612#include <sys/types.h>
13613#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013614
Martin v. Löwis11437992002-04-12 09:54:03 +000013615int
13616main ()
13617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013618struct tm tm;
13619 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 ;
13622 return 0;
13623}
13624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013625if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013626 ac_cv_struct_tm=time.h
13627else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13633$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013634if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013635
Matthias Kloseb9621712010-04-24 17:59:49 +000013636$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013637
13638fi
13639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640ac_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 +000013641#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643"
Victor Stinnere0be4232011-10-25 13:06:09 +020013644if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013645
13646cat >>confdefs.h <<_ACEOF
13647#define HAVE_STRUCT_TM_TM_ZONE 1
13648_ACEOF
13649
13650
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013651fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013652
Martin v. Löwis11437992002-04-12 09:54:03 +000013653if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013656
13657else
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13659"
Victor Stinnere0be4232011-10-25 13:06:09 +020013660if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013662else
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664fi
13665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013666cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013667#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668_ACEOF
13669
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13671$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013672if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013674else
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013676/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013677#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013678#if !HAVE_DECL_TZNAME
13679extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013681
Martin v. Löwis11437992002-04-12 09:54:03 +000013682int
13683main ()
13684{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013685return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013686 ;
13687 return 0;
13688}
13689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013690if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013691 ac_cv_var_tzname=yes
13692else
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013695rm -f core conftest.err conftest.$ac_objext \
13696 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13699$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013700 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013703
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013704 fi
13705fi
13706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707ac_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 +020013708if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013709
13710cat >>confdefs.h <<_ACEOF
13711#define HAVE_STRUCT_STAT_ST_RDEV 1
13712_ACEOF
13713
13714
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013715fi
13716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717ac_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 +020013718if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013719
Martin v. Löwis11437992002-04-12 09:54:03 +000013720cat >>confdefs.h <<_ACEOF
13721#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13722_ACEOF
13723
13724
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013725fi
13726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727ac_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 +020013728if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013729
13730cat >>confdefs.h <<_ACEOF
13731#define HAVE_STRUCT_STAT_ST_FLAGS 1
13732_ACEOF
13733
13734
13735fi
13736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737ac_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 +020013738if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013739
13740cat >>confdefs.h <<_ACEOF
13741#define HAVE_STRUCT_STAT_ST_GEN 1
13742_ACEOF
13743
13744
13745fi
13746
Matthias Kloseb9621712010-04-24 17:59:49 +000013747ac_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 +020013748if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013749
13750cat >>confdefs.h <<_ACEOF
13751#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13752_ACEOF
13753
13754
13755fi
13756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757ac_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 +020013758if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013759
Martin v. Löwis11437992002-04-12 09:54:03 +000013760cat >>confdefs.h <<_ACEOF
13761#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13762_ACEOF
13763
13764
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013765fi
13766
Stefan Krah267b6392016-04-26 01:09:18 +020013767ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13768 #include <sys/types.h>
13769 #include <pwd.h>
13770
13771"
13772if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13773
13774cat >>confdefs.h <<_ACEOF
13775#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13776_ACEOF
13777
13778
13779fi
13780ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13781 #include <sys/types.h>
13782 #include <pwd.h>
13783
13784"
13785if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13786
13787cat >>confdefs.h <<_ACEOF
13788#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13789_ACEOF
13790
13791
13792fi
13793
Zachary Ware6a6967e2016-10-01 00:47:27 -050013794# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13795ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13796"
13797if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13798
13799cat >>confdefs.h <<_ACEOF
13800#define HAVE_SIGINFO_T_SI_BAND 1
13801_ACEOF
13802
13803
13804fi
13805
Michael W. Hudson54241132001-12-07 15:38:26 +000013806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13808$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013809if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013811else
Matthias Kloseb159a552010-04-25 21:00:44 +000013812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013814/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013815#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013816int
13817main ()
13818{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013819return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 ;
13821 return 0;
13822}
13823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013824if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013825 ac_cv_header_time_altzone=yes
13826else
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831fi
13832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13834$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013835if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013836
Matthias Kloseb9621712010-04-24 17:59:49 +000013837$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013838
13839fi
13840
Guido van Rossumda88dad1995-01-26 00:46:29 +000013841was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13843$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013845/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013846
13847#include <sys/types.h>
13848#include <sys/select.h>
13849#include <sys/time.h>
13850
Martin v. Löwis11437992002-04-12 09:54:03 +000013851int
13852main ()
13853{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013854;
Martin v. Löwis11437992002-04-12 09:54:03 +000013855 ;
13856 return 0;
13857}
13858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013859if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
13861
Matthias Kloseb9621712010-04-24 17:59:49 +000013862$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013863
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013864 was_it_defined=yes
13865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13869$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870
Matthias Kloseb9621712010-04-24 17:59:49 +000013871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13872$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013873if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013875else
Matthias Kloseb9621712010-04-24 17:59:49 +000013876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013877/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013878#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013879int
13880main ()
13881{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013882struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013883 ;
13884 return 0;
13885}
13886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013887if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013888 ac_cv_struct_addrinfo=yes
13889else
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13893fi
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13896$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013897if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013898
Matthias Kloseb9621712010-04-24 17:59:49 +000013899$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013900
13901fi
13902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13904$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013905if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013909/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013910
13911# include <sys/types.h>
13912# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013913int
13914main ()
13915{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013916struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 ;
13918 return 0;
13919}
13920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013921if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013922 ac_cv_struct_sockaddr_storage=yes
13923else
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13927fi
13928
Matthias Kloseb9621712010-04-24 17:59:49 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13930$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013931if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013934
13935fi
13936
Christian Heimesdffa3942016-09-05 23:54:41 +020013937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13938$as_echo_n "checking for sockaddr_alg... " >&6; }
13939if ${ac_cv_struct_sockaddr_alg+:} false; then :
13940 $as_echo_n "(cached) " >&6
13941else
13942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13943/* end confdefs.h. */
13944
13945# include <sys/types.h>
13946# include <sys/socket.h>
13947# include <linux/if_alg.h>
13948int
13949main ()
13950{
13951struct sockaddr_alg s
13952 ;
13953 return 0;
13954}
13955_ACEOF
13956if ac_fn_c_try_compile "$LINENO"; then :
13957 ac_cv_struct_sockaddr_alg=yes
13958else
13959 ac_cv_struct_sockaddr_alg=no
13960fi
13961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13962fi
13963
13964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13965$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13966if test $ac_cv_struct_sockaddr_alg = yes; then
13967
13968$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13969
13970fi
13971
Guido van Rossum627b2d71993-12-24 10:39:16 +000013972# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13975$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013976if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013978else
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013981$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013982int
13983main ()
13984{
13985static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013986test_array [0] = 0;
13987return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
13989 ;
13990 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013991}
Martin v. Löwis11437992002-04-12 09:54:03 +000013992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013993if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013994 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013995else
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
14001$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014002if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014004
14005fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014006
Matthias Kloseb9621712010-04-24 17:59:49 +000014007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
14008$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014009if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014010 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014011else
Matthias Kloseb9621712010-04-24 17:59:49 +000014012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014013/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014014
Martin v. Löwis11437992002-04-12 09:54:03 +000014015int
14016main ()
14017{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014018
Martin v. Löwis11437992002-04-12 09:54:03 +000014019#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014020 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014021 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014022 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000014023 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014024 char const *const *pcpcc;
14025 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000014026 /* NEC SVR4.0.2 mips cc rejects this. */
14027 struct point {int x, y;};
14028 static struct point const zero = {0,0};
14029 /* AIX XL C 1.02.0.0 rejects this.
14030 It does not let you subtract one const X* pointer from another in
14031 an arm of an if-expression whose if-part is not a constant
14032 expression */
14033 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014036 ++pcpcc;
14037 ppc = (char**) pcpcc;
14038 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014039 { /* SCO 3.2v4 cc rejects this sort of thing. */
14040 char tx;
14041 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000014042 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014043
Martin v. Löwis11437992002-04-12 09:54:03 +000014044 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014045 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014046 }
14047 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14048 int x[] = {25, 17};
14049 const int *foo = &x[0];
14050 ++foo;
14051 }
14052 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14053 typedef const int *iptr;
14054 iptr p = 0;
14055 ++p;
14056 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014057 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014059 struct s { int j; const int *ap[3]; } bx;
14060 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 }
14062 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14063 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014067#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014068
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 ;
14070 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014071}
Martin v. Löwis11437992002-04-12 09:54:03 +000014072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014073if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014074 ac_cv_c_const=yes
14075else
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14081$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014082if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014083
Matthias Kloseb9621712010-04-24 17:59:49 +000014084$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014085
14086fi
14087
Michael W. Hudson54241132001-12-07 15:38:26 +000014088
Guido van Rossumda88dad1995-01-26 00:46:29 +000014089works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14091$as_echo_n "checking for working signed char... " >&6; }
14092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014093/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014094
Martin v. Löwis11437992002-04-12 09:54:03 +000014095int
14096main ()
14097{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014098signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 ;
14100 return 0;
14101}
14102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014103if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014104 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014105else
Skip Montanaro6dead952003-09-25 14:50:04 +000014106
Matthias Kloseb9621712010-04-24 17:59:49 +000014107$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014108
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014109
Guido van Rossum7f43da71994-08-01 12:15:30 +000014110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14113$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014114
Guido van Rossumda88dad1995-01-26 00:46:29 +000014115have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14117$as_echo_n "checking for prototypes... " >&6; }
14118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014119/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014120int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014121int
14122main ()
14123{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014124return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014125 ;
14126 return 0;
14127}
14128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014129if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014130
Matthias Kloseb9621712010-04-24 17:59:49 +000014131$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014132
Matthias Kloseb159a552010-04-25 21:00:44 +000014133 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14137$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014138
Guido van Rossumda88dad1995-01-26 00:46:29 +000014139works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14141$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014143/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014144
14145#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014146int foo(int x, ...) {
14147 va_list va;
14148 va_start(va, x);
14149 va_arg(va, int);
14150 va_arg(va, char *);
14151 va_arg(va, double);
14152 return 0;
14153}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014154
Martin v. Löwis11437992002-04-12 09:54:03 +000014155int
14156main ()
14157{
Guido van Rossum90eea071996-08-30 20:58:57 +000014158return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 ;
14160 return 0;
14161}
14162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014163if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014164
14165
Matthias Kloseb9621712010-04-24 17:59:49 +000014166$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014168 works=yes
14169
Guido van Rossum627b2d71993-12-24 10:39:16 +000014170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14173$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014174
Martin v. Löwisd6320502004-08-12 13:45:08 +000014175# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14177$as_echo_n "checking for socketpair... " >&6; }
14178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014179/* end confdefs.h. */
14180
14181#include <sys/types.h>
14182#include <sys/socket.h>
14183
14184int
14185main ()
14186{
14187void *x=socketpair
14188 ;
14189 return 0;
14190}
14191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014192if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014195
Matthias Kloseb159a552010-04-25 21:00:44 +000014196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014197$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014198else
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14200$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014201
14202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014204
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014205# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14207$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014209/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014210#include <sys/types.h>
14211#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014212int
14213main ()
14214{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014215struct sockaddr x;
14216x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014217 ;
14218 return 0;
14219}
14220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014221if ac_fn_c_try_compile "$LINENO"; then :
14222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14223$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
Matthias Kloseb9621712010-04-24 17:59:49 +000014225$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014226
14227else
Matthias Kloseb9621712010-04-24 17:59:49 +000014228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14229$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014230
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014233
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014234# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014235
14236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014238if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014241
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14243$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014244 OLD_CFLAGS=$CFLAGS
14245 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014247/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014248
14249# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014250
Martin v. Löwis11437992002-04-12 09:54:03 +000014251int
14252main ()
14253{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014254
14255 char *name;
14256 struct hostent *he, *res;
14257 char buffer[2048];
14258 int buflen = 2048;
14259 int h_errnop;
14260
14261 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014262
14263 ;
14264 return 0;
14265}
14266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014268
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014270
Martin v. Löwis11437992002-04-12 09:54:03 +000014271
Matthias Kloseb9621712010-04-24 17:59:49 +000014272$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014273
Matthias Kloseb9621712010-04-24 17:59:49 +000014274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14275$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014276
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014277else
Skip Montanaro6dead952003-09-25 14:50:04 +000014278
Matthias Kloseb9621712010-04-24 17:59:49 +000014279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14280$as_echo "no" >&6; }
14281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14282$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014284/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014285
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014286# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014287
Martin v. Löwis11437992002-04-12 09:54:03 +000014288int
14289main ()
14290{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014291
14292 char *name;
14293 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014294 char buffer[2048];
14295 int buflen = 2048;
14296 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014297
Matthias Kloseb159a552010-04-25 21:00:44 +000014298 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014299
14300 ;
14301 return 0;
14302}
14303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014305
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014307
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Matthias Kloseb159a552010-04-25 21:00:44 +000014309$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14312$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014313
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014314else
Skip Montanaro6dead952003-09-25 14:50:04 +000014315
Matthias Kloseb9621712010-04-24 17:59:49 +000014316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14317$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14319$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14321/* end confdefs.h. */
14322
14323# include <netdb.h>
14324
14325int
14326main ()
14327{
14328
14329 char *name;
14330 struct hostent *he;
14331 struct hostent_data data;
14332
14333 (void) gethostbyname_r(name, he, &data);
14334
14335 ;
14336 return 0;
14337}
14338_ACEOF
14339if ac_fn_c_try_compile "$LINENO"; then :
14340
14341 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14342
14343
14344$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14345
14346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14347$as_echo "yes" >&6; }
14348
14349else
14350
14351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14352$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014353
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014359
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014362 CFLAGS=$OLD_CFLAGS
14363
14364else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014365
Matthias Kloseb9621712010-04-24 17:59:49 +000014366 for ac_func in gethostbyname
14367do :
14368 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014369if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014370 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014371#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014372_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014373
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014374fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014375done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014376
Michael W. Hudson54241132001-12-07 15:38:26 +000014377
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014378fi
14379
Michael W. Hudson54241132001-12-07 15:38:26 +000014380
14381
14382
14383
14384
14385
Guido van Rossum627b2d71993-12-24 10:39:16 +000014386# checks for system services
14387# (none yet)
14388
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014389# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014390ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014391if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014392
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014393else
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14395$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014396if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014397 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014398else
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014400LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404/* Override any GCC internal prototype to avoid an error.
14405 Use char because int might match the return type of a GCC
14406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014407#ifdef __cplusplus
14408extern "C"
14409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014410char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014411int
14412main ()
14413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014414return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 ;
14416 return 0;
14417}
14418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014419if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014421else
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014424rm -f core conftest.err conftest.$ac_objext \
14425 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014426LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14429$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014430if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014431 cat >>confdefs.h <<_ACEOF
14432#define HAVE_LIBIEEE 1
14433_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014434
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014435 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014436
Guido van Rossum627b2d71993-12-24 10:39:16 +000014437fi
14438
Michael W. Hudson54241132001-12-07 15:38:26 +000014439
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014440fi
14441
Michael W. Hudson54241132001-12-07 15:38:26 +000014442
Guido van Rossum7f43da71994-08-01 12:15:30 +000014443# check for --with-libm=...
14444
Guido van Rossum563e7081996-09-10 18:20:48 +000014445case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014446Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014447*) LIBM=-lm
14448esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14450$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014452# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014453if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014455if test "$withval" = no
14456then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14458$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014459elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014460then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14462$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014463else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014464fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014465else
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14467$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014468fi
14469
Guido van Rossum7f43da71994-08-01 12:15:30 +000014470
14471# check for --with-libc=...
14472
Matthias Kloseb9621712010-04-24 17:59:49 +000014473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14474$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014477if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014478 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014479if test "$withval" = no
14480then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14482$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014483elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014484then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14486$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014487else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014488fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014489else
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14491$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014492fi
14493
Guido van Rossum7f43da71994-08-01 12:15:30 +000014494
Stefan Krah1919b7e2012-03-21 18:25:23 +010014495# **************************************
14496# * Check for gcc x64 inline assembler *
14497# **************************************
14498
14499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14500$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14502/* end confdefs.h. */
14503
14504int
14505main ()
14506{
14507
14508 __asm__ __volatile__ ("movq %rcx, %rax");
14509
14510 ;
14511 return 0;
14512}
14513_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014514if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014515 have_gcc_asm_for_x64=yes
14516else
14517 have_gcc_asm_for_x64=no
14518fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014519rm -f core conftest.err conftest.$ac_objext \
14520 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14522$as_echo "$have_gcc_asm_for_x64" >&6; }
14523if test "$have_gcc_asm_for_x64" = yes
14524then
14525
14526$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14527
14528fi
14529
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014530# **************************************************
14531# * Check for various properties of floating point *
14532# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014533
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14535$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14536if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014538else
14539
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014540
14541ax_cv_c_float_words_bigendian=unknown
14542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014543/* end confdefs.h. */
14544
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014545
14546double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14547
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014548
14549_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014550if ac_fn_c_try_compile "$LINENO"; then :
14551
14552
Arnon Yaari5dd83602020-04-01 18:19:09 +030014553if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014554 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014555fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014556if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014557 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14558 ax_cv_c_float_words_bigendian=no
14559 else
14560 ax_cv_c_float_words_bigendian=unknown
14561 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014562fi
14563
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014564
14565fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014567fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14569$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014570
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014571case $ax_cv_c_float_words_bigendian in
14572 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014573
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014574$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14575 ;;
14576 no)
14577 ;;
14578 *)
14579 as_fn_error $? "
14580
14581Unknown float word ordering. You need to manually preset
14582ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14583
14584 " "$LINENO" 5 ;;
14585esac
14586
14587
14588if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014589then
14590
Matthias Kloseb9621712010-04-24 17:59:49 +000014591$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014592
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014593elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014594then
14595
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014596$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14597
14598else
14599 # Some ARM platforms use a mixed-endian representation for doubles.
14600 # While Python doesn't currently have full support for these platforms
14601 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14602 # conversions work.
14603 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14604 # or little, then it must be this?
14605
Matthias Kloseb9621712010-04-24 17:59:49 +000014606$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014607
14608fi
14609
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014610# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014611# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014612# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014613# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014614# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014615# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014616
14617# This inline assembler syntax may also work for suncc and icc,
14618# so we try it on all platforms.
14619
Matthias Kloseb9621712010-04-24 17:59:49 +000014620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14621$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014623/* end confdefs.h. */
14624
14625int
14626main ()
14627{
14628
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014629 unsigned short cw;
14630 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14631 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014632
14633 ;
14634 return 0;
14635}
14636_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014637if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014638 have_gcc_asm_for_x87=yes
14639else
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014641fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014642rm -f core conftest.err conftest.$ac_objext \
14643 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14645$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014646if test "$have_gcc_asm_for_x87" = yes
14647then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014648
Matthias Kloseb9621712010-04-24 17:59:49 +000014649$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014650
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014652
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14654$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14656/* end confdefs.h. */
14657
14658int
14659main ()
14660{
14661
14662 unsigned int fpcr;
14663 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14664 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14665
14666 ;
14667 return 0;
14668}
14669_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014670if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014671 have_gcc_asm_for_mc68881=yes
14672else
14673 have_gcc_asm_for_mc68881=no
14674fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014675rm -f core conftest.err conftest.$ac_objext \
14676 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14678$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14679if test "$have_gcc_asm_for_mc68881" = yes
14680then
14681
14682$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14683
14684fi
14685
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014686# Detect whether system arithmetic is subject to x87-style double
14687# rounding issues. The result of this test has little meaning on non
14688# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14689# mode is round-to-nearest and double rounding issues are present, and
14690# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14692$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014693# $BASECFLAGS may affect the result
14694ac_save_cc="$CC"
14695CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014696if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014697 ac_cv_x87_double_rounding=no
14698else
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014700/* end confdefs.h. */
14701
14702#include <stdlib.h>
14703#include <math.h>
14704int main() {
14705 volatile double x, y, z;
14706 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14707 x = 0.99999999999999989; /* 1-2**-53 */
14708 y = 1./x;
14709 if (y != 1.)
14710 exit(0);
14711 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14712 x = 1e16;
14713 y = 2.99999;
14714 z = x + y;
14715 if (z != 1e16+4.)
14716 exit(0);
14717 /* both tests show evidence of double rounding */
14718 exit(1);
14719}
14720
14721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014722if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014723 ac_cv_x87_double_rounding=no
14724else
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014729fi
14730
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014731CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14733$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014734if test "$ac_cv_x87_double_rounding" = yes
14735then
14736
Matthias Kloseb9621712010-04-24 17:59:49 +000014737$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014738
14739fi
14740
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014741# ************************************
14742# * Check for mathematical functions *
14743# ************************************
14744
14745LIBS_SAVE=$LIBS
14746LIBS="$LIBS $LIBM"
14747
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014748for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14749do :
14750 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14751ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014752if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014753 cat >>confdefs.h <<_ACEOF
14754#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14755_ACEOF
14756
14757fi
14758done
14759
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014760for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014761do :
14762 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14763ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014764if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014765 cat >>confdefs.h <<_ACEOF
14766#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14767_ACEOF
14768
14769fi
14770done
14771
14772ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14773"
Victor Stinnere0be4232011-10-25 13:06:09 +020014774if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014775 ac_have_decl=1
14776else
14777 ac_have_decl=0
14778fi
14779
14780cat >>confdefs.h <<_ACEOF
14781#define HAVE_DECL_ISINF $ac_have_decl
14782_ACEOF
14783ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14784"
Victor Stinnere0be4232011-10-25 13:06:09 +020014785if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014786 ac_have_decl=1
14787else
14788 ac_have_decl=0
14789fi
14790
14791cat >>confdefs.h <<_ACEOF
14792#define HAVE_DECL_ISNAN $ac_have_decl
14793_ACEOF
14794ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14795"
Victor Stinnere0be4232011-10-25 13:06:09 +020014796if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014797 ac_have_decl=1
14798else
14799 ac_have_decl=0
14800fi
14801
14802cat >>confdefs.h <<_ACEOF
14803#define HAVE_DECL_ISFINITE $ac_have_decl
14804_ACEOF
14805
14806
Mark Dickinsona614f042009-11-28 12:48:43 +000014807# For multiprocessing module, check that sem_open
14808# actually works. For FreeBSD versions <= 7.2,
14809# the kernel module that provides POSIX semaphores
14810# isn't loaded by default, so an attempt to call
14811# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14813$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014814if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014816else
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014818 ac_cv_posix_semaphores_enabled=yes
14819else
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014821/* end confdefs.h. */
14822
14823#include <unistd.h>
14824#include <fcntl.h>
14825#include <stdio.h>
14826#include <semaphore.h>
14827#include <sys/stat.h>
14828
14829int main(void) {
14830 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14831 if (a == SEM_FAILED) {
14832 perror("sem_open");
14833 return 1;
14834 }
14835 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014836 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014837 return 0;
14838}
14839
14840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014841if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014842 ac_cv_posix_semaphores_enabled=yes
14843else
Matthias Kloseb9621712010-04-24 17:59:49 +000014844 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014848fi
14849
14850
Mark Dickinsona614f042009-11-28 12:48:43 +000014851fi
14852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14854$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014855if test $ac_cv_posix_semaphores_enabled = no
14856then
14857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014859
14860fi
14861
Mark Dickinson10683072009-04-18 21:18:19 +000014862# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14864$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014865if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014867else
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014869 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014870else
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014872/* end confdefs.h. */
14873
14874#include <unistd.h>
14875#include <fcntl.h>
14876#include <stdio.h>
14877#include <semaphore.h>
14878#include <sys/stat.h>
14879
14880int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014881 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014882 int count;
14883 int res;
14884 if(a==SEM_FAILED){
14885 perror("sem_open");
14886 return 1;
14887
14888 }
14889 res = sem_getvalue(a, &count);
14890 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014891 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014892 return res==-1 ? 1 : 0;
14893}
14894
Mark Dickinson10683072009-04-18 21:18:19 +000014895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014896if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014897 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014898else
Matthias Kloseb9621712010-04-24 17:59:49 +000014899 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014903fi
14904
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014905
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014906fi
14907
Matthias Kloseb9621712010-04-24 17:59:49 +000014908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14909$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014910if test $ac_cv_broken_sem_getvalue = yes
14911then
14912
Matthias Kloseb9621712010-04-24 17:59:49 +000014913$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014914
14915fi
14916
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014917ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14918"
14919if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14920 ac_have_decl=1
14921else
14922 ac_have_decl=0
14923fi
14924
14925cat >>confdefs.h <<_ACEOF
14926#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14927_ACEOF
14928ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14929"
14930if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14931 ac_have_decl=1
14932else
14933 ac_have_decl=0
14934fi
14935
14936cat >>confdefs.h <<_ACEOF
14937#define HAVE_DECL_RTLD_NOW $ac_have_decl
14938_ACEOF
14939ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14940"
14941if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14942 ac_have_decl=1
14943else
14944 ac_have_decl=0
14945fi
14946
14947cat >>confdefs.h <<_ACEOF
14948#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14949_ACEOF
14950ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14951"
14952if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14953 ac_have_decl=1
14954else
14955 ac_have_decl=0
14956fi
14957
14958cat >>confdefs.h <<_ACEOF
14959#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14960_ACEOF
14961ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14962"
14963if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14964 ac_have_decl=1
14965else
14966 ac_have_decl=0
14967fi
14968
14969cat >>confdefs.h <<_ACEOF
14970#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14971_ACEOF
14972ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14973"
14974if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14975 ac_have_decl=1
14976else
14977 ac_have_decl=0
14978fi
14979
14980cat >>confdefs.h <<_ACEOF
14981#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14982_ACEOF
14983ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14984"
14985if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14986 ac_have_decl=1
14987else
14988 ac_have_decl=0
14989fi
14990
14991cat >>confdefs.h <<_ACEOF
14992#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14993_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014994ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14995"
14996if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14997 ac_have_decl=1
14998else
14999 ac_have_decl=0
15000fi
15001
15002cat >>confdefs.h <<_ACEOF
15003#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
15004_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015005
15006
Mark Dickinsonbd792642009-03-18 20:06:12 +000015007# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000015008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
15009$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015010# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015011if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000015012 enableval=$enable_big_digits; case $enable_big_digits in
15013yes)
15014 enable_big_digits=30 ;;
15015no)
15016 enable_big_digits=15 ;;
1501715|30)
15018 ;;
15019*)
Victor Stinnere0be4232011-10-25 13:06:09 +020015020 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 +000015021esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
15023$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015024
15025cat >>confdefs.h <<_ACEOF
15026#define PYLONG_BITS_IN_DIGIT $enable_big_digits
15027_ACEOF
15028
15029
15030else
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15032$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015033fi
15034
15035
Guido van Rossumef2255b2000-03-10 22:30:29 +000015036# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015037ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020015038if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015039
15040
Matthias Kloseb9621712010-04-24 17:59:49 +000015041$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015042
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015043 wchar_h="yes"
15044
Guido van Rossumef2255b2000-03-10 22:30:29 +000015045else
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015047
15048fi
15049
Michael W. Hudson54241132001-12-07 15:38:26 +000015050
Martin v. Löwis11437992002-04-12 09:54:03 +000015051
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015052# determine wchar_t size
15053if test "$wchar_h" = yes
15054then
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15057# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15058# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000015059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15060$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015061if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015062 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015063else
Matthias Kloseb9621712010-04-24 17:59:49 +000015064 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
15065"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015066
Martin v. Löwis11437992002-04-12 09:54:03 +000015067else
Matthias Kloseb9621712010-04-24 17:59:49 +000015068 if test "$ac_cv_type_wchar_t" = yes; then
15069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015071as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015072See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073 else
15074 ac_cv_sizeof_wchar_t=0
15075 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015077
Martin v. Löwis11437992002-04-12 09:54:03 +000015078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15080$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081
15082
15083
Martin v. Löwis11437992002-04-12 09:54:03 +000015084cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015085#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015086_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015087
Michael W. Hudson54241132001-12-07 15:38:26 +000015088
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015089fi
15090
Matthias Kloseb9621712010-04-24 17:59:49 +000015091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15092$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015093have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015095/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015096
15097#include <tcl.h>
15098#if TCL_UTF_MAX != 6
15099# error "NOT UCS4_TCL"
15100#endif
15101int
15102main ()
15103{
15104
15105 ;
15106 return 0;
15107}
15108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015109if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015110
15111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015113
15114 have_ucs4_tcl=yes
15115
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15119$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015120
Skip Montanaro6dead952003-09-25 14:50:04 +000015121# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015122if test "$wchar_h" = yes
15123then
15124 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15126$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015127 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015129else
15130
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015132 ac_cv_wchar_t_signed=yes
15133else
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015135/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015136
15137 #include <wchar.h>
15138 int main()
15139 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015140 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110015141 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015142 }
15143
15144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015145if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015146 ac_cv_wchar_t_signed=yes
15147else
Matthias Kloseb9621712010-04-24 17:59:49 +000015148 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15151 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015152fi
15153
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015154fi
15155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15157$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158fi
15159
Michael Osipov3738fad2018-08-24 18:17:19 +020015160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15161$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015162# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015163if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015164 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015165then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015166
Matthias Kloseb9621712010-04-24 17:59:49 +000015167$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015168
Michael Osipov3738fad2018-08-24 18:17:19 +020015169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15170$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015171else
Michael Osipov3738fad2018-08-24 18:17:19 +020015172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15173$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015174fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015175
15176# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15178$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015179if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015181else
Matthias Kloseb9621712010-04-24 17:59:49 +000015182 ac_cv_c_bigendian=unknown
15183 # See if we're dealing with a universal compiler.
15184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15185/* end confdefs.h. */
15186#ifndef __APPLE_CC__
15187 not a universal capable compiler
15188 #endif
15189 typedef int dummy;
15190
Skip Montanaro6dead952003-09-25 14:50:04 +000015191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015192if ac_fn_c_try_compile "$LINENO"; then :
15193
15194 # Check for potential -arch flags. It is not universal unless
15195 # there are at least two -arch flags with different values.
15196 ac_arch=
15197 ac_prev=
15198 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15199 if test -n "$ac_prev"; then
15200 case $ac_word in
15201 i?86 | x86_64 | ppc | ppc64)
15202 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15203 ac_arch=$ac_word
15204 else
15205 ac_cv_c_bigendian=universal
15206 break
15207 fi
15208 ;;
15209 esac
15210 ac_prev=
15211 elif test "x$ac_word" = "x-arch"; then
15212 ac_prev=arch
15213 fi
15214 done
15215fi
15216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15217 if test $ac_cv_c_bigendian = unknown; then
15218 # See if sys/param.h defines the BYTE_ORDER macro.
15219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015220/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015221#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015222 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015223
Martin v. Löwis11437992002-04-12 09:54:03 +000015224int
15225main ()
15226{
Matthias Kloseb9621712010-04-24 17:59:49 +000015227#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15228 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15229 && LITTLE_ENDIAN)
15230 bogus endian macros
15231 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015232
15233 ;
15234 return 0;
15235}
15236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015237if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015238 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015240/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015241#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015243
Martin v. Löwis11437992002-04-12 09:54:03 +000015244int
15245main ()
15246{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015247#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015248 not big endian
15249 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
15251 ;
15252 return 0;
15253}
15254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015255if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015256 ac_cv_c_bigendian=yes
15257else
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015261fi
15262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15263 fi
15264 if test $ac_cv_c_bigendian = unknown; then
15265 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015267/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015268#include <limits.h>
15269
Martin v. Löwis11437992002-04-12 09:54:03 +000015270int
15271main ()
15272{
Matthias Kloseb9621712010-04-24 17:59:49 +000015273#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15274 bogus endian macros
15275 #endif
15276
Martin v. Löwis11437992002-04-12 09:54:03 +000015277 ;
15278 return 0;
15279}
15280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015281if ac_fn_c_try_compile "$LINENO"; then :
15282 # It does; now see whether it defined to _BIG_ENDIAN or not.
15283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15284/* end confdefs.h. */
15285#include <limits.h>
15286
15287int
15288main ()
15289{
15290#ifndef _BIG_ENDIAN
15291 not big endian
15292 #endif
15293
15294 ;
15295 return 0;
15296}
15297_ACEOF
15298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015299 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015300else
Matthias Kloseb9621712010-04-24 17:59:49 +000015301 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15304fi
15305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15306 fi
15307 if test $ac_cv_c_bigendian = unknown; then
15308 # Compile a test program.
15309 if test "$cross_compiling" = yes; then :
15310 # Try to guess by grepping values from an object file.
15311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15312/* end confdefs.h. */
15313short int ascii_mm[] =
15314 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15315 short int ascii_ii[] =
15316 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15317 int use_ascii (int i) {
15318 return ascii_mm[i] + ascii_ii[i];
15319 }
15320 short int ebcdic_ii[] =
15321 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15322 short int ebcdic_mm[] =
15323 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15324 int use_ebcdic (int i) {
15325 return ebcdic_mm[i] + ebcdic_ii[i];
15326 }
15327 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015328
Matthias Kloseb9621712010-04-24 17:59:49 +000015329int
15330main ()
15331{
15332return use_ascii (foo) == use_ebcdic (foo);
15333 ;
15334 return 0;
15335}
15336_ACEOF
15337if ac_fn_c_try_compile "$LINENO"; then :
15338 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15339 ac_cv_c_bigendian=yes
15340 fi
15341 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15342 if test "$ac_cv_c_bigendian" = unknown; then
15343 ac_cv_c_bigendian=no
15344 else
15345 # finding both strings is unlikely to happen, but who knows?
15346 ac_cv_c_bigendian=unknown
15347 fi
15348 fi
15349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015351else
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015353/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015355int
15356main ()
15357{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358
Matthias Kloseb9621712010-04-24 17:59:49 +000015359 /* Are we little or big endian? From Harbison&Steele. */
15360 union
15361 {
15362 long int l;
15363 char c[sizeof (long int)];
15364 } u;
15365 u.l = 1;
15366 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367
15368 ;
15369 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015370}
Martin v. Löwis11437992002-04-12 09:54:03 +000015371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015372if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015373 ac_cv_c_bigendian=no
15374else
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015376fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15378 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015380
Matthias Kloseb9621712010-04-24 17:59:49 +000015381 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15384$as_echo "$ac_cv_c_bigendian" >&6; }
15385 case $ac_cv_c_bigendian in #(
15386 yes)
15387 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15388;; #(
15389 no)
15390 ;; #(
15391 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015392
Matthias Kloseb9621712010-04-24 17:59:49 +000015393$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015394
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 ;; #(
15396 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015397 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015398 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015399 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015400
Michael W. Hudson54241132001-12-07 15:38:26 +000015401
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015402# ABI version string for Python extension modules. This appears between the
15403# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15404# from the following attributes which affect the ABI of this Python build (in
15405# this order):
15406#
15407# * The Python implementation (always 'cpython-' for us)
15408# * The major and minor version numbers
15409# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015410#
15411# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015412# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15413# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015414#
15415# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15416# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015417
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15419$as_echo_n "checking ABIFLAGS... " >&6; }
15420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15421$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15423$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015424SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15426$as_echo "$SOABI" >&6; }
15427
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015428# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15429if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015430 # Similar to SOABI but remove "d" flag from ABIFLAGS
15431
15432 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15433
15434cat >>confdefs.h <<_ACEOF
15435#define ALT_SOABI "${ALT_SOABI}"
15436_ACEOF
15437
15438fi
15439
Victor Stinner52a327c2020-12-23 03:41:08 +010015440
Matti Picusa44ce6c2020-12-20 04:56:57 +020015441EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015442
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15444$as_echo_n "checking LDVERSION... " >&6; }
15445LDVERSION='$(VERSION)$(ABIFLAGS)'
15446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15447$as_echo "$LDVERSION" >&6; }
15448
E. M. Brayc994c8f2019-05-24 17:33:47 +020015449# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015450
E. M. Brayb1fc4172019-05-24 18:39:39 +020015451if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015452 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015453else
15454 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015455fi
15456
doko@python.org87421192013-01-26 11:39:31 +010015457
Victor Stinner51ae31e2020-06-09 15:32:43 +020015458
15459BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15460
15461
15462# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015463# /usr/$LIDIRNAME/python$VERSION
15464
15465PLATLIBDIR="lib"
15466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15467$as_echo_n "checking for --with-platlibdir... " >&6; }
15468
15469# Check whether --with-platlibdir was given.
15470if test "${with_platlibdir+set}" = set; then :
15471 withval=$with_platlibdir;
15472# ignore 3 options:
15473# --with-platlibdir
15474# --with-platlibdir=
15475# --without-platlibdir
15476if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15477then
15478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15479$as_echo "yes" >&6; }
15480 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015481 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015482else
Victor Stinner8510f432020-03-10 09:53:09 +010015483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15484$as_echo "no" >&6; }
15485fi
15486else
15487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15488$as_echo "no" >&6; }
15489fi
15490
15491
15492
15493
15494if test x$PLATFORM_TRIPLET = x; then
15495 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15496else
15497 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015498fi
doko@python.org87421192013-01-26 11:39:31 +010015499
15500
Victor Stinner75e59a92021-01-20 17:07:21 +010015501# Check for --with-wheel-pkg-dir=PATH
15502
15503WHEEL_PKG_DIR=""
15504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
15505$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; }
15506
15507# Check whether --with-wheel-pkg-dir was given.
15508if test "${with_wheel_pkg_dir+set}" = set; then :
15509 withval=$with_wheel_pkg_dir;
15510if test -n "$withval"; then
15511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15512$as_echo "yes" >&6; }
15513 WHEEL_PKG_DIR="$withval"
15514else
15515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15516$as_echo "no" >&6; }
15517fi
15518else
15519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15520$as_echo "no" >&6; }
15521fi
15522
15523
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015524# Check whether right shifting a negative integer extends the sign bit
15525# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15527$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015528if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015529 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015530else
Martin v. Löwis11437992002-04-12 09:54:03 +000015531
Matthias Kloseb9621712010-04-24 17:59:49 +000015532if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015533 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015534else
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015536/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015537
15538int main()
15539{
Joshua Root674fa0a2020-12-14 07:56:34 +110015540 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015541}
15542
Martin v. Löwis11437992002-04-12 09:54:03 +000015543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015544if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015545 ac_cv_rshift_extends_sign=yes
15546else
Matthias Kloseb9621712010-04-24 17:59:49 +000015547 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15550 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015551fi
15552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015553fi
15554
Matthias Kloseb9621712010-04-24 17:59:49 +000015555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15556$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015557if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015558then
Martin v. Löwis11437992002-04-12 09:54:03 +000015559
Matthias Kloseb9621712010-04-24 17:59:49 +000015560$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015561
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015562fi
15563
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015564# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15566$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015567if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015568 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015569else
Martin v. Löwis11437992002-04-12 09:54:03 +000015570
Matthias Kloseb9621712010-04-24 17:59:49 +000015571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015572/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015573#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015574int
15575main ()
15576{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015577
15578 FILE *f = fopen("/dev/null", "r");
15579 flockfile(f);
15580 getc_unlocked(f);
15581 funlockfile(f);
15582
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 ;
15584 return 0;
15585}
15586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015587if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015588 ac_cv_have_getc_unlocked=yes
15589else
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 ac_cv_have_getc_unlocked=no
15591fi
15592rm -f core conftest.err conftest.$ac_objext \
15593 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595
Matthias Kloseb9621712010-04-24 17:59:49 +000015596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15597$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015598if test "$ac_cv_have_getc_unlocked" = yes
15599then
Martin v. Löwis11437992002-04-12 09:54:03 +000015600
Matthias Kloseb9621712010-04-24 17:59:49 +000015601$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015602
15603fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015604
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015605# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015606# save the value of LIBS so we don't actually link Python with readline
15607LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015608
Gregory P. Smith18820942008-09-07 06:24:49 +000015609# On some systems we need to link readline to a termcap compatible
15610# library. NOTE: Keep the precedence of listed libraries synchronised
15611# with setup.py.
15612py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15614$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015615for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015616 if test -z "$py_libtermcap"; then
15617 READLINE_LIBS="-lreadline"
15618 else
15619 READLINE_LIBS="-lreadline -l$py_libtermcap"
15620 fi
15621 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015623/* end confdefs.h. */
15624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625/* Override any GCC internal prototype to avoid an error.
15626 Use char because int might match the return type of a GCC
15627 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015628#ifdef __cplusplus
15629extern "C"
15630#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015631char readline ();
15632int
15633main ()
15634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015636 ;
15637 return 0;
15638}
15639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015640if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015641 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015643rm -f core conftest.err conftest.$ac_objext \
15644 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015645 if test $py_cv_lib_readline = yes; then
15646 break
15647 fi
15648done
15649# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15650#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015651if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15653$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015654else
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15656$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015657
Matthias Kloseb9621712010-04-24 17:59:49 +000015658$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015659
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015660fi
15661
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015662# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015664/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015665#include <readline/readline.h>
15666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015667if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015668 have_readline=yes
15669else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015670 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015671
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015672fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015673rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015674if test $have_readline = yes
15675then
Matthias Kloseb9621712010-04-24 17:59:49 +000015676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015677/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015678#include <readline/readline.h>
15679
15680_ACEOF
15681if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015682 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015683
Matthias Kloseb9621712010-04-24 17:59:49 +000015684$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015685
15686fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015687rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015688
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015690/* end confdefs.h. */
15691#include <readline/readline.h>
15692
15693_ACEOF
15694if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015698
15699fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015700rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015701
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015702fi
15703
Martin v. Löwis0daad592001-09-30 21:09:59 +000015704# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15706$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015707if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015708 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015709else
Martin v. Löwis11437992002-04-12 09:54:03 +000015710 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015711LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015715/* Override any GCC internal prototype to avoid an error.
15716 Use char because int might match the return type of a GCC
15717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015718#ifdef __cplusplus
15719extern "C"
15720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015721char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015722int
15723main ()
15724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015725return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015726 ;
15727 return 0;
15728}
15729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015730if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015732else
Matthias Kloseb9621712010-04-24 17:59:49 +000015733 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015735rm -f core conftest.err conftest.$ac_objext \
15736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015737LIBS=$ac_check_lib_save_LIBS
15738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15740$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015741if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015742
Matthias Kloseb9621712010-04-24 17:59:49 +000015743$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015744
Martin v. Löwis0daad592001-09-30 21:09:59 +000015745fi
15746
Michael W. Hudson54241132001-12-07 15:38:26 +000015747
Thomas Wouters89d996e2007-09-08 17:39:28 +000015748# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15750$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015751if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015752 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015753else
15754 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015755LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015757/* end confdefs.h. */
15758
15759/* Override any GCC internal prototype to avoid an error.
15760 Use char because int might match the return type of a GCC
15761 builtin and then its argument prototype would still apply. */
15762#ifdef __cplusplus
15763extern "C"
15764#endif
15765char rl_completion_display_matches_hook ();
15766int
15767main ()
15768{
15769return rl_completion_display_matches_hook ();
15770 ;
15771 return 0;
15772}
15773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015774if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015775 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15776else
Matthias Kloseb9621712010-04-24 17:59:49 +000015777 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015779rm -f core conftest.err conftest.$ac_objext \
15780 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015781LIBS=$ac_check_lib_save_LIBS
15782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15784$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015785if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015786
Matthias Kloseb9621712010-04-24 17:59:49 +000015787$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015788
15789fi
15790
15791
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015792# also in 4.0, but not in editline
15793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15794$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15795if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15796 $as_echo_n "(cached) " >&6
15797else
15798 ac_check_lib_save_LIBS=$LIBS
15799LIBS="-lreadline $READLINE_LIBS $LIBS"
15800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15801/* end confdefs.h. */
15802
15803/* Override any GCC internal prototype to avoid an error.
15804 Use char because int might match the return type of a GCC
15805 builtin and then its argument prototype would still apply. */
15806#ifdef __cplusplus
15807extern "C"
15808#endif
15809char rl_resize_terminal ();
15810int
15811main ()
15812{
15813return rl_resize_terminal ();
15814 ;
15815 return 0;
15816}
15817_ACEOF
15818if ac_fn_c_try_link "$LINENO"; then :
15819 ac_cv_lib_readline_rl_resize_terminal=yes
15820else
15821 ac_cv_lib_readline_rl_resize_terminal=no
15822fi
15823rm -f core conftest.err conftest.$ac_objext \
15824 conftest$ac_exeext conftest.$ac_ext
15825LIBS=$ac_check_lib_save_LIBS
15826fi
15827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15828$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15829if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15830
15831$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15832
15833fi
15834
15835
Martin v. Löwis0daad592001-09-30 21:09:59 +000015836# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15838$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015839if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015840 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015841else
Martin v. Löwis11437992002-04-12 09:54:03 +000015842 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015843LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015847/* Override any GCC internal prototype to avoid an error.
15848 Use char because int might match the return type of a GCC
15849 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015850#ifdef __cplusplus
15851extern "C"
15852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015853char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015854int
15855main ()
15856{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015857return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015858 ;
15859 return 0;
15860}
15861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015862if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015864else
Matthias Kloseb9621712010-04-24 17:59:49 +000015865 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015867rm -f core conftest.err conftest.$ac_objext \
15868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015869LIBS=$ac_check_lib_save_LIBS
15870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15872$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015873if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015876
Guido van Rossum353ae582001-07-10 16:45:32 +000015877fi
15878
Jack Jansendd19cf82001-12-06 22:36:17 +000015879
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015880# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015882/* end confdefs.h. */
15883#include <readline/readline.h>
15884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015885if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015886 have_readline=yes
15887else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015888 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015889
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015890fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015891rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015892if test $have_readline = yes
15893then
Matthias Kloseb9621712010-04-24 17:59:49 +000015894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015895/* end confdefs.h. */
15896#include <readline/readline.h>
15897
15898_ACEOF
15899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015900 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015901
Matthias Kloseb9621712010-04-24 17:59:49 +000015902$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015903
15904fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015905rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015906
15907fi
15908
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15910$as_echo_n "checking for append_history in -lreadline... " >&6; }
15911if ${ac_cv_lib_readline_append_history+:} false; then :
15912 $as_echo_n "(cached) " >&6
15913else
15914 ac_check_lib_save_LIBS=$LIBS
15915LIBS="-lreadline $READLINE_LIBS $LIBS"
15916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15917/* end confdefs.h. */
15918
15919/* Override any GCC internal prototype to avoid an error.
15920 Use char because int might match the return type of a GCC
15921 builtin and then its argument prototype would still apply. */
15922#ifdef __cplusplus
15923extern "C"
15924#endif
15925char append_history ();
15926int
15927main ()
15928{
15929return append_history ();
15930 ;
15931 return 0;
15932}
15933_ACEOF
15934if ac_fn_c_try_link "$LINENO"; then :
15935 ac_cv_lib_readline_append_history=yes
15936else
15937 ac_cv_lib_readline_append_history=no
15938fi
15939rm -f core conftest.err conftest.$ac_objext \
15940 conftest$ac_exeext conftest.$ac_ext
15941LIBS=$ac_check_lib_save_LIBS
15942fi
15943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15944$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15945if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15946
15947$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15948
15949fi
15950
15951
Martin v. Löwis82bca632006-02-10 20:49:30 +000015952# End of readline checks: restore LIBS
15953LIBS=$LIBS_no_readline
15954
Matthias Kloseb9621712010-04-24 17:59:49 +000015955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15956$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015957if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015958 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015959else
Martin v. Löwis11437992002-04-12 09:54:03 +000015960
Matthias Kloseb9621712010-04-24 17:59:49 +000015961if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015962 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015963else
Matthias Kloseb9621712010-04-24 17:59:49 +000015964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015965/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015966
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015967#include <stdlib.h>
15968#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015969int main()
15970{
15971 int val1 = nice(1);
15972 if (val1 != -1 && val1 == nice(2))
15973 exit(0);
15974 exit(1);
15975}
15976
Martin v. Löwis11437992002-04-12 09:54:03 +000015977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015978if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015979 ac_cv_broken_nice=yes
15980else
Matthias Kloseb9621712010-04-24 17:59:49 +000015981 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15984 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015985fi
15986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015987fi
15988
Matthias Kloseb9621712010-04-24 17:59:49 +000015989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15990$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015991if test "$ac_cv_broken_nice" = yes
15992then
Martin v. Löwis11437992002-04-12 09:54:03 +000015993
Matthias Kloseb9621712010-04-24 17:59:49 +000015994$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015995
15996fi
15997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15999$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016000if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016001 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016002else
Matthias Kloseb9621712010-04-24 17:59:49 +000016003 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016004 ac_cv_broken_poll=no
16005else
Matthias Kloseb9621712010-04-24 17:59:49 +000016006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016007/* end confdefs.h. */
16008
16009#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110016010#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016011
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016012int main()
16013{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016014 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016015 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016016
16017 close (42);
16018
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016019 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016020 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016021 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016022 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016023 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016024 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016025 return 1;
16026}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016027
16028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016029if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016030 ac_cv_broken_poll=yes
16031else
Matthias Kloseb9621712010-04-24 17:59:49 +000016032 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16035 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016037
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016038fi
16039
Matthias Kloseb9621712010-04-24 17:59:49 +000016040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
16041$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016042if test "$ac_cv_broken_poll" = yes
16043then
16044
Matthias Kloseb9621712010-04-24 17:59:49 +000016045$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016046
16047fi
16048
Martin v. Löwis1d459062005-03-14 21:23:33 +000016049# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000016050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
16051$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016052if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016053 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016054else
16055
Matthias Kloseb9621712010-04-24 17:59:49 +000016056if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016057 ac_cv_working_tzset=no
16058else
Matthias Kloseb9621712010-04-24 17:59:49 +000016059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016060/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016061
16062#include <stdlib.h>
16063#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000016064#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000016065
16066#if HAVE_TZNAME
16067extern char *tzname[];
16068#endif
16069
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016070int main()
16071{
Brett Cannon18367812003-09-19 00:59:16 +000016072 /* Note that we need to ensure that not only does tzset(3)
16073 do 'something' with localtime, but it works as documented
16074 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016075 This includes making sure that tzname is set properly if
16076 tm->tm_zone does not exist since it is the alternative way
16077 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016078
16079 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016080 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016081 */
16082
Martin v. Löwis1d459062005-03-14 21:23:33 +000016083 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016084 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16085
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016086 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016087 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016088 if (localtime(&groundhogday)->tm_hour != 0)
16089 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016090#if HAVE_TZNAME
16091 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16092 if (strcmp(tzname[0], "UTC") ||
16093 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16094 exit(1);
16095#endif
Brett Cannon18367812003-09-19 00:59:16 +000016096
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016097 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016098 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016099 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016100 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016101#if HAVE_TZNAME
16102 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16103 exit(1);
16104#endif
Brett Cannon18367812003-09-19 00:59:16 +000016105
16106 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16107 tzset();
16108 if (localtime(&groundhogday)->tm_hour != 11)
16109 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016110#if HAVE_TZNAME
16111 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16112 exit(1);
16113#endif
16114
16115#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016116 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16117 exit(1);
16118 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16119 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016120#endif
Brett Cannon18367812003-09-19 00:59:16 +000016121
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016122 exit(0);
16123}
16124
16125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016126if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016127 ac_cv_working_tzset=yes
16128else
Matthias Kloseb9621712010-04-24 17:59:49 +000016129 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16132 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016133fi
16134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016135fi
16136
Matthias Kloseb9621712010-04-24 17:59:49 +000016137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16138$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016139if test "$ac_cv_working_tzset" = yes
16140then
16141
Matthias Kloseb9621712010-04-24 17:59:49 +000016142$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016143
16144fi
16145
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016146# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16148$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016149if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016150 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016151else
Matthias Kloseb9621712010-04-24 17:59:49 +000016152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016153/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016154#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016155int
16156main ()
16157{
16158
16159struct stat st;
16160st.st_mtim.tv_nsec = 1;
16161
16162 ;
16163 return 0;
16164}
16165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016166if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016167 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016168else
Matthias Kloseb9621712010-04-24 17:59:49 +000016169 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16172fi
16173
Matthias Kloseb9621712010-04-24 17:59:49 +000016174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16175$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016176if test "$ac_cv_stat_tv_nsec" = yes
16177then
16178
Matthias Kloseb9621712010-04-24 17:59:49 +000016179$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016180
16181fi
16182
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016183# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16185$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016186if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016187 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016188else
Matthias Kloseb9621712010-04-24 17:59:49 +000016189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016190/* end confdefs.h. */
16191#include <sys/stat.h>
16192int
16193main ()
16194{
16195
16196struct stat st;
16197st.st_mtimespec.tv_nsec = 1;
16198
16199 ;
16200 return 0;
16201}
16202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016204 ac_cv_stat_tv_nsec2=yes
16205else
Matthias Kloseb9621712010-04-24 17:59:49 +000016206 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16209fi
16210
Matthias Kloseb9621712010-04-24 17:59:49 +000016211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16212$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016213if test "$ac_cv_stat_tv_nsec2" = yes
16214then
16215
Matthias Kloseb9621712010-04-24 17:59:49 +000016216$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016217
16218fi
16219
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016220# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016221ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016222if test "$cross_compiling" = no; then
16223 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16224fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016225
16226for ac_header in curses.h ncurses.h
16227do :
16228 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16229ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16230if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16231 cat >>confdefs.h <<_ACEOF
16232#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16233_ACEOF
16234
16235fi
16236
16237done
16238
16239
16240# On Solaris, term.h requires curses.h
16241for ac_header in term.h
16242do :
16243 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16244#ifdef HAVE_CURSES_H
16245#include <curses.h>
16246#endif
16247
16248"
16249if test "x$ac_cv_header_term_h" = xyes; then :
16250 cat >>confdefs.h <<_ACEOF
16251#define HAVE_TERM_H 1
16252_ACEOF
16253
16254fi
16255
16256done
16257
16258
Jack Jansen666b1e72001-10-31 12:11:48 +000016259# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16261$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016262if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016263 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016264else
Matthias Kloseb9621712010-04-24 17:59:49 +000016265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016266/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016267#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016268int
16269main ()
16270{
Jack Jansen666b1e72001-10-31 12:11:48 +000016271
16272 int rtn;
16273 rtn = mvwdelch(0,0,0);
16274
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 ;
16276 return 0;
16277}
16278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016279if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016280 ac_cv_mvwdelch_is_expression=yes
16281else
Matthias Kloseb9621712010-04-24 17:59:49 +000016282 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16285fi
16286
Matthias Kloseb9621712010-04-24 17:59:49 +000016287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16288$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016289
16290if test "$ac_cv_mvwdelch_is_expression" = yes
16291then
Martin v. Löwis11437992002-04-12 09:54:03 +000016292
Matthias Kloseb9621712010-04-24 17:59:49 +000016293$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016294
16295fi
16296
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016297# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16298# structs since version 5.7. If the macro is defined as zero before including
16299# [n]curses.h, ncurses will expose fields of the structs regardless of the
16300# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16302$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016303if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016304 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016305else
Matthias Kloseb9621712010-04-24 17:59:49 +000016306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016307/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016308
16309 #define NCURSES_OPAQUE 0
16310 #include <curses.h>
16311
Martin v. Löwis11437992002-04-12 09:54:03 +000016312int
16313main ()
16314{
Jack Jansen666b1e72001-10-31 12:11:48 +000016315
16316 WINDOW *w;
16317 w->_flags = 0;
16318
Martin v. Löwis11437992002-04-12 09:54:03 +000016319 ;
16320 return 0;
16321}
16322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016323if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016324 ac_cv_window_has_flags=yes
16325else
Matthias Kloseb9621712010-04-24 17:59:49 +000016326 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16329fi
16330
Matthias Kloseb9621712010-04-24 17:59:49 +000016331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16332$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016333
Jack Jansen666b1e72001-10-31 12:11:48 +000016334
16335if test "$ac_cv_window_has_flags" = yes
16336then
Martin v. Löwis11437992002-04-12 09:54:03 +000016337
Matthias Kloseb9621712010-04-24 17:59:49 +000016338$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016339
16340fi
16341
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16343$as_echo_n "checking for is_pad... " >&6; }
16344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16345/* end confdefs.h. */
16346#include <curses.h>
16347int
16348main ()
16349{
16350
16351#ifndef is_pad
16352void *x=is_pad
16353#endif
16354
16355 ;
16356 return 0;
16357}
16358_ACEOF
16359if ac_fn_c_try_compile "$LINENO"; then :
16360
16361$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16362
16363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16364$as_echo "yes" >&6; }
16365else
16366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16367$as_echo "no" >&6; }
16368
16369fi
16370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16371
Matthias Kloseb9621712010-04-24 17:59:49 +000016372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16373$as_echo_n "checking for is_term_resized... " >&6; }
16374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016375/* end confdefs.h. */
16376#include <curses.h>
16377int
16378main ()
16379{
16380void *x=is_term_resized
16381 ;
16382 return 0;
16383}
16384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016386
Matthias Kloseb9621712010-04-24 17:59:49 +000016387$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016388
Matthias Kloseb159a552010-04-25 21:00:44 +000016389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016390$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016391else
Matthias Kloseb9621712010-04-24 17:59:49 +000016392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16393$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016394
16395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016396rm -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 resize_term" >&5
16399$as_echo_n "checking for resize_term... " >&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=resize_term
16407 ;
16408 return 0;
16409}
16410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016411if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016412
Matthias Kloseb9621712010-04-24 17:59:49 +000016413$as_echo "#define HAVE_CURSES_RESIZE_TERM 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 resizeterm" >&5
16425$as_echo_n "checking for resizeterm... " >&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=resizeterm
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_RESIZETERM 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
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016449
16450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16451$as_echo_n "checking for immedok... " >&6; }
16452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16453/* end confdefs.h. */
16454#include <curses.h>
16455int
16456main ()
16457{
16458
16459#ifndef immedok
16460void *x=immedok
16461#endif
16462
16463 ;
16464 return 0;
16465}
16466_ACEOF
16467if ac_fn_c_try_compile "$LINENO"; then :
16468
16469$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16470
16471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16472$as_echo "yes" >&6; }
16473else
16474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16475$as_echo "no" >&6; }
16476
16477fi
16478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16479
16480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16481$as_echo_n "checking for syncok... " >&6; }
16482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16483/* end confdefs.h. */
16484#include <curses.h>
16485int
16486main ()
16487{
16488
16489#ifndef syncok
16490void *x=syncok
16491#endif
16492
16493 ;
16494 return 0;
16495}
16496_ACEOF
16497if ac_fn_c_try_compile "$LINENO"; then :
16498
16499$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16500
16501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16502$as_echo "yes" >&6; }
16503else
16504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16505$as_echo "no" >&6; }
16506
16507fi
16508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16509
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16511$as_echo_n "checking for wchgat... " >&6; }
16512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16513/* end confdefs.h. */
16514#include <curses.h>
16515int
16516main ()
16517{
16518
16519#ifndef wchgat
16520void *x=wchgat
16521#endif
16522
16523 ;
16524 return 0;
16525}
16526_ACEOF
16527if ac_fn_c_try_compile "$LINENO"; then :
16528
16529$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16530
16531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16532$as_echo "yes" >&6; }
16533else
16534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16535$as_echo "no" >&6; }
16536
16537fi
16538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16539
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16541$as_echo_n "checking for filter... " >&6; }
16542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16543/* end confdefs.h. */
16544#include <curses.h>
16545int
16546main ()
16547{
16548
16549#ifndef filter
16550void *x=filter
16551#endif
16552
16553 ;
16554 return 0;
16555}
16556_ACEOF
16557if ac_fn_c_try_compile "$LINENO"; then :
16558
16559$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16560
16561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16562$as_echo "yes" >&6; }
16563else
16564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16565$as_echo "no" >&6; }
16566
16567fi
16568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16569
16570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16571$as_echo_n "checking for has_key... " >&6; }
16572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16573/* end confdefs.h. */
16574#include <curses.h>
16575int
16576main ()
16577{
16578
16579#ifndef has_key
16580void *x=has_key
16581#endif
16582
16583 ;
16584 return 0;
16585}
16586_ACEOF
16587if ac_fn_c_try_compile "$LINENO"; then :
16588
16589$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16590
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16592$as_echo "yes" >&6; }
16593else
16594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16595$as_echo "no" >&6; }
16596
16597fi
16598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16599
16600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16601$as_echo_n "checking for typeahead... " >&6; }
16602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16603/* end confdefs.h. */
16604#include <curses.h>
16605int
16606main ()
16607{
16608
16609#ifndef typeahead
16610void *x=typeahead
16611#endif
16612
16613 ;
16614 return 0;
16615}
16616_ACEOF
16617if ac_fn_c_try_compile "$LINENO"; then :
16618
16619$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16620
16621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16622$as_echo "yes" >&6; }
16623else
16624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16625$as_echo "no" >&6; }
16626
16627fi
16628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16629
16630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16631$as_echo_n "checking for use_env... " >&6; }
16632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16633/* end confdefs.h. */
16634#include <curses.h>
16635int
16636main ()
16637{
16638
16639#ifndef use_env
16640void *x=use_env
16641#endif
16642
16643 ;
16644 return 0;
16645}
16646_ACEOF
16647if ac_fn_c_try_compile "$LINENO"; then :
16648
16649$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16650
16651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16652$as_echo "yes" >&6; }
16653else
16654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16655$as_echo "no" >&6; }
16656
16657fi
16658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016659# last curses configure check
16660CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16663$as_echo "$as_me: checking for device files" >&6;}
16664
16665if test "x$cross_compiling" = xyes; then
16666 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16668$as_echo_n "checking for /dev/ptmx... " >&6; }
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16670$as_echo "not set" >&6; }
16671 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16672 fi
16673 if test "${ac_cv_file__dev_ptc+set}" != set; then
16674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16675$as_echo_n "checking for /dev/ptc... " >&6; }
16676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16677$as_echo "not set" >&6; }
16678 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16679 fi
16680fi
16681
Matthias Kloseb9621712010-04-24 17:59:49 +000016682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16683$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016684if ${ac_cv_file__dev_ptmx+:} false; then :
16685 $as_echo_n "(cached) " >&6
16686else
16687 test "$cross_compiling" = yes &&
16688 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16689if test -r "/dev/ptmx"; then
16690 ac_cv_file__dev_ptmx=yes
16691else
16692 ac_cv_file__dev_ptmx=no
16693fi
16694fi
16695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16696$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16697if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016698
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016699fi
16700
16701if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016702
Matthias Kloseb9621712010-04-24 17:59:49 +000016703$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016704
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16707$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016708if ${ac_cv_file__dev_ptc+:} false; then :
16709 $as_echo_n "(cached) " >&6
16710else
16711 test "$cross_compiling" = yes &&
16712 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16713if test -r "/dev/ptc"; then
16714 ac_cv_file__dev_ptc=yes
16715else
16716 ac_cv_file__dev_ptc=no
16717fi
16718fi
16719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16720$as_echo "$ac_cv_file__dev_ptc" >&6; }
16721if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016722
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016723fi
16724
16725if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016726
Matthias Kloseb9621712010-04-24 17:59:49 +000016727$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016728
Neal Norwitz865400f2003-03-21 01:42:58 +000016729fi
16730
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016731if test $ac_sys_system = Darwin
16732then
16733 LIBS="$LIBS -framework CoreFoundation"
16734fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016735
Matthias Kloseb9621712010-04-24 17:59:49 +000016736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16737$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016738if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016739 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016740else
Matthias Kloseb9621712010-04-24 17:59:49 +000016741 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016742 ac_cv_have_size_t_format="cross -- assuming yes"
16743
Thomas Wouters477c8d52006-05-27 19:21:47 +000016744else
Matthias Kloseb9621712010-04-24 17:59:49 +000016745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016746/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016747
Thomas Wouters477c8d52006-05-27 19:21:47 +000016748#include <stdio.h>
16749#include <stddef.h>
16750#include <string.h>
16751
Christian Heimes2c181612007-12-17 20:04:13 +000016752#ifdef HAVE_SYS_TYPES_H
16753#include <sys/types.h>
16754#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016755
16756#ifdef HAVE_SSIZE_T
16757typedef ssize_t Py_ssize_t;
16758#elif SIZEOF_VOID_P == SIZEOF_LONG
16759typedef long Py_ssize_t;
16760#else
16761typedef int Py_ssize_t;
16762#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016763
Christian Heimes2c181612007-12-17 20:04:13 +000016764int main()
16765{
16766 char buffer[256];
16767
Thomas Wouters477c8d52006-05-27 19:21:47 +000016768 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16769 return 1;
16770
Thomas Wouters89f507f2006-12-13 04:49:30 +000016771 if (strcmp(buffer, "123"))
16772 return 1;
16773
16774 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16775 return 1;
16776
16777 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016778 return 1;
16779
16780 return 0;
16781}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016782
Thomas Wouters477c8d52006-05-27 19:21:47 +000016783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016784if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016785 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016786else
Matthias Kloseb9621712010-04-24 17:59:49 +000016787 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16790 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016791fi
16792
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16795$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016796if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016797
Matthias Kloseb9621712010-04-24 17:59:49 +000016798$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016799
16800fi
16801
Matthias Kloseb9621712010-04-24 17:59:49 +000016802ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016803#ifdef HAVE_SYS_TYPES_H
16804#include <sys/types.h>
16805#endif
16806#ifdef HAVE_SYS_SOCKET_H
16807#include <sys/socket.h>
16808#endif
16809
Matthias Kloseb9621712010-04-24 17:59:49 +000016810"
Victor Stinnere0be4232011-10-25 13:06:09 +020016811if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016812
Martin v. Löwis11437992002-04-12 09:54:03 +000016813else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016814
Matthias Kloseb9621712010-04-24 17:59:49 +000016815$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016816
16817fi
16818
Michael W. Hudson54241132001-12-07 15:38:26 +000016819
Matthias Kloseb9621712010-04-24 17:59:49 +000016820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16821$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016822if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016823 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016824else
Matthias Kloseb9621712010-04-24 17:59:49 +000016825 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016826 ac_cv_broken_mbstowcs=no
16827else
Matthias Kloseb9621712010-04-24 17:59:49 +000016828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016829/* end confdefs.h. */
16830
Stefan Krah19c21392012-11-22 23:47:32 +010016831#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016832#include<stdlib.h>
16833int main() {
16834 size_t len = -1;
16835 const char *str = "text";
16836 len = mbstowcs(NULL, str, 0);
16837 return (len != 4);
16838}
16839
16840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016841if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016842 ac_cv_broken_mbstowcs=no
16843else
Matthias Kloseb9621712010-04-24 17:59:49 +000016844 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016848fi
16849
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016850fi
16851
Matthias Kloseb9621712010-04-24 17:59:49 +000016852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16853$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016854if test "$ac_cv_broken_mbstowcs" = yes
16855then
16856
Matthias Kloseb9621712010-04-24 17:59:49 +000016857$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016858
16859fi
16860
Antoine Pitroub52ec782009-01-25 16:34:23 +000016861# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16863$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016864
16865# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016866if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016867 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016868if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016869then
16870
Matthias Kloseb9621712010-04-24 17:59:49 +000016871$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016872
Matthias Kloseb9621712010-04-24 17:59:49 +000016873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16874$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016875fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016876if test "$withval" = no
16877then
16878
16879$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16880
Matthias Kloseb9621712010-04-24 17:59:49 +000016881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16882$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016883fi
16884
Antoine Pitrou042b1282010-08-13 21:15:58 +000016885else
16886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16887$as_echo "no value specified" >&6; }
16888fi
16889
Antoine Pitroub52ec782009-01-25 16:34:23 +000016890
Matthias Kloseb17289e2012-03-15 19:51:34 +010016891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16892$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16893if ${ac_cv_computed_gotos+:} false; then :
16894 $as_echo_n "(cached) " >&6
16895else
16896 if test "$cross_compiling" = yes; then :
16897 if test "${with_computed_gotos+set}" = set; then
16898 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16899 else
16900 ac_cv_computed_gotos=no
16901 fi
16902else
16903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16904/* end confdefs.h. */
16905
16906int main(int argc, char **argv)
16907{
16908 static void *targets[1] = { &&LABEL1 };
16909 goto LABEL2;
16910LABEL1:
16911 return 0;
16912LABEL2:
16913 goto *targets[0];
16914 return 1;
16915}
16916
16917_ACEOF
16918if ac_fn_c_try_run "$LINENO"; then :
16919 ac_cv_computed_gotos=yes
16920else
16921 ac_cv_computed_gotos=no
16922fi
16923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16924 conftest.$ac_objext conftest.beam conftest.$ac_ext
16925fi
16926
16927fi
16928
16929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16930$as_echo "$ac_cv_computed_gotos" >&6; }
16931case "$ac_cv_computed_gotos" in yes*)
16932
16933$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16934
16935esac
16936
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016937case $ac_sys_system in
16938AIX*)
16939
16940$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16941 ;;
16942esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016943
Michael W. Hudson54241132001-12-07 15:38:26 +000016944
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016945
16946
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016947for h in `(cd $srcdir;echo Python/thread_*.h)`
16948do
16949 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16950done
16951
Michael W. Hudson54241132001-12-07 15:38:26 +000016952
Ned Deily8d02f912020-06-25 10:46:44 -040016953SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16955$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016956for dir in $SRCDIRS; do
16957 if test ! -d $dir; then
16958 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016959 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016960done
Matthias Kloseb9621712010-04-24 17:59:49 +000016961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16962$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016963
Stefan Krah1919b7e2012-03-21 18:25:23 +010016964# Availability of -O2:
16965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16966$as_echo_n "checking for -O2... " >&6; }
16967saved_cflags="$CFLAGS"
16968CFLAGS="-O2"
16969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16970/* end confdefs.h. */
16971
16972int
16973main ()
16974{
16975
16976
16977 ;
16978 return 0;
16979}
16980_ACEOF
16981if ac_fn_c_try_compile "$LINENO"; then :
16982 have_O2=yes
16983else
16984 have_O2=no
16985fi
16986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16988$as_echo "$have_O2" >&6; }
16989CFLAGS="$saved_cflags"
16990
16991# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16992# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16994$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16995saved_cflags="$CFLAGS"
16996CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16997if test "$have_O2" = no; then
16998 CFLAGS=""
16999fi
17000if test "$cross_compiling" = yes; then :
17001 have_glibc_memmove_bug=undefined
17002else
17003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17004/* end confdefs.h. */
17005
17006#include <stdio.h>
17007#include <stdlib.h>
17008#include <string.h>
17009void foo(void *p, void *q) { memmove(p, q, 19); }
17010int main() {
17011 char a[32] = "123456789000000000";
17012 foo(&a[9], a);
17013 if (strcmp(a, "123456789123456789000000000") != 0)
17014 return 1;
17015 foo(a, &a[9]);
17016 if (strcmp(a, "123456789000000000") != 0)
17017 return 1;
17018 return 0;
17019}
17020
17021_ACEOF
17022if ac_fn_c_try_run "$LINENO"; then :
17023 have_glibc_memmove_bug=no
17024else
17025 have_glibc_memmove_bug=yes
17026fi
17027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17028 conftest.$ac_objext conftest.beam conftest.$ac_ext
17029fi
17030
17031CFLAGS="$saved_cflags"
17032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
17033$as_echo "$have_glibc_memmove_bug" >&6; }
17034if test "$have_glibc_memmove_bug" = yes; then
17035
17036$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
17037
17038fi
17039
17040if test "$have_gcc_asm_for_x87" = yes; then
17041 # Some versions of gcc miscompile inline asm:
17042 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
17043 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
17044 case $CC in
17045 *gcc*)
17046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
17047$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
17048 saved_cflags="$CFLAGS"
17049 CFLAGS="-O2"
17050 if test "$cross_compiling" = yes; then :
17051 have_ipa_pure_const_bug=undefined
17052else
17053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17054/* end confdefs.h. */
17055
17056 __attribute__((noinline)) int
17057 foo(int *p) {
17058 int r;
17059 asm ( "movl \$6, (%1)\n\t"
17060 "xorl %0, %0\n\t"
17061 : "=r" (r) : "r" (p) : "memory"
17062 );
17063 return r;
17064 }
17065 int main() {
17066 int p = 8;
17067 if ((foo(&p) ? : p) != 6)
17068 return 1;
17069 return 0;
17070 }
17071
17072_ACEOF
17073if ac_fn_c_try_run "$LINENO"; then :
17074 have_ipa_pure_const_bug=no
17075else
17076 have_ipa_pure_const_bug=yes
17077fi
17078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17079 conftest.$ac_objext conftest.beam conftest.$ac_ext
17080fi
17081
17082 CFLAGS="$saved_cflags"
17083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17084$as_echo "$have_ipa_pure_const_bug" >&6; }
17085 if test "$have_ipa_pure_const_bug" = yes; then
17086
17087$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
17088
17089 fi
17090 ;;
17091 esac
17092fi
17093
Victor Stinner4f5366e2015-01-09 02:13:19 +010017094# Check for stdatomic.h
17095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17096$as_echo_n "checking for stdatomic.h... " >&6; }
17097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17098/* end confdefs.h. */
17099
17100
17101 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017102 atomic_int int_var;
17103 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017104 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017105 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17106 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17107 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017108 return 0;
17109 }
17110
17111
17112_ACEOF
17113if ac_fn_c_try_link "$LINENO"; then :
17114 have_stdatomic_h=yes
17115else
17116 have_stdatomic_h=no
17117fi
17118rm -f core conftest.err conftest.$ac_objext \
17119 conftest$ac_exeext conftest.$ac_ext
17120
17121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17122$as_echo "$have_stdatomic_h" >&6; }
17123
17124if test "$have_stdatomic_h" = yes; then
17125
17126$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
17127
17128fi
17129
Victor Stinner52a327c2020-12-23 03:41:08 +010017130# Check for GCC >= 4.7 and clang __atomic builtin functions
17131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
17132$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17134/* end confdefs.h. */
17135
17136
Victor Stinner52a327c2020-12-23 03:41:08 +010017137 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017138 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010017139 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
17140 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017141 return 0;
17142 }
17143
17144
17145_ACEOF
17146if ac_fn_c_try_link "$LINENO"; then :
17147 have_builtin_atomic=yes
17148else
17149 have_builtin_atomic=no
17150fi
17151rm -f core conftest.err conftest.$ac_objext \
17152 conftest$ac_exeext conftest.$ac_ext
17153
17154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17155$as_echo "$have_builtin_atomic" >&6; }
17156
17157if test "$have_builtin_atomic" = yes; then
17158
17159$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17160
17161fi
17162
Ned Deily322f5ba2013-11-21 23:01:59 -080017163# ensurepip option
17164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17165$as_echo_n "checking for ensurepip... " >&6; }
17166
17167# Check whether --with-ensurepip was given.
17168if test "${with_ensurepip+set}" = set; then :
17169 withval=$with_ensurepip;
17170else
17171 with_ensurepip=upgrade
17172fi
17173
17174case $with_ensurepip in #(
17175 yes|upgrade) :
17176 ENSUREPIP=upgrade ;; #(
17177 install) :
17178 ENSUREPIP=install ;; #(
17179 no) :
17180 ENSUREPIP=no ;; #(
17181 *) :
17182 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17183esac
17184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17185$as_echo "$ENSUREPIP" >&6; }
17186
17187
Victor Stinner35a97c02015-03-08 02:59:09 +010017188# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17190$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17192/* end confdefs.h. */
17193
17194
17195 #include <dirent.h>
17196
17197 int main() {
17198 struct dirent entry;
17199 return entry.d_type == DT_UNKNOWN;
17200 }
17201
17202
17203_ACEOF
17204if ac_fn_c_try_link "$LINENO"; then :
17205 have_dirent_d_type=yes
17206else
17207 have_dirent_d_type=no
17208fi
17209rm -f core conftest.err conftest.$ac_objext \
17210 conftest$ac_exeext conftest.$ac_ext
17211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17212$as_echo "$have_dirent_d_type" >&6; }
17213
17214if test "$have_dirent_d_type" = yes; then
17215
17216$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17217
17218fi
17219
Victor Stinner9eb57c52015-03-19 22:21:49 +010017220# check if the Linux getrandom() syscall is available
17221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17222$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17224/* end confdefs.h. */
17225
17226
Victor Stinner1b80b242016-04-12 22:34:58 +020017227 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017228 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017229 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017230
17231 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017232 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017233 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017234 const int flags = GRND_NONBLOCK;
17235 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017236 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017237 return 0;
17238 }
17239
17240
17241_ACEOF
17242if ac_fn_c_try_link "$LINENO"; then :
17243 have_getrandom_syscall=yes
17244else
17245 have_getrandom_syscall=no
17246fi
17247rm -f core conftest.err conftest.$ac_objext \
17248 conftest$ac_exeext conftest.$ac_ext
17249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17250$as_echo "$have_getrandom_syscall" >&6; }
17251
17252if test "$have_getrandom_syscall" = yes; then
17253
17254$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17255
17256fi
17257
Victor Stinner3abf44e2015-09-18 15:38:37 +020017258# check if the getrandom() function is available
17259# the test was written for the Solaris function of <sys/random.h>
17260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17261$as_echo_n "checking for the getrandom() function... " >&6; }
17262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17263/* end confdefs.h. */
17264
17265
17266 #include <sys/random.h>
17267
17268 int main() {
17269 char buffer[1];
17270 const size_t buflen = sizeof(buffer);
17271 const int flags = 0;
17272 /* ignore the result, Python checks for ENOSYS at runtime */
17273 (void)getrandom(buffer, buflen, flags);
17274 return 0;
17275 }
17276
17277
17278_ACEOF
17279if ac_fn_c_try_link "$LINENO"; then :
17280 have_getrandom=yes
17281else
17282 have_getrandom=no
17283fi
17284rm -f core conftest.err conftest.$ac_objext \
17285 conftest$ac_exeext conftest.$ac_ext
17286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17287$as_echo "$have_getrandom" >&6; }
17288
17289if test "$have_getrandom" = yes; then
17290
17291$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17292
17293fi
17294
Neil Schemenauer5741c452019-02-08 10:48:46 -080017295# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17296# shm_* may only be available if linking against librt
17297save_LIBS="$LIBS"
17298save_includes_default="$ac_includes_default"
17299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17300$as_echo_n "checking for library containing shm_open... " >&6; }
17301if ${ac_cv_search_shm_open+:} false; then :
17302 $as_echo_n "(cached) " >&6
17303else
17304 ac_func_search_save_LIBS=$LIBS
17305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17306/* end confdefs.h. */
17307
17308/* Override any GCC internal prototype to avoid an error.
17309 Use char because int might match the return type of a GCC
17310 builtin and then its argument prototype would still apply. */
17311#ifdef __cplusplus
17312extern "C"
17313#endif
17314char shm_open ();
17315int
17316main ()
17317{
17318return shm_open ();
17319 ;
17320 return 0;
17321}
17322_ACEOF
17323for ac_lib in '' rt; do
17324 if test -z "$ac_lib"; then
17325 ac_res="none required"
17326 else
17327 ac_res=-l$ac_lib
17328 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17329 fi
17330 if ac_fn_c_try_link "$LINENO"; then :
17331 ac_cv_search_shm_open=$ac_res
17332fi
17333rm -f core conftest.err conftest.$ac_objext \
17334 conftest$ac_exeext
17335 if ${ac_cv_search_shm_open+:} false; then :
17336 break
17337fi
17338done
17339if ${ac_cv_search_shm_open+:} false; then :
17340
17341else
17342 ac_cv_search_shm_open=no
17343fi
17344rm conftest.$ac_ext
17345LIBS=$ac_func_search_save_LIBS
17346fi
17347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17348$as_echo "$ac_cv_search_shm_open" >&6; }
17349ac_res=$ac_cv_search_shm_open
17350if test "$ac_res" != no; then :
17351 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17352
17353fi
17354
17355if test "$ac_cv_search_shm_open" = "-lrt"; then
17356
17357$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17358
17359fi
17360for ac_header in sys/mman.h
17361do :
17362 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17363if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17364 cat >>confdefs.h <<_ACEOF
17365#define HAVE_SYS_MMAN_H 1
17366_ACEOF
17367
17368fi
17369
17370done
17371
17372# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17373ac_includes_default="\
17374${ac_includes_default}
17375#ifndef __cplusplus
17376# ifdef HAVE_SYS_MMAN_H
17377# include <sys/mman.h>
17378# endif
17379#endif
17380"
17381for ac_func in shm_open shm_unlink
17382do :
17383 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17384ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17385if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17386 cat >>confdefs.h <<_ACEOF
17387#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17388_ACEOF
17389
17390fi
17391done
17392
17393# we don't want to link with librt always, restore LIBS
17394LIBS="$save_LIBS"
17395ac_includes_default="$save_includes_default"
17396
Christian Heimesff5be6e2018-01-20 13:19:21 +010017397# Check for usable OpenSSL
17398
17399 found=false
17400
17401# Check whether --with-openssl was given.
17402if test "${with_openssl+set}" = set; then :
17403 withval=$with_openssl;
17404 case "$withval" in
17405 "" | y | ye | yes | n | no)
17406 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17407 ;;
17408 *) ssldirs="$withval"
17409 ;;
17410 esac
17411
17412else
17413
17414 # if pkg-config is installed and openssl has installed a .pc file,
17415 # then use that information and don't search ssldirs
17416 if test -n "$ac_tool_prefix"; then
17417 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17418set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17420$as_echo_n "checking for $ac_word... " >&6; }
17421if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17422 $as_echo_n "(cached) " >&6
17423else
17424 if test -n "$PKG_CONFIG"; then
17425 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17426else
17427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17428for as_dir in $PATH
17429do
17430 IFS=$as_save_IFS
17431 test -z "$as_dir" && as_dir=.
17432 for ac_exec_ext in '' $ac_executable_extensions; do
17433 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17434 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17435 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17436 break 2
17437 fi
17438done
17439 done
17440IFS=$as_save_IFS
17441
17442fi
17443fi
17444PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17445if test -n "$PKG_CONFIG"; then
17446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17447$as_echo "$PKG_CONFIG" >&6; }
17448else
17449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17450$as_echo "no" >&6; }
17451fi
17452
17453
17454fi
17455if test -z "$ac_cv_prog_PKG_CONFIG"; then
17456 ac_ct_PKG_CONFIG=$PKG_CONFIG
17457 # Extract the first word of "pkg-config", so it can be a program name with args.
17458set dummy pkg-config; ac_word=$2
17459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17460$as_echo_n "checking for $ac_word... " >&6; }
17461if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17462 $as_echo_n "(cached) " >&6
17463else
17464 if test -n "$ac_ct_PKG_CONFIG"; then
17465 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17466else
17467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17468for as_dir in $PATH
17469do
17470 IFS=$as_save_IFS
17471 test -z "$as_dir" && as_dir=.
17472 for ac_exec_ext in '' $ac_executable_extensions; do
17473 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17474 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17475 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17476 break 2
17477 fi
17478done
17479 done
17480IFS=$as_save_IFS
17481
17482fi
17483fi
17484ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17485if test -n "$ac_ct_PKG_CONFIG"; then
17486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17487$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17488else
17489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17490$as_echo "no" >&6; }
17491fi
17492
17493 if test "x$ac_ct_PKG_CONFIG" = x; then
17494 PKG_CONFIG=""
17495 else
17496 case $cross_compiling:$ac_tool_warned in
17497yes:)
17498{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17499$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17500ac_tool_warned=yes ;;
17501esac
17502 PKG_CONFIG=$ac_ct_PKG_CONFIG
17503 fi
17504else
17505 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17506fi
17507
17508 if test x"$PKG_CONFIG" != x""; then
17509 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17510 if test $? = 0; then
17511 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17512 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17513 found=true
17514 fi
17515 fi
17516
17517 # no such luck; use some default ssldirs
17518 if ! $found; then
17519 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17520 fi
17521
17522
17523fi
17524
17525
17526
17527 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17528 # an 'openssl' subdirectory
17529
17530 if ! $found; then
17531 OPENSSL_INCLUDES=
17532 for ssldir in $ssldirs; do
17533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17534$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17535 if test -f "$ssldir/include/openssl/ssl.h"; then
17536 OPENSSL_INCLUDES="-I$ssldir/include"
17537 OPENSSL_LDFLAGS="-L$ssldir/lib"
17538 OPENSSL_LIBS="-lssl -lcrypto"
17539 found=true
17540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17541$as_echo "yes" >&6; }
17542 break
17543 else
17544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17545$as_echo "no" >&6; }
17546 fi
17547 done
17548
17549 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17550 # it will just work!
17551 fi
17552
17553 # try the preprocessor and linker with our new flags,
17554 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17555
17556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17557$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17558 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17559 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17560
17561 save_LIBS="$LIBS"
17562 save_LDFLAGS="$LDFLAGS"
17563 save_CPPFLAGS="$CPPFLAGS"
17564 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17565 LIBS="$OPENSSL_LIBS $LIBS"
17566 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17568/* end confdefs.h. */
17569#include <openssl/ssl.h>
17570int
17571main ()
17572{
17573SSL_new(NULL)
17574 ;
17575 return 0;
17576}
17577_ACEOF
17578if ac_fn_c_try_link "$LINENO"; then :
17579
17580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17581$as_echo "yes" >&6; }
17582 have_openssl=yes
17583
17584else
17585
17586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17587$as_echo "no" >&6; }
17588 have_openssl=no
17589
17590fi
17591rm -f core conftest.err conftest.$ac_objext \
17592 conftest$ac_exeext conftest.$ac_ext
17593 CPPFLAGS="$save_CPPFLAGS"
17594 LDFLAGS="$save_LDFLAGS"
17595 LIBS="$save_LIBS"
17596
17597
17598
17599
17600
17601
17602if test "$have_openssl" = yes; then
17603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17604$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17605
17606 save_LIBS="$LIBS"
17607 save_LDFLAGS="$LDFLAGS"
17608 save_CPPFLAGS="$CPPFLAGS"
17609 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17610 LIBS="$OPENSSL_LIBS $LIBS"
17611 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17612
17613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17614/* end confdefs.h. */
17615
17616 #include <openssl/x509_vfy.h>
17617
17618int
17619main ()
17620{
17621
17622 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17623 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17624 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17625 X509_VERIFY_PARAM_set_hostflags(p, 0);
17626
17627 ;
17628 return 0;
17629}
17630
17631_ACEOF
17632if ac_fn_c_try_link "$LINENO"; then :
17633
17634 ac_cv_has_x509_verify_param_set1_host=yes
17635
17636else
17637
17638 ac_cv_has_x509_verify_param_set1_host=no
17639
17640fi
17641rm -f core conftest.err conftest.$ac_objext \
17642 conftest$ac_exeext conftest.$ac_ext
17643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17644$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17645 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17646
17647$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17648
17649 fi
17650
17651 CPPFLAGS="$save_CPPFLAGS"
17652 LDFLAGS="$save_LDFLAGS"
17653 LIBS="$save_LIBS"
17654fi
17655
Christian Heimes892d66e2018-01-29 14:10:18 +010017656# ssl module default cipher suite string
17657
17658
17659
17660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17661$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17662
17663# Check whether --with-ssl-default-suites was given.
17664if test "${with_ssl_default_suites+set}" = set; then :
17665 withval=$with_ssl_default_suites;
17666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17667$as_echo "$withval" >&6; }
17668case "$withval" in
17669 python)
17670 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17671
17672 ;;
17673 openssl)
17674 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17675
17676 ;;
17677 *)
17678 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17679
17680 cat >>confdefs.h <<_ACEOF
17681#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17682_ACEOF
17683
17684 ;;
17685esac
17686
17687else
17688
17689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17690$as_echo "python" >&6; }
17691$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17692
17693
17694fi
17695
17696
Christian Heimes9b60e552020-05-15 23:54:53 +020017697# builtin hash modules
17698default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17699
17700$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17701
17702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17703$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17704
17705# Check whether --with-builtin-hashlib-hashes was given.
17706if test "${with_builtin_hashlib_hashes+set}" = set; then :
17707 withval=$with_builtin_hashlib_hashes;
17708case "$withval" in
17709 yes)
17710 withval=$default_hashlib_hashes
17711 ;;
17712 no)
17713 withval=""
17714 ;;
17715esac
17716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17717$as_echo "$withval" >&6; }
17718cat >>confdefs.h <<_ACEOF
17719#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17720_ACEOF
17721
17722
17723else
17724
17725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17726$as_echo "$default_hashlib_hashes" >&6; };
17727cat >>confdefs.h <<_ACEOF
17728#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17729_ACEOF
17730
17731
17732fi
17733
17734
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017735# --with-experimental-isolated-subinterpreters
17736
17737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17738$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17739
17740# Check whether --with-experimental-isolated-subinterpreters was given.
17741if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17742 withval=$with_experimental_isolated_subinterpreters;
17743if test "$withval" != no
17744then
17745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17746$as_echo "yes" >&6; };
17747 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17748
17749else
17750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17751$as_echo "no" >&6; };
17752fi
17753else
17754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17755$as_echo "no" >&6; }
17756fi
17757
17758
pxinwr277ce302020-12-30 20:50:39 +080017759# Check whether to disable test modules. Once set, setup.py will not build
17760# test extension modules and "make install" will not install test suites.
17761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
17762$as_echo_n "checking for --disable-test-modules... " >&6; }
17763# Check whether --enable-test-modules was given.
17764if test "${enable_test_modules+set}" = set; then :
17765 enableval=$enable_test_modules;
17766fi
17767
17768if test "$enable_test_modules" = no; then
17769 TEST_MODULES=no
17770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17771$as_echo "yes" >&6; }
17772else
17773 TEST_MODULES=yes
17774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17775$as_echo "no" >&6; }
17776fi
17777
17778
Christian Heimes892d66e2018-01-29 14:10:18 +010017779
Guido van Rossum627b2d71993-12-24 10:39:16 +000017780# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017781ac_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 +000017782
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017783ac_config_files="$ac_config_files Modules/ld_so_aix"
17784
Martin v. Löwis11437992002-04-12 09:54:03 +000017785cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017786# This file is a shell script that caches the results of configure
17787# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017788# scripts and configure runs, see configure's option --config-cache.
17789# It is not useful on other systems. If it contains results you don't
17790# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017791#
Martin v. Löwis11437992002-04-12 09:54:03 +000017792# config.status only pays attention to the cache file if you give it
17793# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017794#
Skip Montanaro6dead952003-09-25 14:50:04 +000017795# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017796# loading this file, other *unset* `ac_cv_foo' will be assigned the
17797# following values.
17798
17799_ACEOF
17800
Guido van Rossumf78abae1997-01-21 22:02:36 +000017801# The following way of writing the cache mishandles newlines in values,
17802# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017804# Ultrix sh set writes to stderr and can't be redirected directly,
17805# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806(
17807 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17808 eval ac_val=\$$ac_var
17809 case $ac_val in #(
17810 *${as_nl}*)
17811 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017812 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17813$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814 esac
17815 case $ac_var in #(
17816 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017817 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17818 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819 esac ;;
17820 esac
17821 done
17822
Martin v. Löwis11437992002-04-12 09:54:03 +000017823 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17825 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017826 # `set' does not quote correctly, so add quotes: double-quote
17827 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017828 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017829 "s/'/'\\\\''/g;
17830 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017831 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017832 *)
17833 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017836 esac |
17837 sort
17838) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017839 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017840 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017841 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017843 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17844 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017845 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17846 :end' >>confcache
17847if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17848 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017849 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017850 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17851$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017852 if test ! -f "$cache_file" || test -h "$cache_file"; then
17853 cat confcache >"$cache_file"
17854 else
17855 case $cache_file in #(
17856 */* | ?:*)
17857 mv -f confcache "$cache_file"$$ &&
17858 mv -f "$cache_file"$$ "$cache_file" ;; #(
17859 *)
17860 mv -f confcache "$cache_file" ;;
17861 esac
17862 fi
17863 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017864 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017865 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17866$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017867 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017868fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017869rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017870
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017871test "x$prefix" = xNONE && prefix=$ac_default_prefix
17872# Let make expand exec_prefix.
17873test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017874
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017875DEFS=-DHAVE_CONFIG_H
17876
Skip Montanaro6dead952003-09-25 14:50:04 +000017877ac_libobjs=
17878ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017879U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017880for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17881 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017882 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017883 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17885 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017886 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17887 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017888done
17889LIBOBJS=$ac_libobjs
17890
17891LTLIBOBJS=$ac_ltlibobjs
17892
17893
Martin v. Löwis11437992002-04-12 09:54:03 +000017894
Matthias Kloseb9621712010-04-24 17:59:49 +000017895
Victor Stinnere0be4232011-10-25 13:06:09 +020017896: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017897ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017898ac_clean_files_save=$ac_clean_files
17899ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017900{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17901$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17902as_write_fail=0
17903cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017904#! $SHELL
17905# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017906# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017907# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017908# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017909
Martin v. Löwis11437992002-04-12 09:54:03 +000017910debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017911ac_cs_recheck=false
17912ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017913
Matthias Kloseb9621712010-04-24 17:59:49 +000017914SHELL=\${CONFIG_SHELL-$SHELL}
17915export SHELL
17916_ASEOF
17917cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17918## -------------------- ##
17919## M4sh Initialization. ##
17920## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922# Be more Bourne compatible
17923DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017924if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017925 emulate sh
17926 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017927 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017928 # is contrary to our usage. Disable this feature.
17929 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017930 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017931else
Matthias Kloseb9621712010-04-24 17:59:49 +000017932 case `(set -o) 2>/dev/null` in #(
17933 *posix*) :
17934 set -o posix ;; #(
17935 *) :
17936 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017938fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017939
17940
Matthias Kloseb9621712010-04-24 17:59:49 +000017941as_nl='
17942'
17943export as_nl
17944# Printing a long string crashes Solaris 7 /usr/bin/printf.
17945as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17946as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17947as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17948# Prefer a ksh shell builtin over an external printf program on Solaris,
17949# but without wasting forks for bash or zsh.
17950if test -z "$BASH_VERSION$ZSH_VERSION" \
17951 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17952 as_echo='print -r --'
17953 as_echo_n='print -rn --'
17954elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17955 as_echo='printf %s\n'
17956 as_echo_n='printf %s'
17957else
17958 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17959 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17960 as_echo_n='/usr/ucb/echo -n'
17961 else
17962 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17963 as_echo_n_body='eval
17964 arg=$1;
17965 case $arg in #(
17966 *"$as_nl"*)
17967 expr "X$arg" : "X\\(.*\\)$as_nl";
17968 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17969 esac;
17970 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17971 '
17972 export as_echo_n_body
17973 as_echo_n='sh -c $as_echo_n_body as_echo'
17974 fi
17975 export as_echo_body
17976 as_echo='sh -c $as_echo_body as_echo'
17977fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017978
17979# The user is always right.
17980if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017981 PATH_SEPARATOR=:
17982 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17983 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17984 PATH_SEPARATOR=';'
17985 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017988
17989# IFS
17990# We need space, tab and new line, in precisely that order. Quoting is
17991# there to prevent editors from complaining about space-tab.
17992# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17993# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017994IFS=" "" $as_nl"
17995
17996# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017997as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017998case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017999 *[\\/]* ) as_myself=$0 ;;
18000 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000018001for as_dir in $PATH
18002do
18003 IFS=$as_save_IFS
18004 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000018005 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18006 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018007IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000018008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018009 ;;
18010esac
18011# We did not find ourselves, most probably we were run as `sh COMMAND'
18012# in which case we are not to be found in the path.
18013if test "x$as_myself" = x; then
18014 as_myself=$0
18015fi
18016if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018017 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18018 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019fi
18020
Matthias Kloseb9621712010-04-24 17:59:49 +000018021# Unset variables that we do not need and which cause bugs (e.g. in
18022# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18023# suppresses any "Segmentation fault" message there. '((' could
18024# trigger a bug in pdksh 5.2.14.
18025for as_var in BASH_ENV ENV MAIL MAILPATH
18026do eval test x\${$as_var+set} = xset \
18027 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018028done
18029PS1='$ '
18030PS2='> '
18031PS4='+ '
18032
18033# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000018034LC_ALL=C
18035export LC_ALL
18036LANGUAGE=C
18037export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018038
Matthias Kloseb9621712010-04-24 17:59:49 +000018039# CDPATH.
18040(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18041
18042
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018043# as_fn_error STATUS ERROR [LINENO LOG_FD]
18044# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000018045# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18046# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018047# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000018048as_fn_error ()
18049{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018050 as_status=$1; test $as_status -eq 0 && as_status=1
18051 if test "$4"; then
18052 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18053 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000018054 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018055 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018056 as_fn_exit $as_status
18057} # as_fn_error
18058
18059
18060# as_fn_set_status STATUS
18061# -----------------------
18062# Set $? to STATUS, without forking.
18063as_fn_set_status ()
18064{
18065 return $1
18066} # as_fn_set_status
18067
18068# as_fn_exit STATUS
18069# -----------------
18070# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18071as_fn_exit ()
18072{
18073 set +e
18074 as_fn_set_status $1
18075 exit $1
18076} # as_fn_exit
18077
18078# as_fn_unset VAR
18079# ---------------
18080# Portably unset VAR.
18081as_fn_unset ()
18082{
18083 { eval $1=; unset $1;}
18084}
18085as_unset=as_fn_unset
18086# as_fn_append VAR VALUE
18087# ----------------------
18088# Append the text in VALUE to the end of the definition contained in VAR. Take
18089# advantage of any shell optimizations that allow amortized linear growth over
18090# repeated appends, instead of the typical quadratic growth present in naive
18091# implementations.
18092if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18093 eval 'as_fn_append ()
18094 {
18095 eval $1+=\$2
18096 }'
18097else
18098 as_fn_append ()
18099 {
18100 eval $1=\$$1\$2
18101 }
18102fi # as_fn_append
18103
18104# as_fn_arith ARG...
18105# ------------------
18106# Perform arithmetic evaluation on the ARGs, and store the result in the
18107# global $as_val. Take advantage of shells that can avoid forks. The arguments
18108# must be portable across $(()) and expr.
18109if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18110 eval 'as_fn_arith ()
18111 {
18112 as_val=$(( $* ))
18113 }'
18114else
18115 as_fn_arith ()
18116 {
18117 as_val=`expr "$@" || test $? -eq 1`
18118 }
18119fi # as_fn_arith
18120
18121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122if expr a : '\(a\)' >/dev/null 2>&1 &&
18123 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18124 as_expr=expr
18125else
18126 as_expr=false
18127fi
18128
18129if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18130 as_basename=basename
18131else
18132 as_basename=false
18133fi
18134
Matthias Kloseb9621712010-04-24 17:59:49 +000018135if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18136 as_dirname=dirname
18137else
18138 as_dirname=false
18139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141as_me=`$as_basename -- "$0" ||
18142$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18143 X"$0" : 'X\(//\)$' \| \
18144 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018145$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146 sed '/^.*\/\([^/][^/]*\)\/*$/{
18147 s//\1/
18148 q
18149 }
18150 /^X\/\(\/\/\)$/{
18151 s//\1/
18152 q
18153 }
18154 /^X\/\(\/\).*/{
18155 s//\1/
18156 q
18157 }
18158 s/.*/./; q'`
18159
Matthias Kloseb9621712010-04-24 17:59:49 +000018160# Avoid depending upon Character Ranges.
18161as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18162as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18163as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18164as_cr_digits='0123456789'
18165as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018166
18167ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018168case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018169-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018170 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018172 xy) ECHO_C='\c';;
18173 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18174 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018175 esac;;
18176*)
18177 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018178esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018179
Martin v. Löwis11437992002-04-12 09:54:03 +000018180rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018181if test -d conf$$.dir; then
18182 rm -f conf$$.dir/conf$$.file
18183else
18184 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018185 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018187if (echo >conf$$.file) 2>/dev/null; then
18188 if ln -s conf$$.file conf$$ 2>/dev/null; then
18189 as_ln_s='ln -s'
18190 # ... but there are two gotchas:
18191 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18192 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018193 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018194 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018195 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018196 elif ln conf$$.file conf$$ 2>/dev/null; then
18197 as_ln_s=ln
18198 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018199 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018200 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018201else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018202 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18205rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018206
Matthias Kloseb9621712010-04-24 17:59:49 +000018207
18208# as_fn_mkdir_p
18209# -------------
18210# Create "$as_dir" as a directory, including parents if necessary.
18211as_fn_mkdir_p ()
18212{
18213
18214 case $as_dir in #(
18215 -*) as_dir=./$as_dir;;
18216 esac
18217 test -d "$as_dir" || eval $as_mkdir_p || {
18218 as_dirs=
18219 while :; do
18220 case $as_dir in #(
18221 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18222 *) as_qdir=$as_dir;;
18223 esac
18224 as_dirs="'$as_qdir' $as_dirs"
18225 as_dir=`$as_dirname -- "$as_dir" ||
18226$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18227 X"$as_dir" : 'X\(//\)[^/]' \| \
18228 X"$as_dir" : 'X\(//\)$' \| \
18229 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18230$as_echo X"$as_dir" |
18231 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18232 s//\1/
18233 q
18234 }
18235 /^X\(\/\/\)[^/].*/{
18236 s//\1/
18237 q
18238 }
18239 /^X\(\/\/\)$/{
18240 s//\1/
18241 q
18242 }
18243 /^X\(\/\).*/{
18244 s//\1/
18245 q
18246 }
18247 s/.*/./; q'`
18248 test -d "$as_dir" && break
18249 done
18250 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018251 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018252
18253
18254} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018255if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018256 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018257else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018258 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018259 as_mkdir_p=false
18260fi
18261
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018262
18263# as_fn_executable_p FILE
18264# -----------------------
18265# Test if FILE is an executable regular file.
18266as_fn_executable_p ()
18267{
18268 test -f "$1" && test -x "$1"
18269} # as_fn_executable_p
18270as_test_x='test -x'
18271as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018272
18273# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018274as_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 +000018275
18276# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018277as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018278
18279
Martin v. Löwis11437992002-04-12 09:54:03 +000018280exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018281## ----------------------------------- ##
18282## Main body of $CONFIG_STATUS script. ##
18283## ----------------------------------- ##
18284_ASEOF
18285test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018286
Matthias Kloseb9621712010-04-24 17:59:49 +000018287cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18288# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018289# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018290# values after options handling.
18291ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018292This file was extended by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018293generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018294
18295 CONFIG_FILES = $CONFIG_FILES
18296 CONFIG_HEADERS = $CONFIG_HEADERS
18297 CONFIG_LINKS = $CONFIG_LINKS
18298 CONFIG_COMMANDS = $CONFIG_COMMANDS
18299 $ $0 $@
18300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018301on `(hostname || uname -n) 2>/dev/null | sed 1q`
18302"
18303
Martin v. Löwis11437992002-04-12 09:54:03 +000018304_ACEOF
18305
Matthias Kloseb9621712010-04-24 17:59:49 +000018306case $ac_config_files in *"
18307"*) set x $ac_config_files; shift; ac_config_files=$*;;
18308esac
18309
18310case $ac_config_headers in *"
18311"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18312esac
18313
18314
18315cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018316# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018317config_files="$ac_config_files"
18318config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018320_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018321
Matthias Kloseb9621712010-04-24 17:59:49 +000018322cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018323ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018324\`$as_me' instantiates files and other configuration actions
18325from templates according to the current configuration. Unless the files
18326and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018327
Matthias Kloseb9621712010-04-24 17:59:49 +000018328Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018329
18330 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018331 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018332 --config print configuration, then exit
18333 -q, --quiet, --silent
18334 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018335 -d, --debug don't remove temporary files
18336 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018337 --file=FILE[:TEMPLATE]
18338 instantiate the configuration file FILE
18339 --header=FILE[:TEMPLATE]
18340 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018341
18342Configuration files:
18343$config_files
18344
18345Configuration headers:
18346$config_headers
18347
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018348Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18352ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018353ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018354python config.status 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018355configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018356 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018357
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018358Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018359This config.status script is free software; the Free Software Foundation
18360gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018361
18362ac_pwd='$ac_pwd'
18363srcdir='$srcdir'
18364INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018365MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018366test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018367_ACEOF
18368
Matthias Kloseb9621712010-04-24 17:59:49 +000018369cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18370# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018371ac_need_defaults=:
18372while test $# != 0
18373do
18374 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018375 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018376 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18377 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018378 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018379 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018380 --*=)
18381 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18382 ac_optarg=
18383 ac_shift=:
18384 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018386 ac_option=$1
18387 ac_optarg=$2
18388 ac_shift=shift
18389 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018390 esac
18391
Skip Montanaro6dead952003-09-25 14:50:04 +000018392 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018393 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018394 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18395 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018397 $as_echo "$ac_cs_version"; exit ;;
18398 --config | --confi | --conf | --con | --co | --c )
18399 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018400 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018401 debug=: ;;
18402 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018403 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018404 case $ac_optarg in
18405 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018406 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018407 esac
18408 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018409 ac_need_defaults=false;;
18410 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018411 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018412 case $ac_optarg in
18413 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18414 esac
18415 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018416 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018417 --he | --h)
18418 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018419 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018420Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018422 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018423 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18424 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18425 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018426
18427 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018428 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018429Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018430
Matthias Kloseb9621712010-04-24 17:59:49 +000018431 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018432 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018433
18434 esac
18435 shift
18436done
18437
Skip Montanaro6dead952003-09-25 14:50:04 +000018438ac_configure_extra_args=
18439
18440if $ac_cs_silent; then
18441 exec 6>/dev/null
18442 ac_configure_extra_args="$ac_configure_extra_args --silent"
18443fi
18444
18445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018446cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018447if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018448 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018449 shift
18450 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18451 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018453 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018454fi
18455
Martin v. Löwis11437992002-04-12 09:54:03 +000018456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018457cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458exec 5>>config.log
18459{
18460 echo
18461 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18462## Running $as_me. ##
18463_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018464 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018465} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018468cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018469_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018470
Matthias Kloseb9621712010-04-24 17:59:49 +000018471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018472
18473# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018474for ac_config_target in $ac_config_targets
18475do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018476 case $ac_config_target in
18477 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18478 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18479 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018480 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18481 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018482 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018483 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018484 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018485 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018486 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018487
Victor Stinnere0be4232011-10-25 13:06:09 +020018488 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018489 esac
18490done
18491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492
Martin v. Löwis11437992002-04-12 09:54:03 +000018493# If the user did not use the arguments to specify the items to instantiate,
18494# then the envvar interface is used. Set only those that are not.
18495# We use the long form for the default assignment because of an extremely
18496# bizarre bug on SunOS 4.1.3.
18497if $ac_need_defaults; then
18498 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18499 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18500fi
18501
Skip Montanaro6dead952003-09-25 14:50:04 +000018502# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018504# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505# Hook for its removal unless debugging.
18506# Note that there is a small window in which the directory will not be cleaned:
18507# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018508$debug ||
18509{
Victor Stinnere0be4232011-10-25 13:06:09 +020018510 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018511 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018512 : "${ac_tmp:=$tmp}"
18513 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018514' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018515 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018516}
Martin v. Löwis11437992002-04-12 09:54:03 +000018517# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018518
Martin v. Löwis11437992002-04-12 09:54:03 +000018519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018520 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018521 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018522} ||
18523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018524 tmp=./conf$$-$RANDOM
18525 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018526} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018527ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018528
Matthias Kloseb9621712010-04-24 17:59:49 +000018529# Set up the scripts for CONFIG_FILES section.
18530# No need to generate them if there are no CONFIG_FILES.
18531# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018532if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018533
Matthias Kloseb9621712010-04-24 17:59:49 +000018534
18535ac_cr=`echo X | tr X '\015'`
18536# On cygwin, bash can eat \r inside `` if the user requested igncr.
18537# But we know of no other shell where ac_cr would be empty at this
18538# point, so we can use a bashism as a fallback.
18539if test "x$ac_cr" = x; then
18540 eval ac_cr=\$\'\\r\'
18541fi
18542ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18543if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018544 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018545else
18546 ac_cs_awk_cr=$ac_cr
18547fi
18548
Victor Stinnere0be4232011-10-25 13:06:09 +020018549echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018550_ACEOF
18551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018552
Matthias Kloseb9621712010-04-24 17:59:49 +000018553{
18554 echo "cat >conf$$subs.awk <<_ACEOF" &&
18555 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18556 echo "_ACEOF"
18557} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018558 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18559ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018560ac_delim='%!_!# '
18561for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018562 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018563 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018564
Matthias Kloseb9621712010-04-24 17:59:49 +000018565 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18566 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018567 break
18568 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018569 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018570 else
18571 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018572 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018573done
Matthias Kloseb9621712010-04-24 17:59:49 +000018574rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575
Matthias Kloseb9621712010-04-24 17:59:49 +000018576cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018577cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018579sed -n '
18580h
18581s/^/S["/; s/!.*/"]=/
18582p
18583g
18584s/^[^!]*!//
18585:repl
18586t repl
18587s/'"$ac_delim"'$//
18588t delim
18589:nl
18590h
18591s/\(.\{148\}\)..*/\1/
18592t more1
18593s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18594p
18595n
18596b repl
18597:more1
18598s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18599p
18600g
18601s/.\{148\}//
18602t nl
18603:delim
18604h
18605s/\(.\{148\}\)..*/\1/
18606t more2
18607s/["\\]/\\&/g; s/^/"/; s/$/"/
18608p
18609b
18610:more2
18611s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18612p
18613g
18614s/.\{148\}//
18615t delim
18616' <conf$$subs.awk | sed '
18617/^[^""]/{
18618 N
18619 s/\n//
18620}
18621' >>$CONFIG_STATUS || ac_write_fail=1
18622rm -f conf$$subs.awk
18623cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18624_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018625cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018626 for (key in S) S_is_set[key] = 1
18627 FS = ""
18628
18629}
18630{
18631 line = $ 0
18632 nfields = split(line, field, "@")
18633 substed = 0
18634 len = length(field[1])
18635 for (i = 2; i < nfields; i++) {
18636 key = field[i]
18637 keylen = length(key)
18638 if (S_is_set[key]) {
18639 value = S[key]
18640 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18641 len += length(value) + length(field[++i])
18642 substed = 1
18643 } else
18644 len += 1 + keylen
18645 }
18646
18647 print line
18648}
18649
18650_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18653if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18654 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18655else
18656 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018657fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018658 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018659_ACEOF
18660
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018661# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18662# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018663# trailing colons and then remove the whole line if VPATH becomes empty
18664# (actually we leave an empty line to preserve line numbers).
18665if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018666 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18667h
18668s///
18669s/^/:/
18670s/[ ]*$/:/
18671s/:\$(srcdir):/:/g
18672s/:\${srcdir}:/:/g
18673s/:@srcdir@:/:/g
18674s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018675s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018676x
18677s/\(=[ ]*\).*/\1/
18678G
18679s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018680s/^[^=]*=[ ]*$//
18681}'
18682fi
18683
Matthias Kloseb9621712010-04-24 17:59:49 +000018684cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018685fi # test -n "$CONFIG_FILES"
18686
Matthias Kloseb9621712010-04-24 17:59:49 +000018687# Set up the scripts for CONFIG_HEADERS section.
18688# No need to generate them if there are no CONFIG_HEADERS.
18689# This happens for instance with `./config.status Makefile'.
18690if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018691cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018692BEGIN {
18693_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018694
Matthias Kloseb9621712010-04-24 17:59:49 +000018695# Transform confdefs.h into an awk script `defines.awk', embedded as
18696# here-document in config.status, that substitutes the proper values into
18697# config.h.in to produce config.h.
18698
18699# Create a delimiter string that does not exist in confdefs.h, to ease
18700# handling of long lines.
18701ac_delim='%!_!# '
18702for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018703 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18704 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018705 break
18706 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018707 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018708 else
18709 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18710 fi
18711done
18712
18713# For the awk script, D is an array of macro values keyed by name,
18714# likewise P contains macro parameters if any. Preserve backslash
18715# newline sequences.
18716
18717ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18718sed -n '
18719s/.\{148\}/&'"$ac_delim"'/g
18720t rset
18721:rset
18722s/^[ ]*#[ ]*define[ ][ ]*/ /
18723t def
18724d
18725:def
18726s/\\$//
18727t bsnl
18728s/["\\]/\\&/g
18729s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18730D["\1"]=" \3"/p
18731s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18732d
18733:bsnl
18734s/["\\]/\\&/g
18735s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18736D["\1"]=" \3\\\\\\n"\\/p
18737t cont
18738s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18739t cont
18740d
18741:cont
18742n
18743s/.\{148\}/&'"$ac_delim"'/g
18744t clear
18745:clear
18746s/\\$//
18747t bsnlc
18748s/["\\]/\\&/g; s/^/"/; s/$/"/p
18749d
18750:bsnlc
18751s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18752b cont
18753' <confdefs.h | sed '
18754s/'"$ac_delim"'/"\\\
18755"/g' >>$CONFIG_STATUS || ac_write_fail=1
18756
18757cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18758 for (key in D) D_is_set[key] = 1
18759 FS = ""
18760}
18761/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18762 line = \$ 0
18763 split(line, arg, " ")
18764 if (arg[1] == "#") {
18765 defundef = arg[2]
18766 mac1 = arg[3]
18767 } else {
18768 defundef = substr(arg[1], 2)
18769 mac1 = arg[2]
18770 }
18771 split(mac1, mac2, "(") #)
18772 macro = mac2[1]
18773 prefix = substr(line, 1, index(line, defundef) - 1)
18774 if (D_is_set[macro]) {
18775 # Preserve the white space surrounding the "#".
18776 print prefix "define", macro P[macro] D[macro]
18777 next
18778 } else {
18779 # Replace #undef with comments. This is necessary, for example,
18780 # in the case of _POSIX_SOURCE, which is predefined and required
18781 # on some systems where configure will not decide to define it.
18782 if (defundef == "undef") {
18783 print "/*", prefix defundef, macro, "*/"
18784 next
18785 }
18786 }
18787}
18788{ print }
18789_ACAWK
18790_ACEOF
18791cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018792 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018793fi # test -n "$CONFIG_HEADERS"
18794
18795
18796eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18797shift
18798for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018799do
18800 case $ac_tag in
18801 :[FHLC]) ac_mode=$ac_tag; continue;;
18802 esac
18803 case $ac_mode$ac_tag in
18804 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018805 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018806 :[FH]-) ac_tag=-:-;;
18807 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18808 esac
18809 ac_save_IFS=$IFS
18810 IFS=:
18811 set x $ac_tag
18812 IFS=$ac_save_IFS
18813 shift
18814 ac_file=$1
18815 shift
18816
18817 case $ac_mode in
18818 :L) ac_source=$1;;
18819 :[FH])
18820 ac_file_inputs=
18821 for ac_f
18822 do
18823 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018824 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018825 *) # Look for the file first in the build tree, then in the source tree
18826 # (if the path is not absolute). The absolute path cannot be DOS-style,
18827 # because $ac_f cannot contain `:'.
18828 test -f "$ac_f" ||
18829 case $ac_f in
18830 [\\/$]*) false;;
18831 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18832 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018833 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018834 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018835 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18836 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018837 done
18838
18839 # Let's still pretend it is `configure' which instantiates (i.e., don't
18840 # use $as_me), people would be surprised to read:
18841 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018842 configure_input='Generated from '`
18843 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18844 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018845 if test x"$ac_file" != x-; then
18846 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018847 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18848$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018849 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018850 # Neutralize special characters interpreted by sed in replacement strings.
18851 case $configure_input in #(
18852 *\&* | *\|* | *\\* )
18853 ac_sed_conf_input=`$as_echo "$configure_input" |
18854 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18855 *) ac_sed_conf_input=$configure_input;;
18856 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018857
18858 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018859 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18860 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018861 esac
18862 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018863 esac
18864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018865 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018866$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018867 X"$ac_file" : 'X\(//\)[^/]' \| \
18868 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018869 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018870$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018871 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18872 s//\1/
18873 q
18874 }
18875 /^X\(\/\/\)[^/].*/{
18876 s//\1/
18877 q
18878 }
18879 /^X\(\/\/\)$/{
18880 s//\1/
18881 q
18882 }
18883 /^X\(\/\).*/{
18884 s//\1/
18885 q
18886 }
18887 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018888 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018889 ac_builddir=.
18890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018891case "$ac_dir" in
18892.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18893*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018894 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018895 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018896 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018897 case $ac_top_builddir_sub in
18898 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18899 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18900 esac ;;
18901esac
18902ac_abs_top_builddir=$ac_pwd
18903ac_abs_builddir=$ac_pwd$ac_dir_suffix
18904# for backward compatibility:
18905ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018906
18907case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018908 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018909 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018910 ac_top_srcdir=$ac_top_builddir_sub
18911 ac_abs_top_srcdir=$ac_pwd ;;
18912 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018913 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018914 ac_top_srcdir=$srcdir
18915 ac_abs_top_srcdir=$srcdir ;;
18916 *) # Relative name.
18917 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18918 ac_top_srcdir=$ac_top_build_prefix$srcdir
18919 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018920esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018921ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018922
Martin v. Löwis11437992002-04-12 09:54:03 +000018923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018924 case $ac_mode in
18925 :F)
18926 #
18927 # CONFIG_FILE
18928 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018929
18930 case $INSTALL in
18931 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018932 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018933 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018934 ac_MKDIR_P=$MKDIR_P
18935 case $MKDIR_P in
18936 [\\/$]* | ?:[\\/]* ) ;;
18937 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18938 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018939_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018940
Matthias Kloseb9621712010-04-24 17:59:49 +000018941cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018942# If the template does not know about datarootdir, expand it.
18943# FIXME: This hack should be removed a few years after 2.60.
18944ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018945ac_sed_dataroot='
18946/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018947 p
18948 q
18949}
18950/@datadir@/p
18951/@docdir@/p
18952/@infodir@/p
18953/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018954/@mandir@/p'
18955case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018956*datarootdir*) ac_datarootdir_seen=yes;;
18957*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018958 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18959$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018961cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018962 ac_datarootdir_hack='
18963 s&@datadir@&$datadir&g
18964 s&@docdir@&$docdir&g
18965 s&@infodir@&$infodir&g
18966 s&@localedir@&$localedir&g
18967 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018968 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018969esac
18970_ACEOF
18971
18972# Neutralize VPATH when `$srcdir' = `.'.
18973# Shell code in configure.ac might set extrasub.
18974# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018975cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18976ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018977$extrasub
18978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018979cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018980:t
18981/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018982s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018983s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018984s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018985s&@srcdir@&$ac_srcdir&;t t
18986s&@abs_srcdir@&$ac_abs_srcdir&;t t
18987s&@top_srcdir@&$ac_top_srcdir&;t t
18988s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18989s&@builddir@&$ac_builddir&;t t
18990s&@abs_builddir@&$ac_abs_builddir&;t t
18991s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18992s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018993s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018994$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018995"
Victor Stinnere0be4232011-10-25 13:06:09 +020018996eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18997 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018999test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020019000 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19001 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19002 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000019003 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019004which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000019005$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019006which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019007
Victor Stinnere0be4232011-10-25 13:06:09 +020019008 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000019009 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020019010 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19011 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000019012 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019013 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019014 ;;
19015 :H)
19016 #
19017 # CONFIG_HEADER
19018 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019019 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019020 {
19021 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019022 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19023 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019024 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020019025 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019026 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19027$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019028 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019029 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020019030 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019031 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019032 fi
19033 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019034 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019035 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019036 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019037 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019038 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019040
19041 esac
19042
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000019043
19044 case $ac_file$ac_mode in
19045 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
19046
19047 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019048done # for ac_tag
19049
Guido van Rossum627b2d71993-12-24 10:39:16 +000019050
Matthias Kloseb9621712010-04-24 17:59:49 +000019051as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000019052_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019053ac_clean_files=$ac_clean_files_save
19054
Matthias Kloseb9621712010-04-24 17:59:49 +000019055test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019056 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000019057
Martin v. Löwis11437992002-04-12 09:54:03 +000019058
19059# configure is writing to config.log, and then calls config.status.
19060# config.status does its own redirection, appending to config.log.
19061# Unfortunately, on DOS this fails, as config.log is still kept open
19062# by configure, so config.status won't be able to write to it; its
19063# output is simply discarded. So we exec the FD to /dev/null,
19064# effectively closing config.log, so it can be properly (re)opened and
19065# appended to by config.status. When coming back to configure, we
19066# need to make the FD available again.
19067if test "$no_create" != yes; then
19068 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019069 ac_config_status_args=
19070 test "$silent" = yes &&
19071 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019072 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019073 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019074 exec 5>>config.log
19075 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19076 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019077 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000019078fi
19079if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19080 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19081$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019082fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019083
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019084
Christian Heimes75ed8902013-11-20 01:11:18 +010019085echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019086if test ! -f Modules/Setup.local
19087then
19088 echo "# Edit this file for local setup changes" >Modules/Setup.local
19089fi
19090
Christian Heimes75ed8902013-11-20 01:11:18 +010019091echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019092$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020019093 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020019094 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019095mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070019096
19097if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
19098 echo "" >&6
19099 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070019100 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 +000019101 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070019102 echo "" >&6
19103 echo "" >&6
19104fi