blob: 8e0cc71a50480dfccc39771c641c04af6c70afc2 [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
Roland Hiebere1f77692021-02-09 02:05:25 +0100852with_readline
Matthias Kloseb9621712010-04-24 17:59:49 +0000853with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800854with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100855with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100856with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200857with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200858with_experimental_isolated_subinterpreters
pxinwr277ce302020-12-30 20:50:39 +0800859enable_test_modules
Matthias Kloseb9621712010-04-24 17:59:49 +0000860'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861 ac_precious_vars='build_alias
862host_alias
863target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100864MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865CC
866CFLAGS
867LDFLAGS
868LIBS
869CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800870CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700871PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800872PKG_CONFIG
873PKG_CONFIG_PATH
874PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875
Guido van Rossum627b2d71993-12-24 10:39:16 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000878ac_init_help=
879ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000880ac_unrecognized_opts=
881ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882# The variables have the same names as the options, with
883# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000884cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887no_recursion=
888prefix=NONE
889program_prefix=NONE
890program_suffix=NONE
891program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896x_includes=NONE
897x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000898
899# Installation directory options.
900# These are left unexpanded so users can "make install exec_prefix=/foo"
901# and all the variables that are supposed to be based on exec_prefix
902# by default will actually change.
903# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905bindir='${exec_prefix}/bin'
906sbindir='${exec_prefix}/sbin'
907libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908datarootdir='${prefix}/share'
909datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910sysconfdir='${prefix}/etc'
911sharedstatedir='${prefix}/com'
912localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913includedir='${prefix}/include'
914oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
916infodir='${datarootdir}/info'
917htmldir='${docdir}'
918dvidir='${docdir}'
919pdfdir='${docdir}'
920psdir='${docdir}'
921libdir='${exec_prefix}/lib'
922localedir='${datarootdir}/locale'
923mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000928do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929 # If the previous option needs an argument, assign it.
930 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 ac_prev=
933 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000934 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200937 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
938 *=) ac_optarg= ;;
939 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000940 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 # Accept the important Cygnus configure options, so we can diagnose typos.
943
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 case $ac_dashdash$ac_option in
945 --)
946 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948 -bindir | --bindir | --bindi | --bind | --bin | --bi)
949 ac_prev=bindir ;;
950 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
953 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 -cache-file | --cache-file | --cache-fil | --cache-fi \
959 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
960 ac_prev=cache_file ;;
961 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
962 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 cache_file=$ac_optarg ;;
964
965 --config-cache | -C)
966 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000968 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
974 | --dataroo | --dataro | --datar)
975 ac_prev=datarootdir ;;
976 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
977 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
978 datarootdir=$ac_optarg ;;
979
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000981 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000982 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000983 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200984 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000985 ac_useropt_orig=$ac_useropt
986 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
987 case $ac_user_opts in
988 *"
989"enable_$ac_useropt"
990"*) ;;
991 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
992 ac_unrecognized_sep=', ';;
993 esac
994 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000995
996 -docdir | --docdir | --docdi | --doc | --do)
997 ac_prev=docdir ;;
998 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
999 docdir=$ac_optarg ;;
1000
1001 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1002 ac_prev=dvidir ;;
1003 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1004 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
1006 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001007 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001009 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001010 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001011 ac_useropt_orig=$ac_useropt
1012 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1013 case $ac_user_opts in
1014 *"
1015"enable_$ac_useropt"
1016"*) ;;
1017 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1018 ac_unrecognized_sep=', ';;
1019 esac
1020 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1023 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1024 | --exec | --exe | --ex)
1025 ac_prev=exec_prefix ;;
1026 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1027 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1028 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
1031 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001032 # Obsolete; use --with-gas.
1033 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 -help | --help | --hel | --he | -h)
1036 ac_init_help=long ;;
1037 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1038 ac_init_help=recursive ;;
1039 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1040 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
1042 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001047 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1048 ac_prev=htmldir ;;
1049 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1050 | --ht=*)
1051 htmldir=$ac_optarg ;;
1052
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053 -includedir | --includedir | --includedi | --included | --include \
1054 | --includ | --inclu | --incl | --inc)
1055 ac_prev=includedir ;;
1056 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1057 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
1060 -infodir | --infodir | --infodi | --infod | --info | --inf)
1061 ac_prev=infodir ;;
1062 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -libdir | --libdir | --libdi | --libd)
1066 ac_prev=libdir ;;
1067 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1071 | --libexe | --libex | --libe)
1072 ac_prev=libexecdir ;;
1073 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1074 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001077 -localedir | --localedir | --localedi | --localed | --locale)
1078 ac_prev=localedir ;;
1079 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1080 localedir=$ac_optarg ;;
1081
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001083 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084 ac_prev=localstatedir ;;
1085 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001086 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
1089 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1090 ac_prev=mandir ;;
1091 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001095 # Obsolete; use --without-fp.
1096 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 no_create=yes ;;
1101
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001102 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1103 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1104 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001106 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1107 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1108 | --oldin | --oldi | --old | --ol | --o)
1109 ac_prev=oldincludedir ;;
1110 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1111 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1112 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1116 ac_prev=prefix ;;
1117 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1121 | --program-pre | --program-pr | --program-p)
1122 ac_prev=program_prefix ;;
1123 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1124 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126
1127 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1128 | --program-suf | --program-su | --program-s)
1129 ac_prev=program_suffix ;;
1130 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1131 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
1134 -program-transform-name | --program-transform-name \
1135 | --program-transform-nam | --program-transform-na \
1136 | --program-transform-n | --program-transform- \
1137 | --program-transform | --program-transfor \
1138 | --program-transfo | --program-transf \
1139 | --program-trans | --program-tran \
1140 | --progr-tra | --program-tr | --program-t)
1141 ac_prev=program_transform_name ;;
1142 -program-transform-name=* | --program-transform-name=* \
1143 | --program-transform-nam=* | --program-transform-na=* \
1144 | --program-transform-n=* | --program-transform-=* \
1145 | --program-transform=* | --program-transfor=* \
1146 | --program-transfo=* | --program-transf=* \
1147 | --program-trans=* | --program-tran=* \
1148 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001151 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1152 ac_prev=pdfdir ;;
1153 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1154 pdfdir=$ac_optarg ;;
1155
1156 -psdir | --psdir | --psdi | --psd | --ps)
1157 ac_prev=psdir ;;
1158 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1159 psdir=$ac_optarg ;;
1160
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1162 | -silent | --silent | --silen | --sile | --sil)
1163 silent=yes ;;
1164
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1166 ac_prev=sbindir ;;
1167 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1168 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170
1171 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1172 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1173 | --sharedst | --shareds | --shared | --share | --shar \
1174 | --sha | --sh)
1175 ac_prev=sharedstatedir ;;
1176 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1177 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1178 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1179 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182 -site | --site | --sit)
1183 ac_prev=site ;;
1184 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1188 ac_prev=srcdir ;;
1189 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1193 | --syscon | --sysco | --sysc | --sys | --sy)
1194 ac_prev=sysconfdir ;;
1195 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1196 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1205 verbose=yes ;;
1206
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 -version | --version | --versio | --versi | --vers | -V)
1208 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt_orig=$ac_useropt
1216 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217 case $ac_user_opts in
1218 *"
1219"with_$ac_useropt"
1220"*) ;;
1221 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1222 ac_unrecognized_sep=', ';;
1223 esac
1224 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
1226 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001229 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001230 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001231 ac_useropt_orig=$ac_useropt
1232 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1233 case $ac_user_opts in
1234 *"
1235"with_$ac_useropt"
1236"*) ;;
1237 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1238 ac_unrecognized_sep=', ';;
1239 esac
1240 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242 --x)
1243 # Obsolete; use --with-x.
1244 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
1246 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1247 | --x-incl | --x-inc | --x-in | --x-i)
1248 ac_prev=x_includes ;;
1249 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1250 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252
1253 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1254 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1255 ac_prev=x_libraries ;;
1256 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1257 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001260 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1261Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262 ;;
1263
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 *=*)
1265 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1266 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 case $ac_envvar in #(
1268 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001269 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 export $ac_envvar ;;
1273
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001274 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001276 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001279 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280 ;;
1281
1282 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283done
1284
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001286 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001288fi
1289
Matthias Kloseb9621712010-04-24 17:59:49 +00001290if test -n "$ac_unrecognized_opts"; then
1291 case $enable_option_checking in
1292 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001293 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001294 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1295 esac
1296fi
1297
1298# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1300 datadir sysconfdir sharedstatedir localstatedir includedir \
1301 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001302 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001303do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001305 # Remove trailing slashes.
1306 case $ac_val in
1307 */ )
1308 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1309 eval $ac_var=\$ac_val;;
1310 esac
1311 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313 [\\/$]* | ?:[\\/]* ) continue;;
1314 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001315 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001316 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001317done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318
Martin v. Löwis11437992002-04-12 09:54:03 +00001319# There might be people who depend on the old broken behavior: `$host'
1320# used to hold the argument of --host etc.
1321# FIXME: To remove some day.
1322build=$build_alias
1323host=$host_alias
1324target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325
Martin v. Löwis11437992002-04-12 09:54:03 +00001326# FIXME: To remove some day.
1327if test "x$host_alias" != x; then
1328 if test "x$build_alias" = x; then
1329 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 elif test "x$build_alias" != "x$host_alias"; then
1331 cross_compiling=yes
1332 fi
1333fi
1334
1335ac_tool_prefix=
1336test -n "$host_alias" && ac_tool_prefix=$host_alias-
1337
1338test "$silent" = yes && exec 6>/dev/null
1339
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341ac_pwd=`pwd` && test -n "$ac_pwd" &&
1342ac_ls_di=`ls -di .` &&
1343ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001344 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001346 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347
1348
Guido van Rossum627b2d71993-12-24 10:39:16 +00001349# Find the source files, if location was not specified.
1350if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001351 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001353 ac_confdir=`$as_dirname -- "$as_myself" ||
1354$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1355 X"$as_myself" : 'X\(//\)[^/]' \| \
1356 X"$as_myself" : 'X\(//\)$' \| \
1357 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1358$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001359 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1360 s//\1/
1361 q
1362 }
1363 /^X\(\/\/\)[^/].*/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\/\)$/{
1368 s//\1/
1369 q
1370 }
1371 /^X\(\/\).*/{
1372 s//\1/
1373 q
1374 }
1375 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001376 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001378 srcdir=..
1379 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001380else
1381 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383if test ! -r "$srcdir/$ac_unique_file"; then
1384 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1388ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001389 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001390 pwd)`
1391# When building in place, set srcdir=.
1392if test "$ac_abs_confdir" = "$ac_pwd"; then
1393 srcdir=.
1394fi
1395# Remove unnecessary trailing slashes from srcdir.
1396# Double slashes in file names in object file debugging info
1397# mess up M-x gdb in Emacs.
1398case $srcdir in
1399*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1400esac
1401for ac_var in $ac_precious_vars; do
1402 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1403 eval ac_env_${ac_var}_value=\$${ac_var}
1404 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1405 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1406done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001407
Martin v. Löwis11437992002-04-12 09:54:03 +00001408#
1409# Report the --help message.
1410#
1411if test "$ac_init_help" = "long"; then
1412 # Omit some internal or obsolete options to make the list less imposing.
1413 # This message is too long to be a string in the A/UX 3.1 sh.
1414 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001415\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416
1417Usage: $0 [OPTION]... [VAR=VALUE]...
1418
1419To assign environment variables (e.g., CC, CFLAGS...), specify them as
1420VAR=VALUE. See below for descriptions of some of the useful variables.
1421
1422Defaults for the options are specified in brackets.
1423
1424Configuration:
1425 -h, --help display this help and exit
1426 --help=short display options specific to this package
1427 --help=recursive display the short help of all the included packages
1428 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001429 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 --cache-file=FILE cache test results in FILE [disabled]
1431 -C, --config-cache alias for \`--cache-file=config.cache'
1432 -n, --no-create do not create output files
1433 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1434
Martin v. Löwis11437992002-04-12 09:54:03 +00001435Installation directories:
1436 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001439 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001440
1441By default, \`make install' will install all the files in
1442\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1443an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1444for instance \`--prefix=\$HOME'.
1445
1446For better control, use the options below.
1447
1448Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 --bindir=DIR user executables [EPREFIX/bin]
1450 --sbindir=DIR system admin executables [EPREFIX/sbin]
1451 --libexecdir=DIR program executables [EPREFIX/libexec]
1452 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1453 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1454 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1455 --libdir=DIR object code libraries [EPREFIX/lib]
1456 --includedir=DIR C header files [PREFIX/include]
1457 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1458 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1459 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1460 --infodir=DIR info documentation [DATAROOTDIR/info]
1461 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1462 --mandir=DIR man documentation [DATAROOTDIR/man]
1463 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1464 --htmldir=DIR html documentation [DOCDIR]
1465 --dvidir=DIR dvi documentation [DOCDIR]
1466 --pdfdir=DIR pdf documentation [DOCDIR]
1467 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001468_ACEOF
1469
1470 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001471
1472System types:
1473 --build=BUILD configure for building on BUILD [guessed]
1474 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001475_ACEOF
1476fi
1477
1478if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001479 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001480 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001481 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 cat <<\_ACEOF
1483
1484Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001485 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1487 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001488 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001489 create a universal binary build. SDKDIR specifies
1490 which macOS SDK should be used to perform the build,
1491 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001493 create a Python.framework rather than a traditional
1494 Unix install. optional INSTALLDIR specifies the
1495 installation path. see Mac/README.rst (default is
1496 no)
1497 --enable-shared enable building a shared Python library (default is
1498 no)
1499 --enable-profiling enable C-level code profiling with gprof (default is
1500 no)
1501 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1502 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001503 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001504 support loadable extensions in _sqlite module, see
1505 Doc/library/sqlite3.rst (default is no)
1506 --enable-ipv6 enable ipv6 (with ipv4) support, see
1507 Doc/library/socket.rst (default is yes if supported)
1508 --enable-big-digits[=15|30]
1509 use big digits (30 or 15 bits) for Python longs
1510 (default is system-dependent)]
pxinwr277ce302020-12-30 20:50:39 +08001511 --disable-test-modules don't build nor install test modules
Martin v. Löwis11437992002-04-12 09:54:03 +00001512
1513Optional Packages:
1514 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1515 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001516 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001517 specify the kind of universal binary that should be
1518 created. this option is only valid when
1519 --enable-universalsdk is set; options are:
Ronald Oussoren41761932020-11-08 10:05:27 +01001520 ("universal2", "32-bit", "64-bit", "3-way", "intel",
1521 "intel-32", "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001522 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001523 specify the name for the python framework on macOS
1524 only valid when --enable-framework is set. see
1525 Mac/README.rst (default is 'Python')
1526 --with-cxx-main[=COMPILER]
1527 compile main() and link Python executable with C++
1528 compiler specified in COMPILER (default is $CXX)
1529 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1530 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001531 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001532 (default is no)
1533 --with-assertions build with C assertions enabled (default is no)
1534 --with-lto enable Link-Time-Optimization in any build (default
1535 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001536 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001537 select hash algorithm for use in Python/pyhash.c
1538 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001539 --with-tzpath=<list of absolute paths separated by pathsep>
1540 Select the default time zone search path for zoneinfo.TZPATH
1541
Charles-François Natalid30b0222014-05-08 23:08:51 +01001542 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001543 enable AddressSanitizer memory error detector,
1544 'asan' (default is no)
1545 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1546 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001547 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001548 enable UndefinedBehaviorSanitizer undefined
1549 behaviour detector, 'ubsan' (default is no)
1550 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001551 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001552 library, see Doc/library/pyexpat.rst (default is no)
1553 --with-system-ffi build _ctypes module using an installed ffi library,
1554 see Doc/library/ctypes.rst (default is
1555 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001556 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001557 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001558 --with-decimal-contextvar
1559 build _decimal module using a coroutine-local rather
1560 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001561 --with-tcltk-includes='-I...'
1562 override search for Tcl and Tk include files
1563 --with-tcltk-libs='-L...'
1564 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001565 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001566 override order to check db backends for dbm; a valid
1567 value is a colon separated string with the backend
1568 names `ndbm', `gdbm' and `bdb'.
1569 --with-doc-strings enable documentation strings (default is yes)
1570 --with-pymalloc enable specialized mallocs (default is yes)
1571 --with-c-locale-coercion
1572 enable C locale coercion to a UTF-8 based locale
1573 (default is yes)
1574 --with-valgrind enable Valgrind support (default is no)
1575 --with-dtrace enable DTrace support (default is no)
1576 --with-libm=STRING override libm math library to STRING (default is
1577 system-dependent)
1578 --with-libc=STRING override libc C library to STRING (default is
1579 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001580 --with-platlibdir=DIRNAME
1581 Python library directory name (default is "lib")
Victor Stinner75e59a92021-01-20 17:07:21 +01001582 --with-wheel-pkg-dir=PATH
1583 Directory of wheel packages used by ensurepip
1584 (default: none)
Roland Hiebere1f77692021-02-09 02:05:25 +01001585 --with(out)-readline[=editline]
1586 use Editline for backend or disable readline module
Anthony Shaw2de064e2020-01-14 17:40:10 +11001587 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001588 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001589 --with-ensurepip[=install|upgrade|no]
1590 "install" or "upgrade" using bundled pip (default is
1591 upgrade)
1592 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001593 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001594 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001595 Python's preferred selection (default), openssl:
1596 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001597 custom string, PROTOCOL_SSLv2 ignores the setting,
1598 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001599 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1600 builtin hash modules, md5, sha1, sha256, sha512,
1601 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001602 --with-experimental-isolated-subinterpreters
1603 better isolate subinterpreters, experimental build
1604 mode (default is no)
Martin v. Löwis11437992002-04-12 09:54:03 +00001605
1606Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001607 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001608 CC C compiler command
1609 CFLAGS C compiler flags
1610 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1611 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001613 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001616 PROFILE_TASK
1617 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001618 PKG_CONFIG path to pkg-config utility
1619 PKG_CONFIG_PATH
1620 directories to add to pkg-config's search path
1621 PKG_CONFIG_LIBDIR
1622 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001623
1624Use these variables to override the choices made by `configure' or to help
1625it to find libraries and programs with nonstandard names/locations.
1626
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001627Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001630fi
1631
1632if test "$ac_init_help" = "recursive"; then
1633 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001634 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001635 test -d "$ac_dir" ||
1636 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1637 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001638 ac_builddir=.
1639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640case "$ac_dir" in
1641.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1642*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001643 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001645 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646 case $ac_top_builddir_sub in
1647 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1648 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1649 esac ;;
1650esac
1651ac_abs_top_builddir=$ac_pwd
1652ac_abs_builddir=$ac_pwd$ac_dir_suffix
1653# for backward compatibility:
1654ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001655
1656case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659 ac_top_srcdir=$ac_top_builddir_sub
1660 ac_abs_top_srcdir=$ac_pwd ;;
1661 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001662 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001663 ac_top_srcdir=$srcdir
1664 ac_abs_top_srcdir=$srcdir ;;
1665 *) # Relative name.
1666 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1667 ac_top_srcdir=$ac_top_build_prefix$srcdir
1668 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001669esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001670ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001672 cd "$ac_dir" || { ac_status=$?; continue; }
1673 # Check for guested configure.
1674 if test -f "$ac_srcdir/configure.gnu"; then
1675 echo &&
1676 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1677 elif test -f "$ac_srcdir/configure"; then
1678 echo &&
1679 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001680 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001682 fi || ac_status=$?
1683 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001684 done
1685fi
1686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001687test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001688if $ac_init_version; then
1689 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001690python configure 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001691generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001692
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001693Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001694This configure script is free software; the Free Software Foundation
1695gives unlimited permission to copy, distribute and modify it.
1696_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001699
1700## ------------------------ ##
1701## Autoconf initialization. ##
1702## ------------------------ ##
1703
1704# ac_fn_c_try_compile LINENO
1705# --------------------------
1706# Try to compile conftest.$ac_ext, and return whether this succeeded.
1707ac_fn_c_try_compile ()
1708{
1709 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1710 rm -f conftest.$ac_objext
1711 if { { ac_try="$ac_compile"
1712case "(($ac_try" in
1713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1714 *) ac_try_echo=$ac_try;;
1715esac
1716eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1717$as_echo "$ac_try_echo"; } >&5
1718 (eval "$ac_compile") 2>conftest.err
1719 ac_status=$?
1720 if test -s conftest.err; then
1721 grep -v '^ *+' conftest.err >conftest.er1
1722 cat conftest.er1 >&5
1723 mv -f conftest.er1 conftest.err
1724 fi
1725 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1726 test $ac_status = 0; } && {
1727 test -z "$ac_c_werror_flag" ||
1728 test ! -s conftest.err
1729 } && test -s conftest.$ac_objext; then :
1730 ac_retval=0
1731else
1732 $as_echo "$as_me: failed program was:" >&5
1733sed 's/^/| /' conftest.$ac_ext >&5
1734
1735 ac_retval=1
1736fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001737 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001738 as_fn_set_status $ac_retval
1739
1740} # ac_fn_c_try_compile
1741
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001742# ac_fn_c_try_cpp LINENO
1743# ----------------------
1744# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1745ac_fn_c_try_cpp ()
1746{
1747 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748 if { { ac_try="$ac_cpp conftest.$ac_ext"
1749case "(($ac_try" in
1750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1751 *) ac_try_echo=$ac_try;;
1752esac
1753eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1754$as_echo "$ac_try_echo"; } >&5
1755 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1756 ac_status=$?
1757 if test -s conftest.err; then
1758 grep -v '^ *+' conftest.err >conftest.er1
1759 cat conftest.er1 >&5
1760 mv -f conftest.er1 conftest.err
1761 fi
1762 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1763 test $ac_status = 0; } > conftest.i && {
1764 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1765 test ! -s conftest.err
1766 }; then :
1767 ac_retval=0
1768else
1769 $as_echo "$as_me: failed program was:" >&5
1770sed 's/^/| /' conftest.$ac_ext >&5
1771
1772 ac_retval=1
1773fi
1774 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1775 as_fn_set_status $ac_retval
1776
1777} # ac_fn_c_try_cpp
1778
Matthias Kloseb9621712010-04-24 17:59:49 +00001779# ac_fn_c_try_link LINENO
1780# -----------------------
1781# Try to link conftest.$ac_ext, and return whether this succeeded.
1782ac_fn_c_try_link ()
1783{
1784 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1785 rm -f conftest.$ac_objext conftest$ac_exeext
1786 if { { ac_try="$ac_link"
1787case "(($ac_try" in
1788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1789 *) ac_try_echo=$ac_try;;
1790esac
1791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1792$as_echo "$ac_try_echo"; } >&5
1793 (eval "$ac_link") 2>conftest.err
1794 ac_status=$?
1795 if test -s conftest.err; then
1796 grep -v '^ *+' conftest.err >conftest.er1
1797 cat conftest.er1 >&5
1798 mv -f conftest.er1 conftest.err
1799 fi
1800 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1801 test $ac_status = 0; } && {
1802 test -z "$ac_c_werror_flag" ||
1803 test ! -s conftest.err
1804 } && test -s conftest$ac_exeext && {
1805 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001806 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 }; then :
1808 ac_retval=0
1809else
1810 $as_echo "$as_me: failed program was:" >&5
1811sed 's/^/| /' conftest.$ac_ext >&5
1812
1813 ac_retval=1
1814fi
1815 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1816 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1817 # interfere with the next link command; also delete a directory that is
1818 # left behind by Apple's compiler. We do this before executing the actions.
1819 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001820 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 as_fn_set_status $ac_retval
1822
1823} # ac_fn_c_try_link
1824
Matthias Kloseb9621712010-04-24 17:59:49 +00001825# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1826# -------------------------------------------------------
1827# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1828# the include files in INCLUDES and setting the cache variable VAR
1829# accordingly.
1830ac_fn_c_check_header_mongrel ()
1831{
1832 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001833 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1835$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001836if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 $as_echo_n "(cached) " >&6
1838fi
1839eval ac_res=\$$3
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1841$as_echo "$ac_res" >&6; }
1842else
1843 # Is the header compilable?
1844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1845$as_echo_n "checking $2 usability... " >&6; }
1846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848$4
1849#include <$2>
1850_ACEOF
1851if ac_fn_c_try_compile "$LINENO"; then :
1852 ac_header_compiler=yes
1853else
1854 ac_header_compiler=no
1855fi
1856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1858$as_echo "$ac_header_compiler" >&6; }
1859
1860# Is the header present?
1861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1862$as_echo_n "checking $2 presence... " >&6; }
1863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1864/* end confdefs.h. */
1865#include <$2>
1866_ACEOF
1867if ac_fn_c_try_cpp "$LINENO"; then :
1868 ac_header_preproc=yes
1869else
1870 ac_header_preproc=no
1871fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001872rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1874$as_echo "$ac_header_preproc" >&6; }
1875
1876# So? What about this header?
1877case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1878 yes:no: )
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1880$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1882$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1883 ;;
1884 no:yes:* )
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1886$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1888$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1890$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1892$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1894$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001895( $as_echo "## --------------------------------------- ##
1896## Report this to https://bugs.python.org/ ##
1897## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001898 ) | sed "s/^/$as_me: WARNING: /" >&2
1899 ;;
1900esac
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1902$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001903if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001904 $as_echo_n "(cached) " >&6
1905else
1906 eval "$3=\$ac_header_compiler"
1907fi
1908eval ac_res=\$$3
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1910$as_echo "$ac_res" >&6; }
1911fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001912 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001913
1914} # ac_fn_c_check_header_mongrel
1915
1916# ac_fn_c_try_run LINENO
1917# ----------------------
1918# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1919# that executables *can* be run.
1920ac_fn_c_try_run ()
1921{
1922 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1923 if { { ac_try="$ac_link"
1924case "(($ac_try" in
1925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1926 *) ac_try_echo=$ac_try;;
1927esac
1928eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1929$as_echo "$ac_try_echo"; } >&5
1930 (eval "$ac_link") 2>&5
1931 ac_status=$?
1932 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1933 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1934 { { case "(($ac_try" in
1935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1936 *) ac_try_echo=$ac_try;;
1937esac
1938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1939$as_echo "$ac_try_echo"; } >&5
1940 (eval "$ac_try") 2>&5
1941 ac_status=$?
1942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1943 test $ac_status = 0; }; }; then :
1944 ac_retval=0
1945else
1946 $as_echo "$as_me: program exited with status $ac_status" >&5
1947 $as_echo "$as_me: failed program was:" >&5
1948sed 's/^/| /' conftest.$ac_ext >&5
1949
1950 ac_retval=$ac_status
1951fi
1952 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001953 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001954 as_fn_set_status $ac_retval
1955
1956} # ac_fn_c_try_run
1957
1958# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1959# -------------------------------------------------------
1960# Tests whether HEADER exists and can be compiled using the include files in
1961# INCLUDES, setting the cache variable VAR accordingly.
1962ac_fn_c_check_header_compile ()
1963{
1964 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1966$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001967if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001968 $as_echo_n "(cached) " >&6
1969else
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$4
1973#include <$2>
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976 eval "$3=yes"
1977else
1978 eval "$3=no"
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1981fi
1982eval ac_res=\$$3
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1984$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001985 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001986
1987} # ac_fn_c_check_header_compile
1988
Matthias Kloseb9621712010-04-24 17:59:49 +00001989# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1990# -------------------------------------------
1991# Tests whether TYPE exists after having included INCLUDES, setting cache
1992# variable VAR accordingly.
1993ac_fn_c_check_type ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1997$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001998if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001999 $as_echo_n "(cached) " >&6
2000else
2001 eval "$3=no"
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004$4
2005int
2006main ()
2007{
2008if (sizeof ($2))
2009 return 0;
2010 ;
2011 return 0;
2012}
2013_ACEOF
2014if ac_fn_c_try_compile "$LINENO"; then :
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
2019main ()
2020{
2021if (sizeof (($2)))
2022 return 0;
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028
2029else
2030 eval "$3=yes"
2031fi
2032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2033fi
2034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2035fi
2036eval ac_res=\$$3
2037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2038$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002039 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002040
2041} # ac_fn_c_check_type
2042
Matthias Kloseb9621712010-04-24 17:59:49 +00002043# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2044# --------------------------------------------
2045# Tries to find the compile-time value of EXPR in a program that includes
2046# INCLUDES, setting VAR accordingly. Returns whether the value could be
2047# computed
2048ac_fn_c_compute_int ()
2049{
2050 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2051 if test "$cross_compiling" = yes; then
2052 # Depending upon the size, compute the lo and hi bounds.
2053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002060test_array [0] = 0;
2061return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_lo=0 ac_mid=0
2069 while :; do
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002077test_array [0] = 0;
2078return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002079
2080 ;
2081 return 0;
2082}
2083_ACEOF
2084if ac_fn_c_try_compile "$LINENO"; then :
2085 ac_hi=$ac_mid; break
2086else
2087 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2088 if test $ac_lo -le $ac_mid; then
2089 ac_lo= ac_hi=
2090 break
2091 fi
2092 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095 done
2096else
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
2099$4
2100int
2101main ()
2102{
2103static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002104test_array [0] = 0;
2105return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002106
2107 ;
2108 return 0;
2109}
2110_ACEOF
2111if ac_fn_c_try_compile "$LINENO"; then :
2112 ac_hi=-1 ac_mid=-1
2113 while :; do
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117int
2118main ()
2119{
2120static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002121test_array [0] = 0;
2122return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002123
2124 ;
2125 return 0;
2126}
2127_ACEOF
2128if ac_fn_c_try_compile "$LINENO"; then :
2129 ac_lo=$ac_mid; break
2130else
2131 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2132 if test $ac_mid -le $ac_hi; then
2133 ac_lo= ac_hi=
2134 break
2135 fi
2136 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2137fi
2138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2139 done
2140else
2141 ac_lo= ac_hi=
2142fi
2143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146# Binary search between lo and hi bounds.
2147while test "x$ac_lo" != "x$ac_hi"; do
2148 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
2152int
2153main ()
2154{
2155static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002156test_array [0] = 0;
2157return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002158
2159 ;
2160 return 0;
2161}
2162_ACEOF
2163if ac_fn_c_try_compile "$LINENO"; then :
2164 ac_hi=$ac_mid
2165else
2166 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2167fi
2168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2169done
2170case $ac_lo in #((
2171?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2172'') ac_retval=1 ;;
2173esac
2174 else
2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176/* end confdefs.h. */
2177$4
2178static long int longval () { return $2; }
2179static unsigned long int ulongval () { return $2; }
2180#include <stdio.h>
2181#include <stdlib.h>
2182int
2183main ()
2184{
2185
2186 FILE *f = fopen ("conftest.val", "w");
2187 if (! f)
2188 return 1;
2189 if (($2) < 0)
2190 {
2191 long int i = longval ();
2192 if (i != ($2))
2193 return 1;
2194 fprintf (f, "%ld", i);
2195 }
2196 else
2197 {
2198 unsigned long int i = ulongval ();
2199 if (i != ($2))
2200 return 1;
2201 fprintf (f, "%lu", i);
2202 }
2203 /* Do not output a trailing newline, as this causes \r\n confusion
2204 on some platforms. */
2205 return ferror (f) || fclose (f) != 0;
2206
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_run "$LINENO"; then :
2212 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2213else
2214 ac_retval=1
2215fi
2216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2217 conftest.$ac_objext conftest.beam conftest.$ac_ext
2218rm -f conftest.val
2219
2220 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002221 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002222 as_fn_set_status $ac_retval
2223
2224} # ac_fn_c_compute_int
2225
2226# ac_fn_c_check_func LINENO FUNC VAR
2227# ----------------------------------
2228# Tests whether FUNC exists, setting the cache variable VAR accordingly
2229ac_fn_c_check_func ()
2230{
2231 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2233$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002234if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002235 $as_echo_n "(cached) " >&6
2236else
2237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238/* end confdefs.h. */
2239/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2240 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2241#define $2 innocuous_$2
2242
2243/* System header to define __stub macros and hopefully few prototypes,
2244 which can conflict with char $2 (); below.
2245 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2246 <limits.h> exists even on freestanding compilers. */
2247
2248#ifdef __STDC__
2249# include <limits.h>
2250#else
2251# include <assert.h>
2252#endif
2253
2254#undef $2
2255
2256/* Override any GCC internal prototype to avoid an error.
2257 Use char because int might match the return type of a GCC
2258 builtin and then its argument prototype would still apply. */
2259#ifdef __cplusplus
2260extern "C"
2261#endif
2262char $2 ();
2263/* The GNU C library defines this for functions which it implements
2264 to always fail with ENOSYS. Some functions are actually named
2265 something starting with __ and the normal name is an alias. */
2266#if defined __stub_$2 || defined __stub___$2
2267choke me
2268#endif
2269
2270int
2271main ()
2272{
2273return $2 ();
2274 ;
2275 return 0;
2276}
2277_ACEOF
2278if ac_fn_c_try_link "$LINENO"; then :
2279 eval "$3=yes"
2280else
2281 eval "$3=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext \
2284 conftest$ac_exeext conftest.$ac_ext
2285fi
2286eval ac_res=\$$3
2287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2288$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002289 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002290
2291} # ac_fn_c_check_func
2292
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002293# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2294# ---------------------------------------------
2295# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2296# accordingly.
2297ac_fn_c_check_decl ()
2298{
2299 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300 as_decl_name=`echo $2|sed 's/ *(.*//'`
2301 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2303$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2304if eval \${$3+:} false; then :
2305 $as_echo_n "(cached) " >&6
2306else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$4
2310int
2311main ()
2312{
2313#ifndef $as_decl_name
2314#ifdef __cplusplus
2315 (void) $as_decl_use;
2316#else
2317 (void) $as_decl_name;
2318#endif
2319#endif
2320
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$3=yes"
2327else
2328 eval "$3=no"
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332eval ac_res=\$$3
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334$as_echo "$ac_res" >&6; }
2335 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2336
2337} # ac_fn_c_check_decl
2338
Matthias Kloseb9621712010-04-24 17:59:49 +00002339# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2340# ----------------------------------------------------
2341# Tries to find if the field MEMBER exists in type AGGR, after including
2342# INCLUDES, setting cache variable VAR accordingly.
2343ac_fn_c_check_member ()
2344{
2345 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2347$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002348if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002349 $as_echo_n "(cached) " >&6
2350else
2351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2352/* end confdefs.h. */
2353$5
2354int
2355main ()
2356{
2357static $2 ac_aggr;
2358if (ac_aggr.$3)
2359return 0;
2360 ;
2361 return 0;
2362}
2363_ACEOF
2364if ac_fn_c_try_compile "$LINENO"; then :
2365 eval "$4=yes"
2366else
2367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368/* end confdefs.h. */
2369$5
2370int
2371main ()
2372{
2373static $2 ac_aggr;
2374if (sizeof ac_aggr.$3)
2375return 0;
2376 ;
2377 return 0;
2378}
2379_ACEOF
2380if ac_fn_c_try_compile "$LINENO"; then :
2381 eval "$4=yes"
2382else
2383 eval "$4=no"
2384fi
2385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388fi
2389eval ac_res=\$$4
2390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2391$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002392 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002393
2394} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002395cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002396This file contains any messages produced by compilers while
2397running configure, to aid debugging if configure makes a mistake.
2398
Pablo Galindod4fe0982020-05-19 03:33:01 +01002399It was created by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002400generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002401
2402 $ $0 $@
2403
2404_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002405exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002406{
2407cat <<_ASUNAME
2408## --------- ##
2409## Platform. ##
2410## --------- ##
2411
2412hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2413uname -m = `(uname -m) 2>/dev/null || echo unknown`
2414uname -r = `(uname -r) 2>/dev/null || echo unknown`
2415uname -s = `(uname -s) 2>/dev/null || echo unknown`
2416uname -v = `(uname -v) 2>/dev/null || echo unknown`
2417
2418/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2419/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2420
2421/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2422/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2423/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002425/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2426/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2427/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2428
2429_ASUNAME
2430
2431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2432for as_dir in $PATH
2433do
2434 IFS=$as_save_IFS
2435 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 $as_echo "PATH: $as_dir"
2437 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002438IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002439
2440} >&5
2441
2442cat >&5 <<_ACEOF
2443
2444
2445## ----------- ##
2446## Core tests. ##
2447## ----------- ##
2448
2449_ACEOF
2450
2451
2452# Keep a trace of the command line.
2453# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002454# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002455# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002456# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002457ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002458ac_configure_args0=
2459ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002460ac_must_keep_next=false
2461for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002462do
Skip Montanaro6dead952003-09-25 14:50:04 +00002463 for ac_arg
2464 do
2465 case $ac_arg in
2466 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2467 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2468 | -silent | --silent | --silen | --sile | --sil)
2469 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002472 esac
2473 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002474 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002475 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002477 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002478 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002480 case $ac_arg in
2481 *=* | --config-cache | -C | -disable-* | --disable-* \
2482 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2483 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2484 | -with-* | --with-* | -without-* | --without-* | --x)
2485 case "$ac_configure_args0 " in
2486 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2487 esac
2488 ;;
2489 -* ) ac_must_keep_next=true ;;
2490 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002492 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 ;;
2494 esac
2495 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002496done
Matthias Kloseb9621712010-04-24 17:59:49 +00002497{ ac_configure_args0=; unset ac_configure_args0;}
2498{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002499
2500# When interrupted or exit'd, cleanup temporary files, and complete
2501# config.log. We remove comments because anyway the quotes in there
2502# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503# WARNING: Use '\'' to represent an apostrophe within the trap.
2504# 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 +00002505trap 'exit_status=$?
2506 # Save into config.log some information that might help in debugging.
2507 {
2508 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002509
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002510 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002511## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002512## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 echo
2514 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515(
2516 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2517 eval ac_val=\$$ac_var
2518 case $ac_val in #(
2519 *${as_nl}*)
2520 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002521 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2522$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 esac
2524 case $ac_var in #(
2525 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2527 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 esac ;;
2529 esac
2530 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2533 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 "s/'\''/'\''\\\\'\'''\''/g;
2536 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2537 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002538 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002540 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 esac |
2542 sort
2543)
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002545
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002546 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002547## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002548## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002549 echo
2550 for ac_var in $ac_subst_vars
2551 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 eval ac_val=\$$ac_var
2553 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002554 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002557 done | sort
2558 echo
2559
2560 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002561 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002564 echo
2565 for ac_var in $ac_subst_files
2566 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 eval ac_val=\$$ac_var
2568 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002569 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002572 done | sort
2573 echo
2574 fi
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002577 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002578## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002579## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 echo
2583 fi
2584 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 $as_echo "$as_me: caught signal $ac_signal"
2586 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588 rm -f core *.core core.conftest.* &&
2589 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002592for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002594done
2595ac_signal=0
2596
2597# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002599
Matthias Kloseb9621712010-04-24 17:59:49 +00002600$as_echo "/* confdefs.h */" > confdefs.h
2601
Martin v. Löwis11437992002-04-12 09:54:03 +00002602# Predefined preprocessor variables.
2603
2604cat >>confdefs.h <<_ACEOF
2605#define PACKAGE_NAME "$PACKAGE_NAME"
2606_ACEOF
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608cat >>confdefs.h <<_ACEOF
2609#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2610_ACEOF
2611
Martin v. Löwis11437992002-04-12 09:54:03 +00002612cat >>confdefs.h <<_ACEOF
2613#define PACKAGE_VERSION "$PACKAGE_VERSION"
2614_ACEOF
2615
Martin v. Löwis11437992002-04-12 09:54:03 +00002616cat >>confdefs.h <<_ACEOF
2617#define PACKAGE_STRING "$PACKAGE_STRING"
2618_ACEOF
2619
Martin v. Löwis11437992002-04-12 09:54:03 +00002620cat >>confdefs.h <<_ACEOF
2621#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2622_ACEOF
2623
Matthias Kloseb9621712010-04-24 17:59:49 +00002624cat >>confdefs.h <<_ACEOF
2625#define PACKAGE_URL "$PACKAGE_URL"
2626_ACEOF
2627
Martin v. Löwis11437992002-04-12 09:54:03 +00002628
2629# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002630# Prefer an explicitly selected file to automatically selected ones.
2631ac_site_file1=NONE
2632ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002634 # We do not want a PATH search for config.site.
2635 case $CONFIG_SITE in #((
2636 -*) ac_site_file1=./$CONFIG_SITE;;
2637 */*) ac_site_file1=$CONFIG_SITE;;
2638 *) ac_site_file1=./$CONFIG_SITE;;
2639 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 ac_site_file1=$prefix/share/config.site
2642 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002643else
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 ac_site_file1=$ac_default_prefix/share/config.site
2645 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002647for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648do
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 test "x$ac_site_file" = xNONE && continue
2650 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2652$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002654 . "$ac_site_file" \
2655 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2657as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002658See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002659 fi
2660done
2661
2662if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 # Some versions of bash will fail to source /dev/null (special files
2664 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2665 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2667$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002669 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2670 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673else
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2675$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 >$cache_file
2677fi
2678
2679# Check that the precious variables saved in the cache have kept the same
2680# value.
2681ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2684 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2686 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 case $ac_old_set,$ac_new_set in
2688 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002689 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2690$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 +00002691 ac_cache_corrupted=: ;;
2692 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2694$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 ac_cache_corrupted=: ;;
2696 ,);;
2697 *)
2698 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002699 # differences in whitespace do not lead to failure.
2700 ac_old_val_w=`echo x $ac_old_val`
2701 ac_new_val_w=`echo x $ac_new_val`
2702 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2704$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2705 ac_cache_corrupted=:
2706 else
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2708$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2709 eval $ac_var=\$ac_old_val
2710 fi
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2712$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2714$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 fi;;
2716 esac
2717 # Pass precious variables to config.status.
2718 if test "$ac_new_set" = set; then
2719 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002720 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 *) ac_arg=$ac_var=$ac_new_val ;;
2722 esac
2723 case " $ac_configure_args " in
2724 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002725 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002726 esac
2727 fi
2728done
2729if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002730 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2733$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002734 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002736## -------------------- ##
2737## Main body of script. ##
2738## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002739
Guido van Rossum7f43da71994-08-01 12:15:30 +00002740ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002741ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002742ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2743ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2744ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002745
Guido van Rossum627b2d71993-12-24 10:39:16 +00002746
Michael W. Hudson54241132001-12-07 15:38:26 +00002747
Trent Nelson4d4ec652012-10-16 08:51:24 -04002748
Christian Heimesff5be6e2018-01-20 13:19:21 +01002749
2750
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002751if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002752 # If we're building out-of-tree, we need to make sure the following
2753 # resources get picked up before their $srcdir counterparts.
2754 # Objects/ -> typeslots.inc
Lysandros Nikolaou314858e2020-06-20 21:07:25 +03002755 # Include/ -> Python-ast.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04002756 # Python/ -> importlib.h
2757 # (A side effect of this is that these resources will automatically be
2758 # regenerated when building out-of-tree, regardless of whether or not
2759 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2760 # off.)
2761 BASECPPFLAGS="-IObjects -IInclude -IPython"
2762else
2763 BASECPPFLAGS=""
2764fi
2765
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766
2767
2768
2769
Victor Stinner9ed34a82017-05-02 22:35:58 +02002770if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002772# Extract the first word of "git", so it can be a program name with args.
2773set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2775$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002776if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777 $as_echo_n "(cached) " >&6
2778else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002779 if test -n "$HAS_GIT"; then
2780 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002781else
2782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2783for as_dir in $PATH
2784do
2785 IFS=$as_save_IFS
2786 test -z "$as_dir" && as_dir=.
2787 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002789 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2791 break 2
2792 fi
2793done
2794 done
2795IFS=$as_save_IFS
2796
Ned Deily5c4b0d02017-03-04 00:19:55 -05002797 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002798fi
2799fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002800HAS_GIT=$ac_cv_prog_HAS_GIT
2801if test -n "$HAS_GIT"; then
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2803$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804else
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2806$as_echo "no" >&6; }
2807fi
2808
2809
2810else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002811HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002812fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002813if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002814then
Xiang Zhang4c855572018-08-20 22:36:19 +08002815 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2816 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2817 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002818else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002819 GITVERSION=""
2820 GITTAG=""
2821 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002822fi
2823
2824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002825ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002826
2827
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002828ac_aux_dir=
2829for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2830 if test -f "$ac_dir/install-sh"; then
2831 ac_aux_dir=$ac_dir
2832 ac_install_sh="$ac_aux_dir/install-sh -c"
2833 break
2834 elif test -f "$ac_dir/install.sh"; then
2835 ac_aux_dir=$ac_dir
2836 ac_install_sh="$ac_aux_dir/install.sh -c"
2837 break
2838 elif test -f "$ac_dir/shtool"; then
2839 ac_aux_dir=$ac_dir
2840 ac_install_sh="$ac_aux_dir/shtool install -c"
2841 break
2842 fi
2843done
2844if test -z "$ac_aux_dir"; then
2845 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2846fi
2847
2848# These three variables are undocumented and unsupported,
2849# and are intended to be withdrawn in a future Autoconf release.
2850# They can cause serious problems if a builder's source tree is in a directory
2851# whose full name contains unusual characters.
2852ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2853ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2854ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2855
2856
2857# Make sure we can run config.sub.
2858$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2859 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2860
2861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2862$as_echo_n "checking build system type... " >&6; }
2863if ${ac_cv_build+:} false; then :
2864 $as_echo_n "(cached) " >&6
2865else
2866 ac_build_alias=$build_alias
2867test "x$ac_build_alias" = x &&
2868 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2869test "x$ac_build_alias" = x &&
2870 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2871ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2872 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2873
2874fi
2875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2876$as_echo "$ac_cv_build" >&6; }
2877case $ac_cv_build in
2878*-*-*) ;;
2879*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2880esac
2881build=$ac_cv_build
2882ac_save_IFS=$IFS; IFS='-'
2883set x $ac_cv_build
2884shift
2885build_cpu=$1
2886build_vendor=$2
2887shift; shift
2888# Remember, the first character of IFS is used to create $*,
2889# except with old shells:
2890build_os=$*
2891IFS=$ac_save_IFS
2892case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2893
2894
2895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2896$as_echo_n "checking host system type... " >&6; }
2897if ${ac_cv_host+:} false; then :
2898 $as_echo_n "(cached) " >&6
2899else
2900 if test "x$host_alias" = x; then
2901 ac_cv_host=$ac_cv_build
2902else
2903 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2904 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2905fi
2906
2907fi
2908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2909$as_echo "$ac_cv_host" >&6; }
2910case $ac_cv_host in
2911*-*-*) ;;
2912*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2913esac
2914host=$ac_cv_host
2915ac_save_IFS=$IFS; IFS='-'
2916set x $ac_cv_host
2917shift
2918host_cpu=$1
2919host_vendor=$2
2920shift; shift
2921# Remember, the first character of IFS is used to create $*,
2922# except with old shells:
2923host_os=$*
2924IFS=$ac_save_IFS
2925case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2926
2927
2928
doko@python.orga10e4a92013-01-25 18:45:12 +01002929
2930
Ned Deilyfcbc2462014-08-22 13:32:49 -07002931# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2932rm -f pybuilddir.txt
2933
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002934for ac_prog in python$PACKAGE_VERSION python3 python
2935do
2936 # Extract the first word of "$ac_prog", so it can be a program name with args.
2937set dummy $ac_prog; ac_word=$2
2938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2939$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002940if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002941 $as_echo_n "(cached) " >&6
2942else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002943 if test -n "$PYTHON_FOR_REGEN"; then
2944 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002945else
2946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2947for as_dir in $PATH
2948do
2949 IFS=$as_save_IFS
2950 test -z "$as_dir" && as_dir=.
2951 for ac_exec_ext in '' $ac_executable_extensions; do
2952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002953 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2955 break 2
2956 fi
2957done
2958 done
2959IFS=$as_save_IFS
2960
2961fi
2962fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002963PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2964if test -n "$PYTHON_FOR_REGEN"; then
2965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2966$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002967else
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2969$as_echo "no" >&6; }
2970fi
2971
2972
Victor Stinnera5c62a82017-05-03 18:21:48 +02002973 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002974done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002975test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002976
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002977
2978
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002979if test "$cross_compiling" = yes; then
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2981$as_echo_n "checking for python interpreter for cross build... " >&6; }
2982 if test -z "$PYTHON_FOR_BUILD"; then
2983 for interp in python$PACKAGE_VERSION python3 python; do
2984 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002985 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 +02002986 break
2987 fi
2988 interp=
2989 done
2990 if test x$interp = x; then
2991 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2992 fi
2993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2994$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002995 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 +02002996 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002997elif test "$cross_compiling" = maybe; then
2998 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002999else
3000 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3001fi
3002
3003
Martin v. Löwis11437992002-04-12 09:54:03 +00003004
Benjamin Petersond23f8222009-04-05 19:13:16 +00003005if test "$prefix" != "/"; then
3006 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3007fi
3008
3009
Martin v. Löwis11437992002-04-12 09:54:03 +00003010
3011
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003012# We don't use PACKAGE_ variables, and they cause conflicts
3013# with other autoconf-based packages that include Python.h
3014grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3015rm confdefs.h
3016mv confdefs.h.new confdefs.h
3017
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003018
Pablo Galindod4fe0982020-05-19 03:33:01 +01003019VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003020
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003021# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003022
3023SOVERSION=1.0
3024
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003025# The later defininition of _XOPEN_SOURCE disables certain features
3026# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003029
3030
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003031# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3032# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3033# them.
3034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003036
3037
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003038# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3039# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3040# them.
3041
Matthias Kloseb9621712010-04-24 17:59:49 +00003042$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003043
3044
Martin v. Löwisd6320502004-08-12 13:45:08 +00003045# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003046# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3047# them.
3048
Matthias Kloseb9621712010-04-24 17:59:49 +00003049$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003050
3051
3052
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003053define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003054
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003055# Arguments passed to configure.
3056
3057CONFIG_ARGS="$ac_configure_args"
3058
Matthias Kloseb9621712010-04-24 17:59:49 +00003059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3060$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003061# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003062if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003063 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064 case $enableval in
3065 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003066 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003067 # information
3068 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003069 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003070 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003071 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3072 if test ! -d "${enableval}"
3073 then
3074 enableval=/
3075 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077 ;;
3078 esac
3079 case $enableval in
3080 no)
3081 UNIVERSALSDK=
3082 enable_universalsdk=
3083 ;;
3084 *)
3085 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003086 if test ! -d "${UNIVERSALSDK}"
3087 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003088 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003089 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003090 ;;
3091 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003092
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003093
Thomas Wouters477c8d52006-05-27 19:21:47 +00003094else
3095
3096 UNIVERSALSDK=
3097 enable_universalsdk=
3098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003099fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003100
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003101if test -n "${UNIVERSALSDK}"
3102then
Matthias Kloseb9621712010-04-24 17:59:49 +00003103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3104$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003105else
Matthias Kloseb9621712010-04-24 17:59:49 +00003106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3107$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003108fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003111
Ned Deily87adb6e2013-10-18 21:09:56 -07003112ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003113
Ned Deilycbfb9a52012-06-23 16:02:19 -07003114# For backward compatibility reasons we prefer to select '32-bit' if available,
3115# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003116UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003117if test "`uname -s`" = "Darwin"
3118then
3119 if test -n "${UNIVERSALSDK}"
3120 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003121 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003122 then
3123 UNIVERSAL_ARCHS="intel"
3124 fi
3125 fi
3126fi
3127
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003128
Matthias Kloseb9621712010-04-24 17:59:49 +00003129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3130$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003131
3132# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003133if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003135 UNIVERSAL_ARCHS="$withval"
3136
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003137fi
3138
Ned Deily87adb6e2013-10-18 21:09:56 -07003139if test -n "${UNIVERSALSDK}"
3140then
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3142$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3143else
3144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3145$as_echo "no" >&6; }
3146fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003147
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003148
3149# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003150if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003151 withval=$with_framework_name;
3152 PYTHONFRAMEWORK=${withval}
3153 PYTHONFRAMEWORKDIR=${withval}.framework
3154 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3155
3156else
3157
3158 PYTHONFRAMEWORK=Python
3159 PYTHONFRAMEWORKDIR=Python.framework
3160 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3161
3162fi
3163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003165if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003166 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003167 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003168 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003169 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003170 esac
3171 case $enableval in
3172 no)
3173 PYTHONFRAMEWORK=
3174 PYTHONFRAMEWORKDIR=no-framework
3175 PYTHONFRAMEWORKPREFIX=
3176 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003177 FRAMEWORKINSTALLFIRST=
3178 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003179 FRAMEWORKALTINSTALLFIRST=
3180 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003181 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003182 if test "x${prefix}" = "xNONE"; then
3183 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3184 else
3185 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3186 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003187 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003188 ;;
3189 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003190 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003191 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003193 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003194 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3195 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003196 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003197 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003198
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003199 if test "x${prefix}" = "xNONE" ; then
3200 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003201
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003202 else
3203 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3204 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003205
3206 case "${enableval}" in
3207 /System*)
3208 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3209 if test "${prefix}" = "NONE" ; then
3210 # See below
3211 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3212 fi
3213 ;;
3214
3215 /Library*)
3216 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3217 ;;
3218
3219 */Library/Frameworks)
3220 MDIR="`dirname "${enableval}"`"
3221 MDIR="`dirname "${MDIR}"`"
3222 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3223
3224 if test "${prefix}" = "NONE"; then
3225 # User hasn't specified the
3226 # --prefix option, but wants to install
3227 # the framework in a non-default location,
3228 # ensure that the compatibility links get
3229 # installed relative to that prefix as well
3230 # instead of in /usr/local.
3231 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3232 fi
3233 ;;
3234
3235 *)
3236 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3237 ;;
3238 esac
3239
Jack Jansen127e56e2001-09-11 14:41:54 +00003240 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003241
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003242 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003246 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003247
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003248 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3249
3250 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3251
Jack Jansene578a632001-08-15 01:27:14 +00003252 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003253
Guido van Rossum563e7081996-09-10 18:20:48 +00003254else
Martin v. Löwis11437992002-04-12 09:54:03 +00003255
Jack Jansene578a632001-08-15 01:27:14 +00003256 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003257 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003258 PYTHONFRAMEWORKPREFIX=
3259 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003260 FRAMEWORKINSTALLFIRST=
3261 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003262 FRAMEWORKALTINSTALLFIRST=
3263 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003264 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003265 if test "x${prefix}" = "xNONE" ; then
3266 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3267 else
3268 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3269 fi
Jack Jansene578a632001-08-15 01:27:14 +00003270 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273fi
3274
Thomas Wouters477c8d52006-05-27 19:21:47 +00003275
3276
Michael W. Hudson54241132001-12-07 15:38:26 +00003277
3278
3279
3280
Jack Jansene578a632001-08-15 01:27:14 +00003281
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003282
3283
3284
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003285
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003286
Ned Deilyb8f944f2013-11-21 22:42:25 -08003287
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003288
3289cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003290#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003291_ACEOF
3292
3293
Jack Jansene578a632001-08-15 01:27:14 +00003294##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003295## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003296## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003297##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298# Set name for machine-dependent library files
3299
Matthias Kloseb9621712010-04-24 17:59:49 +00003300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3301$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003302if test -z "$MACHDEP"
3303then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 # avoid using uname for cross builds
3305 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003306 # ac_sys_system and ac_sys_release are used for setting
3307 # a lot of different things including 'define_xopen_source'
3308 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003309 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003310 *-*-linux-android*)
3311 ac_sys_system=Linux-android
3312 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003313 *-*-linux*)
3314 ac_sys_system=Linux
3315 ;;
3316 *-*-cygwin*)
3317 ac_sys_system=Cygwin
3318 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003319 *-*-vxworks*)
3320 ac_sys_system=VxWorks
3321 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003322 *)
3323 # for now, limit cross builds to known configurations
3324 MACHDEP="unknown"
3325 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3326 esac
3327 ac_sys_release=
3328 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003329 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003330 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003331 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003332 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003333 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003334 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003335 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003336 fi
3337 ac_md_system=`echo $ac_sys_system |
3338 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3339 ac_md_release=`echo $ac_sys_release |
3340 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3341 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003342
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003343 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003344 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003345 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003346 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003347 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003348 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003349 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003350fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3352$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003353
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003354
3355if test "$cross_compiling" = yes; then
3356 case "$host" in
3357 *-*-linux*)
3358 case "$host_cpu" in
3359 arm*)
3360 _host_cpu=arm
3361 ;;
3362 *)
3363 _host_cpu=$host_cpu
3364 esac
3365 ;;
3366 *-*-cygwin*)
3367 _host_cpu=
3368 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003369 *-*-vxworks*)
3370 _host_cpu=$host_cpu
3371 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003372 *)
3373 # for now, limit cross builds to known configurations
3374 MACHDEP="unknown"
3375 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3376 esac
3377 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3378fi
3379
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003380# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3381# disable features if it is defined, without any means to access these
3382# features as extensions. For these systems, we skip the definition of
3383# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3384# some feature, make sure there is no alternative way to access this
3385# feature. Also, when using wildcards, make sure you have verified the
3386# need for not defining _XOPEN_SOURCE on all systems matching the
3387# wildcard, and that the wildcard does not include future systems
3388# (which may remove their limitations).
3389case $ac_sys_system/$ac_sys_release in
3390 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3391 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003392 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003393 # In addition, Stefan Krah confirms that issue #1244610 exists through
3394 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003395 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003396 define_xopen_source=no
3397 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3398 # also defined. This can be overridden by defining _BSD_SOURCE
3399 # As this has a different meaning on Linux, only define it on OpenBSD
3400
Matthias Kloseb9621712010-04-24 17:59:49 +00003401$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003402
3403 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003404 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003405 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3406 # also defined. This can be overridden by defining _BSD_SOURCE
3407 # As this has a different meaning on Linux, only define it on OpenBSD
3408
Matthias Kloseb9621712010-04-24 17:59:49 +00003409$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003410
3411 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003412 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3413 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3414 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003415 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 +00003416 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003417 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3418 # request to enable features supported by the standard as a request
3419 # to disable features not supported by the standard. The best way
3420 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3421 # entirely and define __EXTENSIONS__ instead.
3422 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003423 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003424 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3425 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003426 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003427 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003428 define_xopen_source=no;;
3429 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003430 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003431 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003432 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003433 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3434 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3435 # identifies itself as Darwin/7.*
3436 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3437 # disables platform specific features beyond repair.
3438 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3439 # has no effect, don't bother defining them
3440 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003441 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003442 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003443 define_xopen_source=no;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003444 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3445 # defining NI_NUMERICHOST.
3446 QNX/6.3.2)
3447 define_xopen_source=no
3448 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003449 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3450 # in network headers still using system V types.
3451 VxWorks/*)
3452 define_xopen_source=no
3453 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003454
Ian Nortona9edf442020-02-14 03:09:11 +00003455 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3456 # chroot() and other functions
3457 hp*|HP*)
3458 define_xopen_source=no
3459 ;;
3460
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003461esac
3462
3463if test $define_xopen_source = yes
3464then
Victor Stinner14d098d2011-09-07 22:29:43 +02003465 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003466
Victor Stinner14d098d2011-09-07 22:29:43 +02003467$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003468
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003469
3470 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3471 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3472 # several APIs are not declared. Since this is also needed in some
3473 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003474
Matthias Kloseb9621712010-04-24 17:59:49 +00003475$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003476
3477
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003478
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003479$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003480
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003481fi
3482
Christian Heimes647cd872013-12-07 23:39:33 +01003483# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3484case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003485 hp*|HP*)
3486 define_stdc_a1=yes;;
3487 *)
3488 define_stdc_a1=no;;
3489esac
3490
3491if test $define_stdc_a1 = yes
3492then
Christian Heimes647cd872013-12-07 23:39:33 +01003493
3494$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3495
Christian Heimesb02bcae2013-12-08 15:21:08 +01003496fi
Christian Heimes647cd872013-12-07 23:39:33 +01003497
Jack Jansen6b08a402004-06-03 12:41:45 +00003498# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3499# it may influence the way we can build extensions, so distutils
3500# needs to check it
3501
Thomas Wouters477c8d52006-05-27 19:21:47 +00003502
Jack Jansen6b08a402004-06-03 12:41:45 +00003503CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003504EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003505
Guido van Rossum627b2d71993-12-24 10:39:16 +00003506# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003507
3508# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3509# for debug/optimization stuff. BASECFLAGS is for flags that are required
3510# just to get things to compile and link. Users are free to override OPT
3511# when running configure or make. The build should not break if they do.
3512# BASECFLAGS should generally not be messed with, however.
3513
Guido van Rossum8b131c51995-03-09 14:10:13 +00003514# If the user switches compilers, we can't believe the cache
3515if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3516then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003517 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003518(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003519fi
3520
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003521# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3522# when the compiler supports them, but we don't always want -O2, and
3523# we set -g later.
3524if test -z "$CFLAGS"; then
3525 CFLAGS=
3526fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003527
3528if test "$ac_sys_system" = "Darwin"
3529then
3530 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003531 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003532 # information
3533 if test -z "${CC}"
3534 then
3535 found_gcc=
3536 found_clang=
3537 as_save_IFS=$IFS; IFS=:
3538 for as_dir in $PATH
3539 do
3540 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003541 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003542 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003543 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003544 fi
3545 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003546 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003547 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003548 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003549 fi
3550 fi
3551 done
3552 IFS=$as_save_IFS
3553
3554 if test -n "$found_gcc" -a -n "$found_clang"
3555 then
3556 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3557 then
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3559$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3560 CC="$found_clang"
3561 CXX="$found_clang++"
3562 fi
3563
3564
3565 elif test -z "$found_gcc" -a -n "$found_clang"
3566 then
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3568$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3569 CC="$found_clang"
3570 CXX="$found_clang++"
3571
3572 elif test -z "$found_gcc" -a -z "$found_clang"
3573 then
3574 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3575 if test -n "${found_clang}"
3576 then
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3578$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3579 CC="${found_clang}"
3580 CXX="`/usr/bin/xcrun -find clang++`"
3581
3582 # else: use default behaviour
3583 fi
3584 fi
3585 fi
3586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003587ac_ext=c
3588ac_cpp='$CPP $CPPFLAGS'
3589ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3590ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3591ac_compiler_gnu=$ac_cv_c_compiler_gnu
3592if test -n "$ac_tool_prefix"; then
3593 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3594set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3596$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003597if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003599else
3600 if test -n "$CC"; then
3601 ac_cv_prog_CC="$CC" # Let the user override the test.
3602else
Martin v. Löwis11437992002-04-12 09:54:03 +00003603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3604for as_dir in $PATH
3605do
3606 IFS=$as_save_IFS
3607 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003609 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 $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 +00003612 break 2
3613 fi
3614done
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003616IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003617
Jack Jansendd19cf82001-12-06 22:36:17 +00003618fi
3619fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003620CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003621if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3623$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003624else
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3626$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003627fi
3628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629
Martin v. Löwis11437992002-04-12 09:54:03 +00003630fi
3631if test -z "$ac_cv_prog_CC"; then
3632 ac_ct_CC=$CC
3633 # Extract the first word of "gcc", so it can be a program name with args.
3634set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3636$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003637if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003639else
3640 if test -n "$ac_ct_CC"; then
3641 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3642else
3643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3644for as_dir in $PATH
3645do
3646 IFS=$as_save_IFS
3647 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003649 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003650 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 $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 +00003652 break 2
3653 fi
3654done
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003657
3658fi
3659fi
3660ac_ct_CC=$ac_cv_prog_ac_ct_CC
3661if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3663$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003664else
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3666$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003667fi
3668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 if test "x$ac_ct_CC" = x; then
3670 CC=""
3671 else
3672 case $cross_compiling:$ac_tool_warned in
3673yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003674{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3675$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676ac_tool_warned=yes ;;
3677esac
3678 CC=$ac_ct_CC
3679 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else
3681 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003682fi
3683
Jack Jansendd19cf82001-12-06 22:36:17 +00003684if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 if test -n "$ac_tool_prefix"; then
3686 # 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 +00003687set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3689$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003690if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003692else
3693 if test -n "$CC"; then
3694 ac_cv_prog_CC="$CC" # Let the user override the test.
3695else
Martin v. Löwis11437992002-04-12 09:54:03 +00003696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3697for as_dir in $PATH
3698do
3699 IFS=$as_save_IFS
3700 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003703 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 $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 +00003705 break 2
3706 fi
3707done
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003709IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003710
3711fi
3712fi
3713CC=$ac_cv_prog_CC
3714if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3716$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003717else
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3719$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003720fi
3721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003724fi
3725if test -z "$CC"; then
3726 # Extract the first word of "cc", so it can be a program name with args.
3727set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003730if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003732else
3733 if test -n "$CC"; then
3734 ac_cv_prog_CC="$CC" # Let the user override the test.
3735else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3738for as_dir in $PATH
3739do
3740 IFS=$as_save_IFS
3741 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3745 ac_prog_rejected=yes
3746 continue
3747 fi
3748 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 $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 +00003750 break 2
3751 fi
3752done
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003755
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756if test $ac_prog_rejected = yes; then
3757 # We found a bogon in the path, so make sure we never use it.
3758 set dummy $ac_cv_prog_CC
3759 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761 # We chose a different compiler from the bogus one.
3762 # However, it has the same basename, so the bogon will be chosen
3763 # first if we set CC to just the basename; use the full file name.
3764 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003765 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766 fi
3767fi
3768fi
3769fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003770CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003771if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3773$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774else
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3776$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777fi
3778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779
Martin v. Löwis11437992002-04-12 09:54:03 +00003780fi
3781if test -z "$CC"; then
3782 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003783 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003784 do
3785 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3786set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3788$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003789if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003791else
3792 if test -n "$CC"; then
3793 ac_cv_prog_CC="$CC" # Let the user override the test.
3794else
Martin v. Löwis11437992002-04-12 09:54:03 +00003795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3796for as_dir in $PATH
3797do
3798 IFS=$as_save_IFS
3799 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $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 +00003804 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003806done
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003809
3810fi
3811fi
3812CC=$ac_cv_prog_CC
3813if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3815$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003816else
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3818$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003819fi
3820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821
Martin v. Löwis11437992002-04-12 09:54:03 +00003822 test -n "$CC" && break
3823 done
3824fi
3825if test -z "$CC"; then
3826 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003828do
3829 # Extract the first word of "$ac_prog", so it can be a program name with args.
3830set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3832$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003833if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003835else
3836 if test -n "$ac_ct_CC"; then
3837 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3838else
3839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3840for as_dir in $PATH
3841do
3842 IFS=$as_save_IFS
3843 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003846 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 $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 +00003848 break 2
3849 fi
3850done
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003853
Martin v. Löwis11437992002-04-12 09:54:03 +00003854fi
3855fi
3856ac_ct_CC=$ac_cv_prog_ac_ct_CC
3857if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3859$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003860else
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3862$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003863fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 test -n "$ac_ct_CC" && break
3867done
Michael W. Hudson54241132001-12-07 15:38:26 +00003868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869 if test "x$ac_ct_CC" = x; then
3870 CC=""
3871 else
3872 case $cross_compiling:$ac_tool_warned in
3873yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003874{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3875$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876ac_tool_warned=yes ;;
3877esac
3878 CC=$ac_ct_CC
3879 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003880fi
3881
3882fi
3883
3884
Matthias Kloseb9621712010-04-24 17:59:49 +00003885test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003887as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003888See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003889
3890# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003891$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3892set X $ac_compile
3893ac_compiler=$2
3894for ac_option in --version -v -V -qversion; do
3895 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896case "(($ac_try" in
3897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3898 *) ac_try_echo=$ac_try;;
3899esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003900eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3901$as_echo "$ac_try_echo"; } >&5
3902 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003903 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003904 if test -s conftest.err; then
3905 sed '10a\
3906... rest of stderr output deleted ...
3907 10q' conftest.err >conftest.er1
3908 cat conftest.er1 >&5
3909 fi
3910 rm -f conftest.er1 conftest.err
3911 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3912 test $ac_status = 0; }
3913done
Martin v. Löwis11437992002-04-12 09:54:03 +00003914
Matthias Kloseb9621712010-04-24 17:59:49 +00003915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003916/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003917
Martin v. Löwis11437992002-04-12 09:54:03 +00003918int
3919main ()
3920{
3921
3922 ;
3923 return 0;
3924}
3925_ACEOF
3926ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003927ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003928# Try to create an executable without -o first, disregard a.out.
3929# It will help us diagnose broken compilers, and finding out an intuition
3930# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3932$as_echo_n "checking whether the C compiler works... " >&6; }
3933ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3934
3935# The possible output files:
3936ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938ac_rmfiles=
3939for ac_file in $ac_files
3940do
3941 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3944 esac
3945done
3946rm -f $ac_rmfiles
3947
Matthias Kloseb9621712010-04-24 17:59:49 +00003948if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949case "(($ac_try" in
3950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3951 *) ac_try_echo=$ac_try;;
3952esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3954$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003956 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3958 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3960# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3961# in a Makefile. We should not override ac_cv_exeext if it was cached,
3962# so that the user can short-circuit this test for compilers unknown to
3963# Autoconf.
3964for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003965do
3966 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003969 ;;
3970 [ab].out )
3971 # We found the default executable, but exeext='' is most
3972 # certainly right.
3973 break;;
3974 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003975 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976 then :; else
3977 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3978 fi
3979 # We set ac_cv_exeext here because the later test for it is not
3980 # safe: cross compilers may not add the suffix if given an `-o'
3981 # argument, so we may need to know it at that point already.
3982 # Even if this section looks crufty: it has the advantage of
3983 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003984 break;;
3985 * )
3986 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003987 esac
3988done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989test "$ac_cv_exeext" = no && ac_cv_exeext=
3990
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003991else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 ac_file=''
3993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003994if test -z "$ac_file"; then :
3995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3996$as_echo "no" >&6; }
3997$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003998sed 's/^/| /' conftest.$ac_ext >&5
3999
Matthias Kloseb9621712010-04-24 17:59:49 +00004000{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4001$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004002as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004003See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004004else
4005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4006$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4009$as_echo_n "checking for C compiler default output file name... " >&6; }
4010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4011$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004013
Matthias Kloseb9621712010-04-24 17:59:49 +00004014rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4017$as_echo_n "checking for suffix of executables... " >&6; }
4018if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019case "(($ac_try" in
4020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4021 *) ac_try_echo=$ac_try;;
4022esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004023eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4024$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004025 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004026 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4028 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4030# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4031# work properly (i.e., refer to `conftest.exe'), while it won't with
4032# `rm'.
4033for ac_file in conftest.exe conftest conftest.*; do
4034 test -f "$ac_file" || continue
4035 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004036 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4038 break;;
4039 * ) break;;
4040 esac
4041done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004042else
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004045as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004046See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004048rm -f conftest conftest$ac_cv_exeext
4049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4050$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004051
4052rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004053EXEEXT=$ac_cv_exeext
4054ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4056/* end confdefs.h. */
4057#include <stdio.h>
4058int
4059main ()
4060{
4061FILE *f = fopen ("conftest.out", "w");
4062 return ferror (f) || fclose (f) != 0;
4063
4064 ;
4065 return 0;
4066}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004068ac_clean_files="$ac_clean_files conftest.out"
4069# Check that the compiler produces executables we can run. If not, either
4070# the compiler is broken, or we cross compile.
4071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4072$as_echo_n "checking whether we are cross compiling... " >&6; }
4073if test "$cross_compiling" != yes; then
4074 { { ac_try="$ac_link"
4075case "(($ac_try" in
4076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4077 *) ac_try_echo=$ac_try;;
4078esac
4079eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4080$as_echo "$ac_try_echo"; } >&5
4081 (eval "$ac_link") 2>&5
4082 ac_status=$?
4083 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4084 test $ac_status = 0; }
4085 if { ac_try='./conftest$ac_cv_exeext'
4086 { { case "(($ac_try" in
4087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4088 *) ac_try_echo=$ac_try;;
4089esac
4090eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4091$as_echo "$ac_try_echo"; } >&5
4092 (eval "$ac_try") 2>&5
4093 ac_status=$?
4094 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4095 test $ac_status = 0; }; }; then
4096 cross_compiling=no
4097 else
4098 if test "$cross_compiling" = maybe; then
4099 cross_compiling=yes
4100 else
4101 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4102$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004103as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004104If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004105See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004106 fi
4107 fi
4108fi
4109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4110$as_echo "$cross_compiling" >&6; }
4111
4112rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4113ac_clean_files=$ac_clean_files_save
4114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4115$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004116if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004117 $as_echo_n "(cached) " >&6
4118else
4119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004120/* end confdefs.h. */
4121
4122int
4123main ()
4124{
4125
4126 ;
4127 return 0;
4128}
4129_ACEOF
4130rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004131if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004132case "(($ac_try" in
4133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4134 *) ac_try_echo=$ac_try;;
4135esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004136eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4137$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004138 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4141 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142 for ac_file in conftest.o conftest.obj conftest.*; do
4143 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004146 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4147 break;;
4148 esac
4149done
4150else
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004152sed 's/^/| /' conftest.$ac_ext >&5
4153
Matthias Kloseb9621712010-04-24 17:59:49 +00004154{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4155$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004156as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004157See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004158fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004159rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4162$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004163OBJEXT=$ac_cv_objext
4164ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4166$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004167if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004169else
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
Martin v. Löwis11437992002-04-12 09:54:03 +00004173int
4174main ()
4175{
4176#ifndef __GNUC__
4177 choke me
4178#endif
4179
4180 ;
4181 return 0;
4182}
4183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004184if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004185 ac_compiler_gnu=yes
4186else
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004190ac_cv_c_compiler_gnu=$ac_compiler_gnu
4191
4192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4194$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4195if test $ac_compiler_gnu = yes; then
4196 GCC=yes
4197else
4198 GCC=
4199fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004200ac_test_CFLAGS=${CFLAGS+set}
4201ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4203$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004204if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004205 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004206else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207 ac_save_c_werror_flag=$ac_c_werror_flag
4208 ac_c_werror_flag=yes
4209 ac_cv_prog_cc_g=no
4210 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004213
Martin v. Löwis11437992002-04-12 09:54:03 +00004214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004222if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004223 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224else
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 CFLAGS=""
4226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227/* end confdefs.h. */
4228
4229int
4230main ()
4231{
4232
4233 ;
4234 return 0;
4235}
4236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004237if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238
Matthias Kloseb9621712010-04-24 17:59:49 +00004239else
4240 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243/* end confdefs.h. */
4244
4245int
4246main ()
4247{
4248
4249 ;
4250 return 0;
4251}
4252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004253if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4261 ac_c_werror_flag=$ac_save_c_werror_flag
4262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4264$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004265if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004267elif test $ac_cv_prog_cc_g = yes; then
4268 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004269 CFLAGS="-g -O2"
4270 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004271 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004272 fi
4273else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004274 if test "$GCC" = yes; then
4275 CFLAGS="-O2"
4276 else
4277 CFLAGS=
4278 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4281$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004282if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004283 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004284else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004285 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004286ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004288/* end confdefs.h. */
4289#include <stdarg.h>
4290#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004291struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004292/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4293struct buf { int x; };
4294FILE * (*rcsopen) (struct buf *, struct stat *, int);
4295static char *e (p, i)
4296 char **p;
4297 int i;
4298{
4299 return p[i];
4300}
4301static char *f (char * (*g) (char **, int), char **p, ...)
4302{
4303 char *s;
4304 va_list v;
4305 va_start (v,p);
4306 s = g (p, va_arg (v,int));
4307 va_end (v);
4308 return s;
4309}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004310
4311/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4312 function prototypes and stuff, but not '\xHH' hex character constants.
4313 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004315 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4316 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004318int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4319
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4321 inside strings and character constants. */
4322#define FOO(x) 'x'
4323int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4324
Skip Montanaro6dead952003-09-25 14:50:04 +00004325int test (int i, double x);
4326struct s1 {int (*f) (int a);};
4327struct s2 {int (*f) (double a);};
4328int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4329int argc;
4330char **argv;
4331int
4332main ()
4333{
4334return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4335 ;
4336 return 0;
4337}
4338_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4340 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004341do
4342 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346rm -f core conftest.err conftest.$ac_objext
4347 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004348done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004350CC=$ac_save_CC
4351
4352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353# AC_CACHE_VAL
4354case "x$ac_cv_prog_cc_c89" in
4355 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4357$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4360$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004361 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4364$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004365esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004366if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004367
Matthias Kloseb9621712010-04-24 17:59:49 +00004368fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004369
Martin v. Löwis11437992002-04-12 09:54:03 +00004370ac_ext=c
4371ac_cpp='$CPP $CPPFLAGS'
4372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4374ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004375
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004376ac_ext=c
4377ac_cpp='$CPP $CPPFLAGS'
4378ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4379ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4380ac_compiler_gnu=$ac_cv_c_compiler_gnu
4381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4382$as_echo_n "checking how to run the C preprocessor... " >&6; }
4383# On Suns, sometimes $CPP names a directory.
4384if test -n "$CPP" && test -d "$CPP"; then
4385 CPP=
4386fi
4387if test -z "$CPP"; then
4388 if ${ac_cv_prog_CPP+:} false; then :
4389 $as_echo_n "(cached) " >&6
4390else
4391 # Double quotes because CPP needs to be expanded
4392 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4393 do
4394 ac_preproc_ok=false
4395for ac_c_preproc_warn_flag in '' yes
4396do
4397 # Use a header file that comes with gcc, so configuring glibc
4398 # with a fresh cross-compiler works.
4399 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4400 # <limits.h> exists even on freestanding compilers.
4401 # On the NeXT, cc -E runs the code through the compiler's parser,
4402 # not just through cpp. "Syntax error" is here to catch this case.
4403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4404/* end confdefs.h. */
4405#ifdef __STDC__
4406# include <limits.h>
4407#else
4408# include <assert.h>
4409#endif
4410 Syntax error
4411_ACEOF
4412if ac_fn_c_try_cpp "$LINENO"; then :
4413
4414else
4415 # Broken: fails on valid input.
4416continue
4417fi
4418rm -f conftest.err conftest.i conftest.$ac_ext
4419
4420 # OK, works on sane cases. Now check whether nonexistent headers
4421 # can be detected and how.
4422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4423/* end confdefs.h. */
4424#include <ac_nonexistent.h>
4425_ACEOF
4426if ac_fn_c_try_cpp "$LINENO"; then :
4427 # Broken: success on invalid input.
4428continue
4429else
4430 # Passes both tests.
4431ac_preproc_ok=:
4432break
4433fi
4434rm -f conftest.err conftest.i conftest.$ac_ext
4435
4436done
4437# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4438rm -f conftest.i conftest.err conftest.$ac_ext
4439if $ac_preproc_ok; then :
4440 break
4441fi
4442
4443 done
4444 ac_cv_prog_CPP=$CPP
4445
4446fi
4447 CPP=$ac_cv_prog_CPP
4448else
4449 ac_cv_prog_CPP=$CPP
4450fi
4451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4452$as_echo "$CPP" >&6; }
4453ac_preproc_ok=false
4454for ac_c_preproc_warn_flag in '' yes
4455do
4456 # Use a header file that comes with gcc, so configuring glibc
4457 # with a fresh cross-compiler works.
4458 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4459 # <limits.h> exists even on freestanding compilers.
4460 # On the NeXT, cc -E runs the code through the compiler's parser,
4461 # not just through cpp. "Syntax error" is here to catch this case.
4462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4463/* end confdefs.h. */
4464#ifdef __STDC__
4465# include <limits.h>
4466#else
4467# include <assert.h>
4468#endif
4469 Syntax error
4470_ACEOF
4471if ac_fn_c_try_cpp "$LINENO"; then :
4472
4473else
4474 # Broken: fails on valid input.
4475continue
4476fi
4477rm -f conftest.err conftest.i conftest.$ac_ext
4478
4479 # OK, works on sane cases. Now check whether nonexistent headers
4480 # can be detected and how.
4481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4482/* end confdefs.h. */
4483#include <ac_nonexistent.h>
4484_ACEOF
4485if ac_fn_c_try_cpp "$LINENO"; then :
4486 # Broken: success on invalid input.
4487continue
4488else
4489 # Passes both tests.
4490ac_preproc_ok=:
4491break
4492fi
4493rm -f conftest.err conftest.i conftest.$ac_ext
4494
4495done
4496# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4497rm -f conftest.i conftest.err conftest.$ac_ext
4498if $ac_preproc_ok; then :
4499
4500else
4501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4502$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4503as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4504See \`config.log' for more details" "$LINENO" 5; }
4505fi
4506
4507ac_ext=c
4508ac_cpp='$CPP $CPPFLAGS'
4509ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4510ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4511ac_compiler_gnu=$ac_cv_c_compiler_gnu
4512
4513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4514$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4515if ${ac_cv_path_GREP+:} false; then :
4516 $as_echo_n "(cached) " >&6
4517else
4518 if test -z "$GREP"; then
4519 ac_path_GREP_found=false
4520 # Loop through the user's path and test for each of PROGNAME-LIST
4521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4522for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4523do
4524 IFS=$as_save_IFS
4525 test -z "$as_dir" && as_dir=.
4526 for ac_prog in grep ggrep; do
4527 for ac_exec_ext in '' $ac_executable_extensions; do
4528 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4529 as_fn_executable_p "$ac_path_GREP" || continue
4530# Check for GNU ac_path_GREP and select it if it is found.
4531 # Check for GNU $ac_path_GREP
4532case `"$ac_path_GREP" --version 2>&1` in
4533*GNU*)
4534 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4535*)
4536 ac_count=0
4537 $as_echo_n 0123456789 >"conftest.in"
4538 while :
4539 do
4540 cat "conftest.in" "conftest.in" >"conftest.tmp"
4541 mv "conftest.tmp" "conftest.in"
4542 cp "conftest.in" "conftest.nl"
4543 $as_echo 'GREP' >> "conftest.nl"
4544 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4545 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4546 as_fn_arith $ac_count + 1 && ac_count=$as_val
4547 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4548 # Best one so far, save it but keep looking for a better one
4549 ac_cv_path_GREP="$ac_path_GREP"
4550 ac_path_GREP_max=$ac_count
4551 fi
4552 # 10*(2^10) chars as input seems more than enough
4553 test $ac_count -gt 10 && break
4554 done
4555 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4556esac
4557
4558 $ac_path_GREP_found && break 3
4559 done
4560 done
4561 done
4562IFS=$as_save_IFS
4563 if test -z "$ac_cv_path_GREP"; then
4564 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4565 fi
4566else
4567 ac_cv_path_GREP=$GREP
4568fi
4569
4570fi
4571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4572$as_echo "$ac_cv_path_GREP" >&6; }
4573 GREP="$ac_cv_path_GREP"
4574
4575
Łukasz Langaa785c872016-09-09 17:37:37 -07004576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4577$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4578if ${ac_cv_path_SED+:} false; then :
4579 $as_echo_n "(cached) " >&6
4580else
4581 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4582 for ac_i in 1 2 3 4 5 6 7; do
4583 ac_script="$ac_script$as_nl$ac_script"
4584 done
4585 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4586 { ac_script=; unset ac_script;}
4587 if test -z "$SED"; then
4588 ac_path_SED_found=false
4589 # Loop through the user's path and test for each of PROGNAME-LIST
4590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4591for as_dir in $PATH
4592do
4593 IFS=$as_save_IFS
4594 test -z "$as_dir" && as_dir=.
4595 for ac_prog in sed gsed; do
4596 for ac_exec_ext in '' $ac_executable_extensions; do
4597 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4598 as_fn_executable_p "$ac_path_SED" || continue
4599# Check for GNU ac_path_SED and select it if it is found.
4600 # Check for GNU $ac_path_SED
4601case `"$ac_path_SED" --version 2>&1` in
4602*GNU*)
4603 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4604*)
4605 ac_count=0
4606 $as_echo_n 0123456789 >"conftest.in"
4607 while :
4608 do
4609 cat "conftest.in" "conftest.in" >"conftest.tmp"
4610 mv "conftest.tmp" "conftest.in"
4611 cp "conftest.in" "conftest.nl"
4612 $as_echo '' >> "conftest.nl"
4613 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4614 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4615 as_fn_arith $ac_count + 1 && ac_count=$as_val
4616 if test $ac_count -gt ${ac_path_SED_max-0}; then
4617 # Best one so far, save it but keep looking for a better one
4618 ac_cv_path_SED="$ac_path_SED"
4619 ac_path_SED_max=$ac_count
4620 fi
4621 # 10*(2^10) chars as input seems more than enough
4622 test $ac_count -gt 10 && break
4623 done
4624 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4625esac
4626
4627 $ac_path_SED_found && break 3
4628 done
4629 done
4630 done
4631IFS=$as_save_IFS
4632 if test -z "$ac_cv_path_SED"; then
4633 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4634 fi
4635else
4636 ac_cv_path_SED=$SED
4637fi
4638
4639fi
4640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4641$as_echo "$ac_cv_path_SED" >&6; }
4642 SED="$ac_cv_path_SED"
4643 rm -f conftest.sed
4644
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004645
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004646
4647
Matthias Kloseb9621712010-04-24 17:59:49 +00004648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4649$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004651# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004652if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004653 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004654
4655 case $withval in
4656 no) with_cxx_main=no
4657 MAINCC='$(CC)';;
4658 yes) with_cxx_main=yes
4659 MAINCC='$(CXX)';;
4660 *) with_cxx_main=yes
4661 MAINCC=$withval
4662 if test -z "$CXX"
4663 then
4664 CXX=$withval
4665 fi;;
4666 esac
4667else
4668
4669 with_cxx_main=no
4670 MAINCC='$(CC)'
4671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004672fi
4673
Matthias Kloseb9621712010-04-24 17:59:49 +00004674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4675$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004676
4677preset_cxx="$CXX"
4678if test -z "$CXX"
4679then
4680 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004681 gcc) if test -n "$ac_tool_prefix"; then
4682 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4683set dummy ${ac_tool_prefix}g++; ac_word=$2
4684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685$as_echo_n "checking for $ac_word... " >&6; }
4686if ${ac_cv_path_CXX+:} false; then :
4687 $as_echo_n "(cached) " >&6
4688else
4689 case $CXX in
4690 [\\/]* | ?:[\\/]*)
4691 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4692 ;;
4693 *)
4694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695for as_dir in notfound
4696do
4697 IFS=$as_save_IFS
4698 test -z "$as_dir" && as_dir=.
4699 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004701 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4703 break 2
4704 fi
4705done
4706 done
4707IFS=$as_save_IFS
4708
4709 ;;
4710esac
4711fi
4712CXX=$ac_cv_path_CXX
4713if test -n "$CXX"; then
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4715$as_echo "$CXX" >&6; }
4716else
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4718$as_echo "no" >&6; }
4719fi
4720
4721
4722fi
4723if test -z "$ac_cv_path_CXX"; then
4724 ac_pt_CXX=$CXX
4725 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4728$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004729if ${ac_cv_path_ac_pt_CXX+:} false; then :
4730 $as_echo_n "(cached) " >&6
4731else
4732 case $ac_pt_CXX in
4733 [\\/]* | ?:[\\/]*)
4734 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4735 ;;
4736 *)
4737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4738for as_dir in notfound
4739do
4740 IFS=$as_save_IFS
4741 test -z "$as_dir" && as_dir=.
4742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004744 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4746 break 2
4747 fi
4748done
4749 done
4750IFS=$as_save_IFS
4751
4752 ;;
4753esac
4754fi
4755ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4756if test -n "$ac_pt_CXX"; then
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4758$as_echo "$ac_pt_CXX" >&6; }
4759else
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
4762fi
4763
4764 if test "x$ac_pt_CXX" = x; then
4765 CXX="g++"
4766 else
4767 case $cross_compiling:$ac_tool_warned in
4768yes:)
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4770$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4771ac_tool_warned=yes ;;
4772esac
4773 CXX=$ac_pt_CXX
4774 fi
4775else
4776 CXX="$ac_cv_path_CXX"
4777fi
4778 ;;
4779 cc) if test -n "$ac_tool_prefix"; then
4780 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4781set dummy ${ac_tool_prefix}c++; ac_word=$2
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4783$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004784if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786else
4787 case $CXX in
4788 [\\/]* | ?:[\\/]*)
4789 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4790 ;;
4791 *)
4792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4793for as_dir in notfound
4794do
4795 IFS=$as_save_IFS
4796 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801 break 2
4802 fi
4803done
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004805IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807 ;;
4808esac
4809fi
4810CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004811if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4813$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004814else
Matthias Kloseb9621712010-04-24 17:59:49 +00004815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4816$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004818
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004819
4820fi
4821if test -z "$ac_cv_path_CXX"; then
4822 ac_pt_CXX=$CXX
4823 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004827if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004828 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004830 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832 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 +00004833 ;;
4834 *)
4835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4836for as_dir in notfound
4837do
4838 IFS=$as_save_IFS
4839 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004840 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004842 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844 break 2
4845 fi
4846done
Matthias Kloseb9621712010-04-24 17:59:49 +00004847 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004848IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004850 ;;
4851esac
4852fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004853ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4854if test -n "$ac_pt_CXX"; then
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4856$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004857else
Matthias Kloseb9621712010-04-24 17:59:49 +00004858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004861
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004862 if test "x$ac_pt_CXX" = x; then
4863 CXX="c++"
4864 else
4865 case $cross_compiling:$ac_tool_warned in
4866yes:)
4867{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4868$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4869ac_tool_warned=yes ;;
4870esac
4871 CXX=$ac_pt_CXX
4872 fi
4873else
4874 CXX="$ac_cv_path_CXX"
4875fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004876 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004877 clang|*/clang) if test -n "$ac_tool_prefix"; then
4878 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4879set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4881$as_echo_n "checking for $ac_word... " >&6; }
4882if ${ac_cv_path_CXX+:} false; then :
4883 $as_echo_n "(cached) " >&6
4884else
4885 case $CXX in
4886 [\\/]* | ?:[\\/]*)
4887 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4888 ;;
4889 *)
4890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4891for as_dir in notfound
4892do
4893 IFS=$as_save_IFS
4894 test -z "$as_dir" && as_dir=.
4895 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004897 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4899 break 2
4900 fi
4901done
4902 done
4903IFS=$as_save_IFS
4904
Ned Deilycbfb9a52012-06-23 16:02:19 -07004905 ;;
4906esac
4907fi
4908CXX=$ac_cv_path_CXX
4909if test -n "$CXX"; then
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4911$as_echo "$CXX" >&6; }
4912else
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4914$as_echo "no" >&6; }
4915fi
4916
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004917
4918fi
4919if test -z "$ac_cv_path_CXX"; then
4920 ac_pt_CXX=$CXX
4921 # Extract the first word of "clang++", so it can be a program name with args.
4922set dummy clang++; ac_word=$2
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4924$as_echo_n "checking for $ac_word... " >&6; }
4925if ${ac_cv_path_ac_pt_CXX+:} false; then :
4926 $as_echo_n "(cached) " >&6
4927else
4928 case $ac_pt_CXX in
4929 [\\/]* | ?:[\\/]*)
4930 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4931 ;;
4932 *)
4933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4934for as_dir in notfound
4935do
4936 IFS=$as_save_IFS
4937 test -z "$as_dir" && as_dir=.
4938 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004940 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4942 break 2
4943 fi
4944done
4945 done
4946IFS=$as_save_IFS
4947
4948 ;;
4949esac
4950fi
4951ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4952if test -n "$ac_pt_CXX"; then
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4954$as_echo "$ac_pt_CXX" >&6; }
4955else
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4957$as_echo "no" >&6; }
4958fi
4959
4960 if test "x$ac_pt_CXX" = x; then
4961 CXX="clang++"
4962 else
4963 case $cross_compiling:$ac_tool_warned in
4964yes:)
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4966$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4967ac_tool_warned=yes ;;
4968esac
4969 CXX=$ac_pt_CXX
4970 fi
4971else
4972 CXX="$ac_cv_path_CXX"
4973fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004974 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004975 icc|*/icc) if test -n "$ac_tool_prefix"; then
4976 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4977set dummy ${ac_tool_prefix}icpc; ac_word=$2
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979$as_echo_n "checking for $ac_word... " >&6; }
4980if ${ac_cv_path_CXX+:} false; then :
4981 $as_echo_n "(cached) " >&6
4982else
4983 case $CXX in
4984 [\\/]* | ?:[\\/]*)
4985 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4986 ;;
4987 *)
4988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989for as_dir in notfound
4990do
4991 IFS=$as_save_IFS
4992 test -z "$as_dir" && as_dir=.
4993 for ac_exec_ext in '' $ac_executable_extensions; do
4994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997 break 2
4998 fi
4999done
5000 done
5001IFS=$as_save_IFS
5002
5003 ;;
5004esac
5005fi
5006CXX=$ac_cv_path_CXX
5007if test -n "$CXX"; then
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5009$as_echo "$CXX" >&6; }
5010else
5011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012$as_echo "no" >&6; }
5013fi
5014
5015
5016fi
5017if test -z "$ac_cv_path_CXX"; then
5018 ac_pt_CXX=$CXX
5019 # Extract the first word of "icpc", so it can be a program name with args.
5020set dummy icpc; ac_word=$2
5021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5022$as_echo_n "checking for $ac_word... " >&6; }
5023if ${ac_cv_path_ac_pt_CXX+:} false; then :
5024 $as_echo_n "(cached) " >&6
5025else
5026 case $ac_pt_CXX in
5027 [\\/]* | ?:[\\/]*)
5028 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5029 ;;
5030 *)
5031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5032for as_dir in notfound
5033do
5034 IFS=$as_save_IFS
5035 test -z "$as_dir" && as_dir=.
5036 for ac_exec_ext in '' $ac_executable_extensions; do
5037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5038 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5040 break 2
5041 fi
5042done
5043 done
5044IFS=$as_save_IFS
5045
5046 ;;
5047esac
5048fi
5049ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5050if test -n "$ac_pt_CXX"; then
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5052$as_echo "$ac_pt_CXX" >&6; }
5053else
5054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5055$as_echo "no" >&6; }
5056fi
5057
5058 if test "x$ac_pt_CXX" = x; then
5059 CXX="icpc"
5060 else
5061 case $cross_compiling:$ac_tool_warned in
5062yes:)
5063{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5064$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5065ac_tool_warned=yes ;;
5066esac
5067 CXX=$ac_pt_CXX
5068 fi
5069else
5070 CXX="$ac_cv_path_CXX"
5071fi
5072 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005073 esac
5074 if test "$CXX" = "notfound"
5075 then
5076 CXX=""
5077 fi
5078fi
5079if test -z "$CXX"
5080then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005081 if test -n "$ac_tool_prefix"; then
5082 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5083 do
5084 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5085set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5087$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005088if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090else
5091 if test -n "$CXX"; then
5092 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5093else
5094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095for as_dir in $PATH
5096do
5097 IFS=$as_save_IFS
5098 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005101 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005103 break 2
5104 fi
5105done
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005107IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108
5109fi
5110fi
5111CXX=$ac_cv_prog_CXX
5112if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5114$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005115else
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005118fi
5119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005121 test -n "$CXX" && break
5122 done
5123fi
5124if test -z "$CXX"; then
5125 ac_ct_CXX=$CXX
5126 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5127do
5128 # Extract the first word of "$ac_prog", so it can be a program name with args.
5129set dummy $ac_prog; ac_word=$2
5130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5131$as_echo_n "checking for $ac_word... " >&6; }
5132if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5133 $as_echo_n "(cached) " >&6
5134else
5135 if test -n "$ac_ct_CXX"; then
5136 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5137else
5138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5139for as_dir in $PATH
5140do
5141 IFS=$as_save_IFS
5142 test -z "$as_dir" && as_dir=.
5143 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005144 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005145 ac_cv_prog_ac_ct_CXX="$ac_prog"
5146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5147 break 2
5148 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005149done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005150 done
5151IFS=$as_save_IFS
5152
5153fi
5154fi
5155ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5156if test -n "$ac_ct_CXX"; then
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5158$as_echo "$ac_ct_CXX" >&6; }
5159else
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165 test -n "$ac_ct_CXX" && break
5166done
5167
5168 if test "x$ac_ct_CXX" = x; then
5169 CXX="notfound"
5170 else
5171 case $cross_compiling:$ac_tool_warned in
5172yes:)
5173{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5174$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5175ac_tool_warned=yes ;;
5176esac
5177 CXX=$ac_ct_CXX
5178 fi
5179fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005180
5181 if test "$CXX" = "notfound"
5182 then
5183 CXX=""
5184 fi
5185fi
5186if test "$preset_cxx" != "$CXX"
5187then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005188 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005189
5190 By default, distutils will build C++ extension modules with \"$CXX\".
5191 If this is not intended, then set CXX on the configure command line.
5192 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005193$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005194
5195 By default, distutils will build C++ extension modules with \"$CXX\".
5196 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005197 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005198fi
5199
5200
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005201MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5202
5203
5204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5205$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5206cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005207#undef bfin
5208#undef cris
5209#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005210#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005211#undef hppa
5212#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005213#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005214#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005215#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005216#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005217#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005218#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005219 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005220#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005221# if defined(__x86_64__) && defined(__LP64__)
5222 x86_64-linux-gnu
5223# elif defined(__x86_64__) && defined(__ILP32__)
5224 x86_64-linux-gnux32
5225# elif defined(__i386__)
5226 i386-linux-gnu
5227# elif defined(__aarch64__) && defined(__AARCH64EL__)
5228# if defined(__ILP32__)
5229 aarch64_ilp32-linux-gnu
5230# else
5231 aarch64-linux-gnu
5232# endif
5233# elif defined(__aarch64__) && defined(__AARCH64EB__)
5234# if defined(__ILP32__)
5235 aarch64_be_ilp32-linux-gnu
5236# else
5237 aarch64_be-linux-gnu
5238# endif
5239# elif defined(__alpha__)
5240 alpha-linux-gnu
5241# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5242# if defined(__ARMEL__)
5243 arm-linux-gnueabihf
5244# else
5245 armeb-linux-gnueabihf
5246# endif
5247# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5248# if defined(__ARMEL__)
5249 arm-linux-gnueabi
5250# else
5251 armeb-linux-gnueabi
5252# endif
5253# elif defined(__hppa__)
5254 hppa-linux-gnu
5255# elif defined(__ia64__)
5256 ia64-linux-gnu
5257# elif defined(__m68k__) && !defined(__mcoldfire__)
5258 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005259# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5260# if _MIPS_SIM == _ABIO32
5261 mipsisa32r6el-linux-gnu
5262# elif _MIPS_SIM == _ABIN32
5263 mipsisa64r6el-linux-gnuabin32
5264# elif _MIPS_SIM == _ABI64
5265 mipsisa64r6el-linux-gnuabi64
5266# else
5267# error unknown platform triplet
5268# endif
5269# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5270# if _MIPS_SIM == _ABIO32
5271 mipsisa32r6-linux-gnu
5272# elif _MIPS_SIM == _ABIN32
5273 mipsisa64r6-linux-gnuabin32
5274# elif _MIPS_SIM == _ABI64
5275 mipsisa64r6-linux-gnuabi64
5276# else
5277# error unknown platform triplet
5278# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005279# elif defined(__mips_hard_float) && defined(_MIPSEL)
5280# if _MIPS_SIM == _ABIO32
5281 mipsel-linux-gnu
5282# elif _MIPS_SIM == _ABIN32
5283 mips64el-linux-gnuabin32
5284# elif _MIPS_SIM == _ABI64
5285 mips64el-linux-gnuabi64
5286# else
5287# error unknown platform triplet
5288# endif
5289# elif defined(__mips_hard_float)
5290# if _MIPS_SIM == _ABIO32
5291 mips-linux-gnu
5292# elif _MIPS_SIM == _ABIN32
5293 mips64-linux-gnuabin32
5294# elif _MIPS_SIM == _ABI64
5295 mips64-linux-gnuabi64
5296# else
5297# error unknown platform triplet
5298# endif
5299# elif defined(__or1k__)
5300 or1k-linux-gnu
5301# elif defined(__powerpc__) && defined(__SPE__)
5302 powerpc-linux-gnuspe
5303# elif defined(__powerpc64__)
5304# if defined(__LITTLE_ENDIAN__)
5305 powerpc64le-linux-gnu
5306# else
5307 powerpc64-linux-gnu
5308# endif
5309# elif defined(__powerpc__)
5310 powerpc-linux-gnu
5311# elif defined(__s390x__)
5312 s390x-linux-gnu
5313# elif defined(__s390__)
5314 s390-linux-gnu
5315# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5316 sh4-linux-gnu
5317# elif defined(__sparc__) && defined(__arch64__)
5318 sparc64-linux-gnu
5319# elif defined(__sparc__)
5320 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005321# elif defined(__riscv)
5322# if __riscv_xlen == 32
5323 riscv32-linux-gnu
5324# elif __riscv_xlen == 64
5325 riscv64-linux-gnu
5326# else
5327# error unknown platform triplet
5328# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005329# else
5330# error unknown platform triplet
5331# endif
5332#elif defined(__FreeBSD_kernel__)
5333# if defined(__LP64__)
5334 x86_64-kfreebsd-gnu
5335# elif defined(__i386__)
5336 i386-kfreebsd-gnu
5337# else
5338# error unknown platform triplet
5339# endif
5340#elif defined(__gnu_hurd__)
5341 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005342#elif defined(__APPLE__)
5343 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005344#elif defined(__VXWORKS__)
5345 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005346#else
5347# error unknown platform triplet
5348#endif
5349
5350EOF
5351
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005352if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005353 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5355$as_echo "$PLATFORM_TRIPLET" >&6; }
5356else
5357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5358$as_echo "none" >&6; }
5359fi
5360rm -f conftest.c conftest.out
5361
5362if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5363 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5364 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5365 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005366elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5367 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005368fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005369
doko@ubuntu.com55532312016-06-14 08:55:19 +02005370if test x$MULTIARCH != x; then
5371 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5372fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005373
5374
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5376$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5377save_LDFLAGS="$LDFLAGS"
5378LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005379
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5381/* end confdefs.h. */
5382
5383int
5384main ()
5385{
5386
5387 ;
5388 return 0;
5389}
5390_ACEOF
5391if ac_fn_c_try_link "$LINENO"; then :
5392 NO_AS_NEEDED="-Wl,--no-as-needed"
5393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5394$as_echo "yes" >&6; }
5395else
5396 NO_AS_NEEDED=""
5397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5398$as_echo "no" >&6; }
5399fi
5400rm -f core conftest.err conftest.$ac_objext \
5401 conftest$ac_exeext conftest.$ac_ext
5402LDFLAGS="$save_LDFLAGS"
5403
5404
5405
5406# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407
Matthias Kloseb9621712010-04-24 17:59:49 +00005408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5409$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005410if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412else
5413 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5414 then ac_cv_path_EGREP="$GREP -E"
5415 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 # Loop through the user's path and test for each of PROGNAME-LIST
5419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5421do
5422 IFS=$as_save_IFS
5423 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 for ac_prog in egrep; do
5425 for ac_exec_ext in '' $ac_executable_extensions; do
5426 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005427 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005428# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 # Check for GNU $ac_path_EGREP
5430case `"$ac_path_EGREP" --version 2>&1` in
5431*GNU*)
5432 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5433*)
5434 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005436 while :
5437 do
5438 cat "conftest.in" "conftest.in" >"conftest.tmp"
5439 mv "conftest.tmp" "conftest.in"
5440 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005442 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5443 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005444 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5446 # Best one so far, save it but keep looking for a better one
5447 ac_cv_path_EGREP="$ac_path_EGREP"
5448 ac_path_EGREP_max=$ac_count
5449 fi
5450 # 10*(2^10) chars as input seems more than enough
5451 test $ac_count -gt 10 && break
5452 done
5453 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5454esac
5455
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 $ac_path_EGREP_found && break 3
5457 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005458 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005459 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005460IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005461 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005462 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 +00005463 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005464else
5465 ac_cv_path_EGREP=$EGREP
5466fi
5467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005468 fi
5469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5471$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005472 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005473
5474
Matthias Kloseb9621712010-04-24 17:59:49 +00005475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5476$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005477if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005478 $as_echo_n "(cached) " >&6
5479else
5480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005481/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005482#include <stdlib.h>
5483#include <stdarg.h>
5484#include <string.h>
5485#include <float.h>
5486
5487int
5488main ()
5489{
5490
5491 ;
5492 return 0;
5493}
5494_ACEOF
5495if ac_fn_c_try_compile "$LINENO"; then :
5496 ac_cv_header_stdc=yes
5497else
5498 ac_cv_header_stdc=no
5499fi
5500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5501
5502if test $ac_cv_header_stdc = yes; then
5503 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5505/* end confdefs.h. */
5506#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005507
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005508_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005510 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005512else
Matthias Kloseb9621712010-04-24 17:59:49 +00005513 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005514fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005515rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516
Matthias Kloseb9621712010-04-24 17:59:49 +00005517fi
5518
5519if test $ac_cv_header_stdc = yes; then
5520 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5522/* end confdefs.h. */
5523#include <stdlib.h>
5524
5525_ACEOF
5526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5527 $EGREP "free" >/dev/null 2>&1; then :
5528
5529else
5530 ac_cv_header_stdc=no
5531fi
5532rm -f conftest*
5533
5534fi
5535
5536if test $ac_cv_header_stdc = yes; then
5537 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5538 if test "$cross_compiling" = yes; then :
5539 :
5540else
5541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5542/* end confdefs.h. */
5543#include <ctype.h>
5544#include <stdlib.h>
5545#if ((' ' & 0x0FF) == 0x020)
5546# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5547# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5548#else
5549# define ISLOWER(c) \
5550 (('a' <= (c) && (c) <= 'i') \
5551 || ('j' <= (c) && (c) <= 'r') \
5552 || ('s' <= (c) && (c) <= 'z'))
5553# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5554#endif
5555
5556#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5557int
5558main ()
5559{
5560 int i;
5561 for (i = 0; i < 256; i++)
5562 if (XOR (islower (i), ISLOWER (i))
5563 || toupper (i) != TOUPPER (i))
5564 return 2;
5565 return 0;
5566}
5567_ACEOF
5568if ac_fn_c_try_run "$LINENO"; then :
5569
5570else
5571 ac_cv_header_stdc=no
5572fi
5573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5574 conftest.$ac_objext conftest.beam conftest.$ac_ext
5575fi
5576
5577fi
5578fi
5579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5580$as_echo "$ac_cv_header_stdc" >&6; }
5581if test $ac_cv_header_stdc = yes; then
5582
5583$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5584
5585fi
5586
5587# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5588for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5589 inttypes.h stdint.h unistd.h
5590do :
5591 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5592ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5593"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005594if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005595 cat >>confdefs.h <<_ACEOF
5596#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5597_ACEOF
5598
5599fi
5600
5601done
5602
5603
5604
5605 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 +02005606if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005607 MINIX=yes
5608else
5609 MINIX=
5610fi
5611
5612
5613 if test "$MINIX" = yes; then
5614
5615$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5616
5617
5618$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5619
5620
5621$as_echo "#define _MINIX 1" >>confdefs.h
5622
5623 fi
5624
5625
5626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5627$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005628if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005629 $as_echo_n "(cached) " >&6
5630else
5631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5632/* end confdefs.h. */
5633
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005634# define __EXTENSIONS__ 1
5635 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005636int
5637main ()
5638{
5639
5640 ;
5641 return 0;
5642}
5643_ACEOF
5644if ac_fn_c_try_compile "$LINENO"; then :
5645 ac_cv_safe_to_define___extensions__=yes
5646else
5647 ac_cv_safe_to_define___extensions__=no
5648fi
5649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5650fi
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5652$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5653 test $ac_cv_safe_to_define___extensions__ = yes &&
5654 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5655
5656 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5657
5658 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5659
5660 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5661
5662 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5663
5664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665
Xavier de Gaye95750b12016-07-09 11:05:42 +02005666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5667$as_echo_n "checking for the Android API level... " >&6; }
5668cat >> conftest.c <<EOF
5669#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005670android_api = __ANDROID_API__
5671arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005672#else
5673#error not Android
5674#endif
5675EOF
5676
5677if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005678 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5679 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5681$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005682 if test -z "$ANDROID_API_LEVEL"; then
5683 echo 'Fatal: you must define __ANDROID_API__'
5684 exit 1
5685 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005686
5687cat >>confdefs.h <<_ACEOF
5688#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5689_ACEOF
5690
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005691
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5693$as_echo_n "checking for the Android arm ABI... " >&6; }
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5695$as_echo "$_arm_arch" >&6; }
5696 if test "$_arm_arch" = 7; then
5697 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5698 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5699 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005700else
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5702$as_echo "not Android" >&6; }
5703fi
5704rm -f conftest.c conftest.out
5705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706# Check for unsupported systems
5707case $ac_sys_system/$ac_sys_release in
5708atheos*|Linux*/1*)
5709 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5710 echo See README for details.
5711 exit 1;;
5712esac
5713
5714
Matthias Kloseb9621712010-04-24 17:59:49 +00005715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5716$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
5718# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005719if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720 withval=$with_suffix;
5721 case $withval in
5722 no) EXEEXT=;;
5723 yes) EXEEXT=.exe;;
5724 *) EXEEXT=$withval;;
5725 esac
5726fi
5727
Matthias Kloseb9621712010-04-24 17:59:49 +00005728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5729$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
5731# Test whether we're running on a non-case-sensitive system, in which
5732# case we give a warning if no ext is given
5733
Matthias Kloseb9621712010-04-24 17:59:49 +00005734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5735$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736if test ! -d CaseSensitiveTestDir; then
5737mkdir CaseSensitiveTestDir
5738fi
5739
5740if test -d casesensitivetestdir
5741then
Matthias Kloseb9621712010-04-24 17:59:49 +00005742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5743$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744 BUILDEXEEXT=.exe
5745else
Matthias Kloseb9621712010-04-24 17:59:49 +00005746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5747$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748 BUILDEXEEXT=$EXEEXT
5749fi
5750rmdir CaseSensitiveTestDir
5751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752case $ac_sys_system in
5753hp*|HP*)
5754 case $CC in
5755 cc|*/cc) CC="$CC -Ae";;
5756 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757esac
5758
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
Matthias Kloseb9621712010-04-24 17:59:49 +00005760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5761$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762if test -z "$LIBRARY"
5763then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005764 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5767$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768
5769# LDLIBRARY is the name of the library to link against (as opposed to the
5770# name of the library into which to insert object files). BLDLIBRARY is also
5771# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5772# is blank as the main program is not linked directly against LDLIBRARY.
5773# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5774# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5775# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5776# DLLLIBRARY is the shared (i.e., DLL) library.
5777#
5778# RUNSHARED is used to run shared python without installed libraries
5779#
5780# INSTSONAME is the name of the shared library that will be use to install
5781# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005782#
5783# LDVERSION is the shared library version number, normally the Python version
5784# with the ABI build flags appended.
5785
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786
5787
5788
5789
5790
5791
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005792
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793LDLIBRARY="$LIBRARY"
5794BLDLIBRARY='$(LDLIBRARY)'
5795INSTSONAME='$(LDLIBRARY)'
5796DLLLIBRARY=''
5797LDLIBRARYDIR=''
5798RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005799LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800
5801# LINKCC is the command that links the python executable -- default is $(CC).
5802# If CXX is set, and if it is needed to link a main function that was
5803# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5804# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805
Matthias Kloseb9621712010-04-24 17:59:49 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5807$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808if test -z "$LINKCC"
5809then
5810 LINKCC='$(PURIFY) $(MAINCC)'
5811 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812 QNX*)
5813 # qcc must be used because the other compilers do not
5814 # support -N.
5815 LINKCC=qcc;;
5816 esac
5817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5819$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820
Stefan Krahe6dcd372020-08-29 17:00:08 +02005821# EXPORTSYMS holds the list of exported symbols for AIX.
5822# EXPORTSFROM holds the module name exporting symbols on AIX.
5823EXPORTSYMS=
5824EXPORTSFROM=
5825
5826
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5828$as_echo_n "checking EXPORTSYMS... " >&6; }
5829case $ac_sys_system in
5830AIX*)
5831 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06005832 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02005833 ;;
5834esac
5835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5836$as_echo "$EXPORTSYMS" >&6; }
5837
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5839# make sure we default having it set to "no": this is used by
5840# distutils.unixccompiler to know if it should add --enable-new-dtags
5841# to linker command lines, and failing to detect GNU ld simply results
5842# in the same bahaviour as before.
5843
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5845$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846ac_prog=ld
5847if test "$GCC" = yes; then
5848 ac_prog=`$CC -print-prog-name=ld`
5849fi
5850case `"$ac_prog" -V 2>&1 < /dev/null` in
5851 *GNU*)
5852 GNULD=yes;;
5853 *)
5854 GNULD=no;;
5855esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5857$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5860$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005862if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863 enableval=$enable_shared;
5864fi
5865
5866
5867if test -z "$enable_shared"
5868then
5869 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005870 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871 enable_shared="yes";;
5872 *)
5873 enable_shared="no";;
5874 esac
5875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5877$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878
Matthias Kloseb9621712010-04-24 17:59:49 +00005879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5880$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005882if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005883 enableval=$enable_profiling;
5884fi
5885
5886if test "x$enable_profiling" = xyes; then
5887 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005888 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890/* end confdefs.h. */
5891int main() { return 0; }
5892_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005893if ac_fn_c_try_link "$LINENO"; then :
5894
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005896 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005898rm -f core conftest.err conftest.$ac_objext \
5899 conftest$ac_exeext conftest.$ac_ext
5900 CC="$ac_save_cc"
5901else
5902 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5905$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906
doko@ubuntu.comba015832012-06-30 16:52:05 +02005907if test "x$enable_profiling" = xyes; then
5908 BASECFLAGS="-pg $BASECFLAGS"
5909 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910fi
5911
Matthias Kloseb9621712010-04-24 17:59:49 +00005912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5913$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914
5915# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5916# library that we build, but we do not want to link against it (we
5917# will find it with a -framework option). For this reason there is an
5918# extra variable BLDLIBRARY against which Python and the extension
5919# modules are linked, BLDLIBRARY. This is normally the same as
5920# LDLIBRARY, but empty for MacOSX framework builds.
5921if test "$enable_framework"
5922then
5923 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005924 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 BLDLIBRARY=''
5926else
5927 BLDLIBRARY='$(LDLIBRARY)'
5928fi
5929
5930# Other platforms follow
5931if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005932 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
Matthias Kloseb9621712010-04-24 17:59:49 +00005934$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935
5936 case $ac_sys_system in
5937 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005938 LDLIBRARY='libpython$(LDVERSION).dll.a'
5939 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 LDLIBRARY='libpython$(LDVERSION).so'
5943 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005944 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005946 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005947 then
5948 PY3LIBRARY=libpython3.so
5949 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 ;;
pxinwrc1174262020-12-15 06:14:43 +08005951 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 LDLIBRARY='libpython$(LDVERSION).so'
5953 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005954 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005956 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005957 then
5958 PY3LIBRARY=libpython3.so
5959 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 ;;
5961 hp*|HP*)
5962 case `uname -m` in
5963 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005964 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ;;
5966 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005967 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 ;;
5969 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005970 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005971 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005974 LDLIBRARY='libpython$(LDVERSION).dylib'
5975 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005976 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005978 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005979 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005980 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005981 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982
5983 esac
5984else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005985 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 case $ac_sys_system in
5987 CYGWIN*)
5988 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005989 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 ;;
5991 esac
5992fi
5993
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005994if test "$cross_compiling" = yes; then
5995 RUNSHARED=
5996fi
5997
Matthias Kloseb9621712010-04-24 17:59:49 +00005998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5999$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006002if test -n "$ac_tool_prefix"; then
6003 for ac_prog in ar aal
6004 do
6005 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6006set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6008$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006009if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011else
6012 if test -n "$AR"; then
6013 ac_cv_prog_AR="$AR" # Let the user override the test.
6014else
6015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6016for as_dir in $PATH
6017do
6018 IFS=$as_save_IFS
6019 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006022 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024 break 2
6025 fi
6026done
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028IFS=$as_save_IFS
6029
6030fi
6031fi
6032AR=$ac_cv_prog_AR
6033if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6035$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036else
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6038$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039fi
6040
6041
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006042 test -n "$AR" && break
6043 done
6044fi
6045if test -z "$AR"; then
6046 ac_ct_AR=$AR
6047 for ac_prog in ar aal
6048do
6049 # Extract the first word of "$ac_prog", so it can be a program name with args.
6050set dummy $ac_prog; ac_word=$2
6051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6052$as_echo_n "checking for $ac_word... " >&6; }
6053if ${ac_cv_prog_ac_ct_AR+:} false; then :
6054 $as_echo_n "(cached) " >&6
6055else
6056 if test -n "$ac_ct_AR"; then
6057 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6058else
6059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6060for as_dir in $PATH
6061do
6062 IFS=$as_save_IFS
6063 test -z "$as_dir" && as_dir=.
6064 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006065 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006066 ac_cv_prog_ac_ct_AR="$ac_prog"
6067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6068 break 2
6069 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006071 done
6072IFS=$as_save_IFS
6073
6074fi
6075fi
6076ac_ct_AR=$ac_cv_prog_ac_ct_AR
6077if test -n "$ac_ct_AR"; then
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6079$as_echo "$ac_ct_AR" >&6; }
6080else
6081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
6083fi
6084
6085
6086 test -n "$ac_ct_AR" && break
6087done
6088
6089 if test "x$ac_ct_AR" = x; then
6090 AR="ar"
6091 else
6092 case $cross_compiling:$ac_tool_warned in
6093yes:)
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6095$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6096ac_tool_warned=yes ;;
6097esac
6098 AR=$ac_ct_AR
6099 fi
6100fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101
6102
6103# tweak ARFLAGS only if the user didn't set it on the command line
6104
6105if test -z "$ARFLAGS"
6106then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006107 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006108fi
6109
doko@ubuntu.com58844492012-06-30 18:25:32 +02006110if test -n "$ac_tool_prefix"; then
6111 for ac_prog in readelf
6112 do
6113 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6114set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6116$as_echo_n "checking for $ac_word... " >&6; }
6117if ${ac_cv_prog_READELF+:} false; then :
6118 $as_echo_n "(cached) " >&6
6119else
6120 if test -n "$READELF"; then
6121 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6122else
6123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6124for as_dir in $PATH
6125do
6126 IFS=$as_save_IFS
6127 test -z "$as_dir" && as_dir=.
6128 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006130 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6132 break 2
6133 fi
6134done
6135 done
6136IFS=$as_save_IFS
6137
6138fi
6139fi
6140READELF=$ac_cv_prog_READELF
6141if test -n "$READELF"; then
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6143$as_echo "$READELF" >&6; }
6144else
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6146$as_echo "no" >&6; }
6147fi
6148
6149
6150 test -n "$READELF" && break
6151 done
6152fi
6153if test -z "$READELF"; then
6154 ac_ct_READELF=$READELF
6155 for ac_prog in readelf
6156do
6157 # Extract the first word of "$ac_prog", so it can be a program name with args.
6158set dummy $ac_prog; ac_word=$2
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6160$as_echo_n "checking for $ac_word... " >&6; }
6161if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6162 $as_echo_n "(cached) " >&6
6163else
6164 if test -n "$ac_ct_READELF"; then
6165 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6166else
6167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6168for as_dir in $PATH
6169do
6170 IFS=$as_save_IFS
6171 test -z "$as_dir" && as_dir=.
6172 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006173 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006174 ac_cv_prog_ac_ct_READELF="$ac_prog"
6175 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6176 break 2
6177 fi
6178done
6179 done
6180IFS=$as_save_IFS
6181
6182fi
6183fi
6184ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6185if test -n "$ac_ct_READELF"; then
6186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6187$as_echo "$ac_ct_READELF" >&6; }
6188else
6189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6190$as_echo "no" >&6; }
6191fi
6192
6193
6194 test -n "$ac_ct_READELF" && break
6195done
6196
6197 if test "x$ac_ct_READELF" = x; then
6198 READELF=":"
6199 else
6200 case $cross_compiling:$ac_tool_warned in
6201yes:)
6202{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6203$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6204ac_tool_warned=yes ;;
6205esac
6206 READELF=$ac_ct_READELF
6207 fi
6208fi
6209
6210if test "$cross_compiling" = yes; then
6211 case "$READELF" in
6212 readelf|:)
6213 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6214 ;;
6215 esac
6216fi
6217
6218
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006221hp*|HP*)
6222 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223 if test -z "$INSTALL"
6224 then
6225 INSTALL="${srcdir}/install-sh -c"
6226 fi
6227esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228# Find a good install program. We prefer a C program (faster),
6229# so one script is as good as another. But avoid the broken or
6230# incompatible versions:
6231# SysV /etc/install, /usr/sbin/install
6232# SunOS /usr/etc/install
6233# IRIX /sbin/install
6234# AIX /bin/install
6235# AmigaOS /C/install, which installs bootblocks on floppy discs
6236# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6237# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6238# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6239# OS/2's system install, which has a completely different semantic
6240# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006241# Reject install programs that cannot install multiple files.
6242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6243$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006245if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006246 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006247else
6248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6249for as_dir in $PATH
6250do
6251 IFS=$as_save_IFS
6252 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006253 # Account for people who put trailing slashes in PATH elements.
6254case $as_dir/ in #((
6255 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006256 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006257 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006258 /usr/ucb/* ) ;;
6259 *)
6260 # OSF1 and SCO ODT 3.0 have their own names for install.
6261 # Don't use installbsd from OSF since it installs stuff as root
6262 # by default.
6263 for ac_prog in ginstall scoinst install; do
6264 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006265 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266 if test $ac_prog = install &&
6267 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6268 # AIX install. It has an incompatible calling convention.
6269 :
6270 elif test $ac_prog = install &&
6271 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6272 # program-specific install script used by HP pwplus--don't use.
6273 :
6274 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006275 rm -rf conftest.one conftest.two conftest.dir
6276 echo one > conftest.one
6277 echo two > conftest.two
6278 mkdir conftest.dir
6279 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6280 test -s conftest.one && test -s conftest.two &&
6281 test -s conftest.dir/conftest.one &&
6282 test -s conftest.dir/conftest.two
6283 then
6284 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6285 break 3
6286 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287 fi
6288 fi
6289 done
6290 done
6291 ;;
6292esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006293
6294 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295IFS=$as_save_IFS
6296
Matthias Kloseb9621712010-04-24 17:59:49 +00006297rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006298
6299fi
6300 if test "${ac_cv_path_install+set}" = set; then
6301 INSTALL=$ac_cv_path_install
6302 else
6303 # As a last resort, use the slow shell script. Don't cache a
6304 # value for INSTALL within a source directory, because that will
6305 # break other packages using the cache if that directory is
6306 # removed, or if the value is a relative name.
6307 INSTALL=$ac_install_sh
6308 fi
6309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6311$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312
6313# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6314# It thinks the first close brace ends the variable substitution.
6315test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6316
6317test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6318
6319test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6320
Matthias Klose93a0ef12012-03-15 18:08:34 +01006321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6322$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6323if test -z "$MKDIR_P"; then
6324 if ${ac_cv_path_mkdir+:} false; then :
6325 $as_echo_n "(cached) " >&6
6326else
6327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6328for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6329do
6330 IFS=$as_save_IFS
6331 test -z "$as_dir" && as_dir=.
6332 for ac_prog in mkdir gmkdir; do
6333 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006334 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006335 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6336 'mkdir (GNU coreutils) '* | \
6337 'mkdir (coreutils) '* | \
6338 'mkdir (fileutils) '4.1*)
6339 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6340 break 3;;
6341 esac
6342 done
6343 done
6344 done
6345IFS=$as_save_IFS
6346
6347fi
6348
6349 test -d ./--version && rmdir ./--version
6350 if test "${ac_cv_path_mkdir+set}" = set; then
6351 MKDIR_P="$ac_cv_path_mkdir -p"
6352 else
6353 # As a last resort, use the slow shell script. Don't cache a
6354 # value for MKDIR_P within a source directory, because that will
6355 # break other packages using the cache if that directory is
6356 # removed, or if the value is a relative name.
6357 MKDIR_P="$ac_install_sh -d"
6358 fi
6359fi
6360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6361$as_echo "$MKDIR_P" >&6; }
6362
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363
6364# Not every filesystem supports hard links
6365
6366if test -z "$LN" ; then
6367 case $ac_sys_system in
6368 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369 *) LN=ln;;
6370 esac
6371fi
6372
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006373# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006374
6375ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006376
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006377# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6379$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380
6381# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006382if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383 withval=$with_pydebug;
6384if test "$withval" != no
6385then
6386
Matthias Kloseb9621712010-04-24 17:59:49 +00006387$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006388
Matthias Kloseb9621712010-04-24 17:59:49 +00006389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6390$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006391 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006392 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006393else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6394$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006395fi
6396else
Matthias Kloseb9621712010-04-24 17:59:49 +00006397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006399fi
6400
6401
Victor Stinnerf4e47032019-04-25 00:56:28 +02006402# Check for --with-trace-refs
6403# --with-trace-refs
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6405$as_echo_n "checking for --with-trace-refs... " >&6; }
6406
6407# Check whether --with-trace-refs was given.
6408if test "${with_trace_refs+set}" = set; then :
6409 withval=$with_trace_refs;
6410else
6411 with_trace_refs=no
6412fi
6413
6414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6415$as_echo "$with_trace_refs" >&6; }
6416
6417if test "$with_trace_refs" = "yes"
6418then
6419
6420$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6421
6422fi
6423
6424# Check for --with-assertions.
6425# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006426assertions='false'
6427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6428$as_echo_n "checking for --with-assertions... " >&6; }
6429
6430# Check whether --with-assertions was given.
6431if test "${with_assertions+set}" = set; then :
6432 withval=$with_assertions;
6433if test "$withval" != no
6434then
6435 assertions='true'
6436fi
6437fi
6438
6439if test "$assertions" = 'true'; then
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6441$as_echo "yes" >&6; }
6442elif test "$Py_DEBUG" = 'true'; then
6443 assertions='true'
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6445$as_echo "implied by --with-pydebug" >&6; }
6446else
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6448$as_echo "no" >&6; }
6449fi
6450
Brett Cannon63d98bc2016-09-06 17:12:40 -07006451# Enable optimization flags
6452
6453
6454Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6456$as_echo_n "checking for --enable-optimizations... " >&6; }
6457# Check whether --enable-optimizations was given.
6458if test "${enable_optimizations+set}" = set; then :
6459 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006460if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006461then
6462 Py_OPT='true'
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6464$as_echo "yes" >&6; };
6465else
6466 Py_OPT='false'
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468$as_echo "no" >&6; };
6469fi
6470else
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
6473fi
6474
6475if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006476 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6477 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006478 # 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 +00006479 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006480 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006481 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006482 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01006483 case $CC in
6484 *gcc*)
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
6486$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
6487if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
6488 $as_echo_n "(cached) " >&6
6489else
6490
6491 ax_check_save_flags=$CFLAGS
6492 CFLAGS="$CFLAGS -fno-semantic-interposition"
6493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6494/* end confdefs.h. */
6495
6496int
6497main ()
6498{
6499
6500 ;
6501 return 0;
6502}
6503_ACEOF
6504if ac_fn_c_try_compile "$LINENO"; then :
6505 ax_cv_check_cflags___fno_semantic_interposition=yes
6506else
6507 ax_cv_check_cflags___fno_semantic_interposition=no
6508fi
6509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6510 CFLAGS=$ax_check_save_flags
6511fi
6512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
6513$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
6514if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
6515
Pablo Galindob451b0e2020-10-21 22:46:52 +01006516 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6517 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006518
6519else
6520 :
6521fi
6522
Pablo Galindob451b0e2020-10-21 22:46:52 +01006523 ;;
6524 esac
6525
6526
Brett Cannon63d98bc2016-09-06 17:12:40 -07006527else
6528 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006529 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006530 DEF_MAKE_RULE="all"
6531fi
6532
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006533
6534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6535$as_echo_n "checking PROFILE_TASK... " >&6; }
6536if test -z "$PROFILE_TASK"
6537then
Victor Stinner67900052021-01-27 11:16:15 +01006538 PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006539fi
6540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6541$as_echo "$PROFILE_TASK" >&6; }
6542
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006543# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6544# normal names in the default $PATH (ie: Ubuntu). They exist under the
6545# non-suffixed name in their versioned llvm directory.
6546
6547llvm_bin_dir=''
6548llvm_path="${PATH}"
6549if test "${CC}" = "clang"
6550then
6551 clang_bin=`which clang`
6552 # Some systems install clang elsewhere as a symlink to the real path
6553 # which is where the related llvm tools are located.
6554 if test -L "${clang_bin}"
6555 then
6556 clang_dir=`dirname "${clang_bin}"`
6557 clang_bin=`readlink "${clang_bin}"`
6558 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6559 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6560 fi
6561fi
6562
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006563# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6565$as_echo_n "checking for --with-lto... " >&6; }
6566
6567# Check whether --with-lto was given.
6568if test "${with_lto+set}" = set; then :
6569 withval=$with_lto;
6570if test "$withval" != no
6571then
6572 Py_LTO='true'
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6574$as_echo "yes" >&6; };
6575else
6576 Py_LTO='false'
6577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6578$as_echo "no" >&6; };
6579fi
6580else
6581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6582$as_echo "no" >&6; }
6583fi
6584
6585if test "$Py_LTO" = 'true' ; then
6586 case $CC in
6587 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006588
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006589 if test -n "$ac_tool_prefix"; then
6590 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6591set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6593$as_echo_n "checking for $ac_word... " >&6; }
6594if ${ac_cv_path_LLVM_AR+:} false; then :
6595 $as_echo_n "(cached) " >&6
6596else
6597 case $LLVM_AR in
6598 [\\/]* | ?:[\\/]*)
6599 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6600 ;;
6601 *)
6602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6603for as_dir in ${llvm_path}
6604do
6605 IFS=$as_save_IFS
6606 test -z "$as_dir" && as_dir=.
6607 for ac_exec_ext in '' $ac_executable_extensions; do
6608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6609 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6611 break 2
6612 fi
6613done
6614 done
6615IFS=$as_save_IFS
6616
6617 ;;
6618esac
6619fi
6620LLVM_AR=$ac_cv_path_LLVM_AR
6621if test -n "$LLVM_AR"; then
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6623$as_echo "$LLVM_AR" >&6; }
6624else
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6626$as_echo "no" >&6; }
6627fi
6628
6629
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006630fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006631if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006632 ac_pt_LLVM_AR=$LLVM_AR
6633 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006634set dummy llvm-ar; ac_word=$2
6635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6636$as_echo_n "checking for $ac_word... " >&6; }
6637if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6638 $as_echo_n "(cached) " >&6
6639else
6640 case $ac_pt_LLVM_AR in
6641 [\\/]* | ?:[\\/]*)
6642 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6643 ;;
6644 *)
6645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6646for as_dir in ${llvm_path}
6647do
6648 IFS=$as_save_IFS
6649 test -z "$as_dir" && as_dir=.
6650 for ac_exec_ext in '' $ac_executable_extensions; do
6651 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6652 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6653 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6654 break 2
6655 fi
6656done
6657 done
6658IFS=$as_save_IFS
6659
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006660 ;;
6661esac
6662fi
6663ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6664if test -n "$ac_pt_LLVM_AR"; then
6665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6666$as_echo "$ac_pt_LLVM_AR" >&6; }
6667else
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669$as_echo "no" >&6; }
6670fi
6671
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006672 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006673 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006674 else
6675 case $cross_compiling:$ac_tool_warned in
6676yes:)
6677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6679ac_tool_warned=yes ;;
6680esac
6681 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006682 fi
6683else
6684 LLVM_AR="$ac_cv_path_LLVM_AR"
6685fi
6686
6687
6688 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6689 then
6690 LLVM_AR_FOUND="found"
6691 else
6692 LLVM_AR_FOUND="not-found"
6693 fi
6694 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6695 then
6696 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6697 if test -n "${found_llvm_ar}"
6698 then
6699 LLVM_AR='/usr/bin/xcrun llvm-ar'
6700 LLVM_AR_FOUND=found
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6702$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6703 fi
6704 fi
6705 if test $LLVM_AR_FOUND = not-found
6706 then
6707 LLVM_PROFR_ERR=yes
6708 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6709 else
6710 LLVM_AR_ERR=no
6711 fi
6712 AR="${LLVM_AR}"
6713 case $ac_sys_system in
6714 Darwin*)
6715 # Any changes made here should be reflected in the GCC+Darwin case below
6716 LTOFLAGS="-flto -Wl,-export_dynamic"
6717 ;;
6718 *)
6719 LTOFLAGS="-flto"
6720 ;;
6721 esac
6722 ;;
6723 *gcc*)
6724 case $ac_sys_system in
6725 Darwin*)
6726 LTOFLAGS="-flto -Wl,-export_dynamic"
6727 ;;
6728 *)
6729 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6730 ;;
6731 esac
6732 ;;
6733 esac
6734
6735 if test "$ac_cv_prog_cc_g" = "yes"
6736 then
6737 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6738 # to get debug symbols.
6739 LTOFLAGS="$LTOFLAGS -g"
6740 fi
6741
stratakisf92c7aa2018-12-04 15:54:01 +01006742 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006743 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006744fi
6745
6746# Enable PGO flags.
6747
6748
6749
6750
6751
6752
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006753if test -n "$ac_tool_prefix"; then
6754 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6755set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6757$as_echo_n "checking for $ac_word... " >&6; }
6758if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6759 $as_echo_n "(cached) " >&6
6760else
6761 case $LLVM_PROFDATA in
6762 [\\/]* | ?:[\\/]*)
6763 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6764 ;;
6765 *)
6766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6767for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006768do
6769 IFS=$as_save_IFS
6770 test -z "$as_dir" && as_dir=.
6771 for ac_exec_ext in '' $ac_executable_extensions; do
6772 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006773 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6775 break 2
6776 fi
6777done
6778 done
6779IFS=$as_save_IFS
6780
Gregory P. Smith799520c2016-09-07 16:10:00 -07006781 ;;
6782esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006783fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006784LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6785if test -n "$LLVM_PROFDATA"; then
6786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6787$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006788else
6789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6790$as_echo "no" >&6; }
6791fi
6792
6793
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006794fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006795if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006796 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6797 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006798set dummy llvm-profdata; ac_word=$2
6799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6800$as_echo_n "checking for $ac_word... " >&6; }
6801if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6802 $as_echo_n "(cached) " >&6
6803else
6804 case $ac_pt_LLVM_PROFDATA in
6805 [\\/]* | ?:[\\/]*)
6806 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6807 ;;
6808 *)
6809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6810for as_dir in ${llvm_path}
6811do
6812 IFS=$as_save_IFS
6813 test -z "$as_dir" && as_dir=.
6814 for ac_exec_ext in '' $ac_executable_extensions; do
6815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6816 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6818 break 2
6819 fi
6820done
6821 done
6822IFS=$as_save_IFS
6823
Gregory P. Smith799520c2016-09-07 16:10:00 -07006824 ;;
6825esac
6826fi
6827ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6828if test -n "$ac_pt_LLVM_PROFDATA"; then
6829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6830$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6831else
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833$as_echo "no" >&6; }
6834fi
6835
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006836 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006837 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006838 else
6839 case $cross_compiling:$ac_tool_warned in
6840yes:)
6841{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6842$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6843ac_tool_warned=yes ;;
6844esac
6845 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006846 fi
6847else
6848 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6849fi
6850
6851
6852if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6853then
6854 LLVM_PROF_FOUND="found"
6855else
6856 LLVM_PROF_FOUND="not-found"
6857fi
6858if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6859then
6860 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6861 if test -n "${found_llvm_profdata}"
6862 then
6863 # llvm-profdata isn't directly in $PATH in some cases.
6864 # https://apple.stackexchange.com/questions/197053/
6865 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6866 LLVM_PROF_FOUND=found
6867 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6868$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6869 fi
6870fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006871LLVM_PROF_ERR=no
6872case $CC in
6873 *clang*)
6874 # Any changes made here should be reflected in the GCC+Darwin case below
6875 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6876 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006877 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006878 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6879 if test $LLVM_PROF_FOUND = not-found
6880 then
6881 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006882 if test "${REQUIRE_PGO}" = "yes"
6883 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006884 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 -07006885 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006886 fi
6887 ;;
6888 *gcc*)
6889 case $ac_sys_system in
6890 Darwin*)
6891 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6892 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006893 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006894 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006895 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006896 then
6897 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006898 if test "${REQUIRE_PGO}" = "yes"
6899 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006900 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 -07006901 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006902 fi
6903 ;;
6904 *)
6905 PGO_PROF_GEN_FLAG="-fprofile-generate"
6906 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6907 LLVM_PROF_MERGER="true"
6908 LLVM_PROF_FILE=""
6909 ;;
6910 esac
6911 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006912 *icc*)
6913 PGO_PROF_GEN_FLAG="-prof-gen"
6914 PGO_PROF_USE_FLAG="-prof-use"
6915 LLVM_PROF_MERGER="true"
6916 LLVM_PROF_FILE=""
6917 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006918esac
6919
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6921# merged with this chunk of code?
6922
6923# Optimizer/debugger flags
6924# ------------------------
6925# (The following bit of code is complicated enough - please keep things
6926# indented properly. Just pretend you're editing Python code. ;-)
6927
6928# There are two parallel sets of case statements below, one that checks to
6929# see if OPT was set and one that does BASECFLAGS setting based upon
6930# compiler and platform. BASECFLAGS tweaks need to be made even if the
6931# user set OPT.
6932
Victor Stinner23a683a2019-04-12 21:27:37 +02006933case $CC in
6934 *clang*)
6935 cc_is_clang=1
6936 ;;
6937 *)
6938 if $CC --version 2>&1 | grep -q clang
6939 then
6940 cc_is_clang=1
6941 else
6942 cc_is_clang=
6943 fi
6944esac
6945
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946# tweak OPT based on compiler and platform, only if the user didn't set
6947# it on the command line
6948
Victor Stinner9ed34a82017-05-02 22:35:58 +02006949
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006950if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006951then
6952 case $GCC in
6953 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006954 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6955 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6956 WRAP="-fwrapv"
6957 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006958
Victor Stinner35f3d242017-04-21 12:35:24 +02006959 if test -n "${cc_is_clang}"
6960 then
6961 # Clang also needs -fwrapv
6962 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006963 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6964 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006965 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006966 fi
6967
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006968 case $ac_cv_prog_cc_g in
6969 yes)
6970 if test "$Py_DEBUG" = 'true' ; then
6971 # Optimization messes up debuggers, so turn it off for
6972 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006973 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006974 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006975 else
Victor Stinner28205b22017-04-21 11:24:34 +02006976 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006977 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978 else
Victor Stinner28205b22017-04-21 11:24:34 +02006979 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980 fi
6981 ;;
6982 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006983 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 ;;
6985 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006986
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006987 case $ac_sys_system in
6988 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6989 ;;
6990 esac
6991 ;;
6992
6993 *)
6994 OPT="-O"
6995 ;;
6996 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997fi
6998
6999
7000
Benjamin Petersonacb8c522014-08-09 20:01:49 -07007001
stratakiscf10a752018-12-19 18:19:01 +01007002
Ronald Oussoren41761932020-11-08 10:05:27 +01007003# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007004UNIVERSAL_ARCH_FLAGS=
7005
7006
7007# tweak BASECFLAGS based on compiler and platform
7008case $GCC in
7009yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07007010 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007011
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7013$as_echo_n "checking for -Wextra... " >&6; }
7014 ac_save_cc="$CC"
7015 CC="$CC -Wextra -Werror"
7016 if ${ac_cv_extra_warnings+:} false; then :
7017 $as_echo_n "(cached) " >&6
7018else
7019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7020/* end confdefs.h. */
7021
7022
7023int
7024main ()
7025{
7026
7027 ;
7028 return 0;
7029}
7030
7031_ACEOF
7032if ac_fn_c_try_compile "$LINENO"; then :
7033
7034 ac_cv_extra_warnings=yes
7035
7036else
7037
7038 ac_cv_extra_warnings=no
7039
7040fi
7041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7042fi
7043
7044 CC="$ac_save_cc"
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7046$as_echo "$ac_cv_extra_warnings" >&6; }
7047
7048 if test $ac_cv_extra_warnings = yes
7049 then
7050 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7051 fi
7052
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007053 # Python doesn't violate C99 aliasing rules, but older versions of
7054 # GCC produce warnings for legal Python code. Enable
7055 # -fno-strict-aliasing on versions of GCC that support but produce
7056 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00007057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7058$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007059 ac_save_cc="$CC"
7060 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007061 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007062 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007063 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007064else
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007066/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007067
Matthias Kloseb159a552010-04-25 21:00:44 +00007068
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007069int
7070main ()
7071{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007072
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007073 ;
7074 return 0;
7075}
Matthias Kloseb159a552010-04-25 21:00:44 +00007076
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007078if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007079
7080 CC="$ac_save_cc -fstrict-aliasing"
7081 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007083/* end confdefs.h. */
7084
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007085 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007086int
7087main ()
7088{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007089double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007090 ;
7091 return 0;
7092}
Matthias Kloseb159a552010-04-25 21:00:44 +00007093
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007095if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007096
7097 ac_cv_no_strict_aliasing=no
7098
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007099else
Matthias Kloseb159a552010-04-25 21:00:44 +00007100
7101 ac_cv_no_strict_aliasing=yes
7102
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007103fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007105
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007106else
Matthias Kloseb159a552010-04-25 21:00:44 +00007107
7108 ac_cv_no_strict_aliasing=no
7109
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007110fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007112fi
7113
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007114 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007115 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7117$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007118 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007119 then
7120 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7121 fi
7122
Zachary Ware5af85642015-12-21 12:09:17 -06007123 # ICC doesn't recognize the option, but only emits a warning
7124 ## XXX does it emit an unused result warning and can it be disabled?
7125 case "$CC" in
7126 *icc*)
7127 ac_cv_disable_unused_result_warning=no
7128 ;;
7129 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7131$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7132 ac_save_cc="$CC"
7133 CC="$CC -Wunused-result -Werror"
7134 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007135 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007136 $as_echo_n "(cached) " >&6
7137else
7138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7139/* end confdefs.h. */
7140
7141
7142int
7143main ()
7144{
7145
7146 ;
7147 return 0;
7148}
7149
7150_ACEOF
7151if ac_fn_c_try_compile "$LINENO"; then :
7152
7153 ac_cv_disable_unused_result_warning=yes
7154
7155else
7156
7157 ac_cv_disable_unused_result_warning=no
7158
7159fi
7160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7161fi
7162
7163 CFLAGS="$save_CFLAGS"
7164 CC="$ac_save_cc"
7165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7166$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007167 ;;
7168 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007169
7170 if test $ac_cv_disable_unused_result_warning = yes
7171 then
7172 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007173 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7174 fi
7175
7176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7177$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7178 ac_save_cc="$CC"
7179 CC="$CC -Wunused-parameter -Werror"
7180 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7181 $as_echo_n "(cached) " >&6
7182else
7183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7184/* end confdefs.h. */
7185
7186
7187int
7188main ()
7189{
7190
7191 ;
7192 return 0;
7193}
7194
7195_ACEOF
7196if ac_fn_c_try_compile "$LINENO"; then :
7197
7198 ac_cv_disable_unused_parameter_warning=yes
7199
7200else
7201
7202 ac_cv_disable_unused_parameter_warning=no
7203
7204fi
7205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7206fi
7207
7208 CC="$ac_save_cc"
7209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7210$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7211
7212 if test $ac_cv_disable_unused_parameter_warning = yes
7213 then
7214 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7215 fi
7216
7217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7218$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7219 ac_save_cc="$CC"
7220 CC="$CC -Wmissing-field-initializers -Werror"
7221 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7222 $as_echo_n "(cached) " >&6
7223else
7224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7225/* end confdefs.h. */
7226
7227
7228int
7229main ()
7230{
7231
7232 ;
7233 return 0;
7234}
7235
7236_ACEOF
7237if ac_fn_c_try_compile "$LINENO"; then :
7238
7239 ac_cv_disable_missing_field_initializers=yes
7240
7241else
7242
7243 ac_cv_disable_missing_field_initializers=no
7244
7245fi
7246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7247fi
7248
7249 CC="$ac_save_cc"
7250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7251$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7252
7253 if test $ac_cv_disable_missing_field_initializers = yes
7254 then
7255 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007256 fi
7257
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7259$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7260 ac_save_cc="$CC"
7261 CC="$CC -Wsign-compare"
7262 save_CFLAGS="$CFLAGS"
7263 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7264 $as_echo_n "(cached) " >&6
7265else
7266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7267/* end confdefs.h. */
7268
7269
7270int
7271main ()
7272{
7273
7274 ;
7275 return 0;
7276}
7277
7278_ACEOF
7279if ac_fn_c_try_compile "$LINENO"; then :
7280
7281 ac_cv_enable_sign_compare_warning=yes
7282
7283else
7284
7285 ac_cv_enable_sign_compare_warning=no
7286
7287fi
7288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7289fi
7290
7291 CFLAGS="$save_CFLAGS"
7292 CC="$ac_save_cc"
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7294$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7295
7296 if test $ac_cv_enable_sign_compare_warning = yes
7297 then
7298 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7299 fi
7300
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7302$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7303 ac_save_cc="$CC"
7304 CC="$CC -Wunreachable-code"
7305 save_CFLAGS="$CFLAGS"
7306 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7307 $as_echo_n "(cached) " >&6
7308else
7309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7310/* end confdefs.h. */
7311
7312
7313int
7314main ()
7315{
7316
7317 ;
7318 return 0;
7319}
7320
7321_ACEOF
7322if ac_fn_c_try_compile "$LINENO"; then :
7323
7324 ac_cv_enable_unreachable_code_warning=yes
7325
7326else
7327
7328 ac_cv_enable_unreachable_code_warning=no
7329
7330fi
7331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7332fi
7333
7334 CFLAGS="$save_CFLAGS"
7335 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007336
7337 # Don't enable unreachable code warning in debug mode, since it usually
7338 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007339 # Issue #24324: Unfortunately, the unreachable code warning does not work
7340 # correctly on gcc and has been silently removed from the compiler.
7341 # It is supported on clang but on OS X systems gcc may be an alias
7342 # for clang. Try to determine if the compiler is not really gcc and,
7343 # if so, only then enable the warning.
7344 if test $ac_cv_enable_unreachable_code_warning = yes && \
7345 test "$Py_DEBUG" != "true" && \
7346 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007347 then
7348 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007349 else
7350 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007351 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7353$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007354
INADA Naokie3364842018-06-05 20:40:53 +09007355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7356$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7357 ac_save_cc="$CC"
7358 CC="$CC -Werror -Wstrict-prototypes"
7359 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7360 $as_echo_n "(cached) " >&6
7361else
7362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7363/* end confdefs.h. */
7364
7365
7366int
7367main ()
7368{
7369
7370 ;
7371 return 0;
7372}
7373
7374_ACEOF
7375if ac_fn_c_try_compile "$LINENO"; then :
7376
7377 ac_cv_enable_strict_prototypes_warning=yes
7378
7379else
7380
7381 ac_cv_enable_strict_prototypes_warning=no
7382
7383fi
7384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7385fi
7386
7387 CC="$ac_save_cc"
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7389$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7390
7391 if test $ac_cv_enable_strict_prototypes_warning = yes
7392 then
7393 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7394 fi
7395
Victor Stinner193ee0a2017-02-06 14:24:00 +01007396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7397$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7398 ac_save_cc="$CC"
7399 CC="$CC -Werror=implicit-function-declaration"
7400 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7401 $as_echo_n "(cached) " >&6
7402else
7403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7404/* end confdefs.h. */
7405
7406
7407int
7408main ()
7409{
7410
7411 ;
7412 return 0;
7413}
7414
7415_ACEOF
7416if ac_fn_c_try_compile "$LINENO"; then :
7417
7418 ac_cv_enable_implicit_function_declaration_error=yes
7419
7420else
7421
7422 ac_cv_enable_implicit_function_declaration_error=no
7423
7424fi
7425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7426fi
7427
7428 CC="$ac_save_cc"
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7430$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7431
7432 if test $ac_cv_enable_implicit_function_declaration_error = yes
7433 then
7434 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7435 fi
7436
Vinay Sajip0b60f642019-10-15 08:26:12 +01007437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7438$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7439 ac_save_cc="$CC"
7440 CC="$CC -fvisibility=hidden"
7441 if ${ac_cv_enable_visibility+:} false; then :
7442 $as_echo_n "(cached) " >&6
7443else
7444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7445/* end confdefs.h. */
7446
7447
7448int
7449main ()
7450{
7451
7452 ;
7453 return 0;
7454}
7455
7456_ACEOF
7457if ac_fn_c_try_compile "$LINENO"; then :
7458
7459 ac_cv_enable_visibility=yes
7460
7461else
7462
7463 ac_cv_enable_visibility=no
7464
7465fi
7466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7467fi
7468
7469 CC="$ac_save_cc"
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7471$as_echo "$ac_cv_enable_visibility" >&6; }
7472
7473 if test $ac_cv_enable_visibility = yes
7474 then
7475 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7476 fi
7477
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007478 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7479 # support. Without this, treatment of subnormals doesn't follow
7480 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007481 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482 alpha*)
7483 BASECFLAGS="$BASECFLAGS -mieee"
7484 ;;
7485 esac
7486
7487 case $ac_sys_system in
7488 SCO_SV*)
7489 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7490 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007491
Ned Deily87adb6e2013-10-18 21:09:56 -07007492 Darwin*)
7493 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7494 # used to be here, but non-Apple gcc doesn't accept them.
7495 if test "${CC}" = gcc
7496 then
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007498$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007499 case "${UNIVERSALSDK}" in
7500 */MacOSX10.4u.sdk)
7501 # Build using 10.4 SDK, force usage of gcc when the
7502 # compiler is gcc, otherwise the user will get very
7503 # confusing error messages when building on OSX 10.6
7504 CC=gcc-4.0
7505 CPP=cpp-4.0
7506 ;;
7507 esac
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007509$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007510 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511
Ned Deily87adb6e2013-10-18 21:09:56 -07007512 if test "${enable_universalsdk}"
7513 then
7514 case "$UNIVERSAL_ARCHS" in
7515 32-bit)
7516 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7517 LIPO_32BIT_FLAGS=""
7518 ARCH_RUN_32BIT=""
7519 ;;
7520 64-bit)
7521 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7522 LIPO_32BIT_FLAGS=""
7523 ARCH_RUN_32BIT="true"
7524 ;;
7525 all)
7526 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7527 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7528 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7529 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01007530 universal2)
7531 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
7532 LIPO_32BIT_FLAGS=""
7533 ARCH_RUN_32BIT="true"
7534 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007535 intel)
7536 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7537 LIPO_32BIT_FLAGS="-extract i386"
7538 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7539 ;;
7540 intel-32)
7541 UNIVERSAL_ARCH_FLAGS="-arch i386"
7542 LIPO_32BIT_FLAGS=""
7543 ARCH_RUN_32BIT=""
7544 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007545 intel-64)
7546 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7547 LIPO_32BIT_FLAGS=""
7548 ARCH_RUN_32BIT="true"
7549 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007550 3-way)
7551 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7552 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7553 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7554 ;;
7555 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01007556 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 -07007557 ;;
7558 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559
Ned Deily87adb6e2013-10-18 21:09:56 -07007560 if test "${UNIVERSALSDK}" != "/"
7561 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007562 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7563 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007564 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007565 else
7566 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7567 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007568 fi
7569 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007570
Ned Deily87adb6e2013-10-18 21:09:56 -07007571 # Calculate an appropriate deployment target for this build:
7572 # The deployment target value is used explicitly to enable certain
7573 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007574 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007575 # component of the string returned by distutils.get_platform().
7576 #
7577 # Use the value from:
7578 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7579 # 2. the operating system version of the build machine if >= 10.6
7580 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7581 # below to pick either 10.3, 10.4, or 10.5 as the target.
7582 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583
Ned Deily87adb6e2013-10-18 21:09:56 -07007584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7585$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007586 cur_target_major=`sw_vers -productVersion | \
7587 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7588 cur_target_minor=`sw_vers -productVersion | \
7589 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7590 cur_target="${cur_target_major}.${cur_target_minor}"
7591 if test ${cur_target_major} -eq 10 && \
7592 test ${cur_target_minor} -ge 3 && \
7593 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007594 then
Ned Deily36820b62014-06-25 13:44:22 -07007595 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007596 cur_target=10.3
7597 if test ${enable_universalsdk}
7598 then
7599 case "$UNIVERSAL_ARCHS" in
7600 all|3-way|intel|64-bit)
7601 # These configurations were first supported in 10.5
7602 cur_target='10.5'
7603 ;;
7604 esac
7605 else
7606 if test `/usr/bin/arch` = "i386"
7607 then
7608 # 10.4 was the first release to support Intel archs
7609 cur_target="10.4"
7610 fi
7611 fi
7612 fi
7613 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007614
Ned Deily87adb6e2013-10-18 21:09:56 -07007615 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7616 # environment with a value that is the same as what we'll use
7617 # in the Makefile to ensure that we'll get the same compiler
7618 # environment during configure and build time.
7619 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7620 export MACOSX_DEPLOYMENT_TARGET
7621 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7623$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007624
Ronald Oussoren0f20bd92020-11-22 02:13:11 +01007625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5
7626$as_echo_n "checking if specified universal architectures work... " >&6; }
7627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7628/* end confdefs.h. */
7629#include <stdio.h>
7630int
7631main ()
7632{
7633printf("%d", 42);
7634 ;
7635 return 0;
7636}
7637_ACEOF
7638if ac_fn_c_try_link "$LINENO"; then :
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7640$as_echo "yes" >&6; }
7641else
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7643$as_echo "no" >&6; }
7644 as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
7645
7646fi
7647rm -f core conftest.err conftest.$ac_objext \
7648 conftest$ac_exeext conftest.$ac_ext
7649
Ned Deily87adb6e2013-10-18 21:09:56 -07007650 # end of Darwin* tests
7651 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652 esac
7653 ;;
7654
7655*)
7656 case $ac_sys_system in
7657 OpenUNIX*|UnixWare*)
7658 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7659 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660 SCO_SV*)
7661 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7662 ;;
7663 esac
7664 ;;
7665esac
7666
Zachary Ware5af85642015-12-21 12:09:17 -06007667case "$CC" in
7668*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007669 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007670 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7671 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007672*xlc*)
7673 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7674 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007675esac
7676
T. Woutersddbfa2c2017-05-23 01:30:49 +02007677if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678 :
7679else
7680 OPT="-DNDEBUG $OPT"
7681fi
7682
7683if test "$ac_arch_flags"
7684then
7685 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7686fi
7687
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688# On some compilers, pthreads are available without further options
7689# (e.g. MacOS X). On some of these systems, the compiler will not
7690# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7691# So we have to see first whether pthreads are available without
7692# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7694$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007695if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699 ac_cv_pthread_is_default=no
7700else
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702/* end confdefs.h. */
7703
Stefan Krah7dba5942012-11-22 22:49:11 +01007704#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705#include <pthread.h>
7706
7707void* routine(void* p){return NULL;}
7708
7709int main(){
7710 pthread_t p;
7711 if(pthread_create(&p,NULL,routine,NULL)!=0)
7712 return 1;
7713 (void)pthread_detach(p);
7714 return 0;
7715}
7716
7717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007718if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007719
7720 ac_cv_pthread_is_default=yes
7721 ac_cv_kthread=no
7722 ac_cv_pthread=no
7723
7724else
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729fi
7730
7731
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732fi
7733
Matthias Kloseb9621712010-04-24 17:59:49 +00007734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7735$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736
7737
7738if test $ac_cv_pthread_is_default = yes
7739then
7740 ac_cv_kpthread=no
7741else
7742# -Kpthread, if available, provides the right #defines
7743# and linker options to make pthread_create available
7744# Some compilers won't report that they do not support -Kpthread,
7745# so we need to run a program to see whether it really made the
7746# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7748$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007749if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007750 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007751else
7752 ac_save_cc="$CC"
7753CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007754if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755 ac_cv_kpthread=no
7756else
Matthias Kloseb9621712010-04-24 17:59:49 +00007757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007758/* end confdefs.h. */
7759
Stefan Krah7dba5942012-11-22 22:49:11 +01007760#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761#include <pthread.h>
7762
7763void* routine(void* p){return NULL;}
7764
7765int main(){
7766 pthread_t p;
7767 if(pthread_create(&p,NULL,routine,NULL)!=0)
7768 return 1;
7769 (void)pthread_detach(p);
7770 return 0;
7771}
7772
7773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007774if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007775 ac_cv_kpthread=yes
7776else
Matthias Kloseb9621712010-04-24 17:59:49 +00007777 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781fi
7782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783CC="$ac_save_cc"
7784fi
7785
Matthias Kloseb9621712010-04-24 17:59:49 +00007786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7787$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007788fi
7789
7790if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7791then
7792# -Kthread, if available, provides the right #defines
7793# and linker options to make pthread_create available
7794# Some compilers won't report that they do not support -Kthread,
7795# so we need to run a program to see whether it really made the
7796# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7798$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007799if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007801else
7802 ac_save_cc="$CC"
7803CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007804if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007805 ac_cv_kthread=no
7806else
Matthias Kloseb9621712010-04-24 17:59:49 +00007807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007808/* end confdefs.h. */
7809
Stefan Krah7dba5942012-11-22 22:49:11 +01007810#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811#include <pthread.h>
7812
7813void* routine(void* p){return NULL;}
7814
7815int main(){
7816 pthread_t p;
7817 if(pthread_create(&p,NULL,routine,NULL)!=0)
7818 return 1;
7819 (void)pthread_detach(p);
7820 return 0;
7821}
7822
7823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007824if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825 ac_cv_kthread=yes
7826else
Matthias Kloseb9621712010-04-24 17:59:49 +00007827 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007831fi
7832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007833CC="$ac_save_cc"
7834fi
7835
Matthias Kloseb9621712010-04-24 17:59:49 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7837$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007838fi
7839
7840if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7841then
7842# -pthread, if available, provides the right #defines
7843# and linker options to make pthread_create available
7844# Some compilers won't report that they do not support -pthread,
7845# so we need to run a program to see whether it really made the
7846# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7848$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007849if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851else
7852 ac_save_cc="$CC"
7853CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007854if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007855 ac_cv_pthread=no
7856else
Matthias Kloseb9621712010-04-24 17:59:49 +00007857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007858/* end confdefs.h. */
7859
Stefan Krah7dba5942012-11-22 22:49:11 +01007860#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007861#include <pthread.h>
7862
7863void* routine(void* p){return NULL;}
7864
7865int main(){
7866 pthread_t p;
7867 if(pthread_create(&p,NULL,routine,NULL)!=0)
7868 return 1;
7869 (void)pthread_detach(p);
7870 return 0;
7871}
7872
7873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007874if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007875 ac_cv_pthread=yes
7876else
Matthias Kloseb9621712010-04-24 17:59:49 +00007877 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7880 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007881fi
7882
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007883CC="$ac_save_cc"
7884fi
7885
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7887$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007888fi
7889
7890# If we have set a CC compiler flag for thread support then
7891# check if it works for CXX, too.
7892ac_cv_cxx_thread=no
7893if test ! -z "$CXX"
7894then
Matthias Kloseb9621712010-04-24 17:59:49 +00007895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7896$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007897ac_save_cxx="$CXX"
7898
7899if test "$ac_cv_kpthread" = "yes"
7900then
7901 CXX="$CXX -Kpthread"
7902 ac_cv_cxx_thread=yes
7903elif test "$ac_cv_kthread" = "yes"
7904then
7905 CXX="$CXX -Kthread"
7906 ac_cv_cxx_thread=yes
7907elif test "$ac_cv_pthread" = "yes"
7908then
7909 CXX="$CXX -pthread"
7910 ac_cv_cxx_thread=yes
7911fi
7912
7913if test $ac_cv_cxx_thread = yes
7914then
7915 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7916 $CXX -c conftest.$ac_ext 2>&5
7917 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7918 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7919 then
7920 ac_cv_cxx_thread=yes
7921 else
7922 ac_cv_cxx_thread=no
7923 fi
7924 rm -fr conftest*
7925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7927$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007928fi
7929CXX="$ac_save_cxx"
7930
7931
7932# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7934$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007935if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007937else
Matthias Kloseb9621712010-04-24 17:59:49 +00007938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007939/* end confdefs.h. */
7940#include <stdlib.h>
7941#include <stdarg.h>
7942#include <string.h>
7943#include <float.h>
7944
7945int
7946main ()
7947{
7948
7949 ;
7950 return 0;
7951}
7952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007953if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007954 ac_cv_header_stdc=yes
7955else
Matthias Kloseb9621712010-04-24 17:59:49 +00007956 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007957fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7959
7960if test $ac_cv_header_stdc = yes; then
7961 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007963/* end confdefs.h. */
7964#include <string.h>
7965
7966_ACEOF
7967if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 $EGREP "memchr" >/dev/null 2>&1; then :
7969
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007970else
7971 ac_cv_header_stdc=no
7972fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007973rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007974
7975fi
7976
7977if test $ac_cv_header_stdc = yes; then
7978 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007980/* end confdefs.h. */
7981#include <stdlib.h>
7982
7983_ACEOF
7984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 $EGREP "free" >/dev/null 2>&1; then :
7986
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007987else
7988 ac_cv_header_stdc=no
7989fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007990rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007991
7992fi
7993
7994if test $ac_cv_header_stdc = yes; then
7995 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007997 :
7998else
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008000/* end confdefs.h. */
8001#include <ctype.h>
8002#include <stdlib.h>
8003#if ((' ' & 0x0FF) == 0x020)
8004# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8005# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8006#else
8007# define ISLOWER(c) \
8008 (('a' <= (c) && (c) <= 'i') \
8009 || ('j' <= (c) && (c) <= 'r') \
8010 || ('s' <= (c) && (c) <= 'z'))
8011# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8012#endif
8013
8014#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8015int
8016main ()
8017{
8018 int i;
8019 for (i = 0; i < 256; i++)
8020 if (XOR (islower (i), ISLOWER (i))
8021 || toupper (i) != TOUPPER (i))
8022 return 2;
8023 return 0;
8024}
8025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008026if ac_fn_c_try_run "$LINENO"; then :
8027
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008028else
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8032 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008033fi
8034
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008035fi
8036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8038$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008039if test $ac_cv_header_stdc = yes; then
8040
Matthias Kloseb9621712010-04-24 17:59:49 +00008041$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008042
8043fi
8044
stratakise768c862018-01-23 16:11:24 +01008045for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008046fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02008047ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07008048sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07008049utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01008050poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01008051sys/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 +01008052sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08008053sys/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 +01008054sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00008055sys/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 -07008056libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008057linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimescd9fed62020-11-13 19:48:52 +01008058sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
8059sys/mman.h sys/eventfd.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008060do :
8061 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8062ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008063if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008065#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008066_ACEOF
8067
8068fi
8069
Guido van Rossum627b2d71993-12-24 10:39:16 +00008070done
8071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008072ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008073for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8076$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008077if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00008079else
Matthias Kloseb9621712010-04-24 17:59:49 +00008080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008081/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008082#include <sys/types.h>
8083#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008084
Martin v. Löwis11437992002-04-12 09:54:03 +00008085int
8086main ()
8087{
8088if ((DIR *) 0)
8089return 0;
8090 ;
8091 return 0;
8092}
8093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008094if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008096else
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008101eval ac_res=\$$as_ac_Header
8102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8103$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008104if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008105 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008106#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008107_ACEOF
8108
8109ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008110fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008111
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008112done
8113# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8114if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8116$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008117if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008118 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008119else
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008124/* Override any GCC internal prototype to avoid an error.
8125 Use char because int might match the return type of a GCC
8126 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008127#ifdef __cplusplus
8128extern "C"
8129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008130char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008131int
8132main ()
8133{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008134return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008135 ;
8136 return 0;
8137}
8138_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139for ac_lib in '' dir; do
8140 if test -z "$ac_lib"; then
8141 ac_res="none required"
8142 else
8143 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008144 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008149rm -f core conftest.err conftest.$ac_objext \
8150 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008151 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154done
Victor Stinnere0be4232011-10-25 13:06:09 +02008155if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157else
8158 ac_cv_search_opendir=no
8159fi
8160rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008161LIBS=$ac_func_search_save_LIBS
8162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8164$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008166if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008169fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008170
Michael W. Hudson54241132001-12-07 15:38:26 +00008171else
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8173$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008174if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008176else
8177 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008180
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008181/* Override any GCC internal prototype to avoid an error.
8182 Use char because int might match the return type of a GCC
8183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008184#ifdef __cplusplus
8185extern "C"
8186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008187char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008188int
8189main ()
8190{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008191return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008192 ;
8193 return 0;
8194}
8195_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196for ac_lib in '' x; do
8197 if test -z "$ac_lib"; then
8198 ac_res="none required"
8199 else
8200 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008201 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008203 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008206rm -f core conftest.err conftest.$ac_objext \
8207 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008208 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211done
Victor Stinnere0be4232011-10-25 13:06:09 +02008212if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214else
8215 ac_cv_search_opendir=no
8216fi
8217rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008218LIBS=$ac_func_search_save_LIBS
8219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8221$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008223if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008226fi
8227
8228fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8231$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008232if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008234else
Matthias Kloseb9621712010-04-24 17:59:49 +00008235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008236/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008237#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008238int
8239main ()
8240{
8241return makedev(0, 0);
8242 ;
8243 return 0;
8244}
8245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008247 ac_cv_header_sys_types_h_makedev=yes
8248else
Matthias Kloseb9621712010-04-24 17:59:49 +00008249 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008251rm -f core conftest.err conftest.$ac_objext \
8252 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008253
8254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8256$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008257
8258if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008259ac_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 +02008260if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008261
Matthias Kloseb9621712010-04-24 17:59:49 +00008262$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008263
8264fi
8265
8266
8267
8268 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 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 +02008270if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008271
Matthias Kloseb9621712010-04-24 17:59:49 +00008272$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008273
8274fi
8275
8276
8277 fi
8278fi
8279
Michael W. Hudson54241132001-12-07 15:38:26 +00008280
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008281# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8282# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8283SAVE_CFLAGS=$CFLAGS
8284CFLAGS="-std=c99 $CFLAGS"
8285for ac_header in bluetooth/bluetooth.h
8286do :
8287 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8288if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8289 cat >>confdefs.h <<_ACEOF
8290#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8291_ACEOF
8292
8293fi
8294
8295done
8296
8297CFLAGS=$SAVE_CFLAGS
8298
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008299# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8300for ac_header in net/if.h
8301do :
8302 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8303#ifdef STDC_HEADERS
8304# include <stdlib.h>
8305# include <stddef.h>
8306#else
8307# ifdef HAVE_STDLIB_H
8308# include <stdlib.h>
8309# endif
8310#endif
8311#ifdef HAVE_SYS_SOCKET_H
8312# include <sys/socket.h>
8313#endif
8314
8315"
Victor Stinnere0be4232011-10-25 13:06:09 +02008316if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008317 cat >>confdefs.h <<_ACEOF
8318#define HAVE_NET_IF_H 1
8319_ACEOF
8320
8321fi
8322
8323done
8324
8325
Martin v. Löwis11017b12006-01-14 18:12:57 +00008326# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008327for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008328do :
8329 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 +00008330#ifdef HAVE_ASM_TYPES_H
8331#include <asm/types.h>
8332#endif
8333#ifdef HAVE_SYS_SOCKET_H
8334#include <sys/socket.h>
8335#endif
8336
Matthias Kloseb9621712010-04-24 17:59:49 +00008337"
Victor Stinnere0be4232011-10-25 13:06:09 +02008338if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008339 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008340#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008341_ACEOF
8342
8343fi
8344
8345done
8346
8347
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008348# On Linux, qrtr.h requires asm/types.h
8349for ac_header in linux/qrtr.h
8350do :
8351 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8352#ifdef HAVE_ASM_TYPES_H
8353#include <asm/types.h>
8354#endif
8355#ifdef HAVE_SYS_SOCKET_H
8356#include <sys/socket.h>
8357#endif
8358
8359"
8360if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8361 cat >>confdefs.h <<_ACEOF
8362#define HAVE_LINUX_QRTR_H 1
8363_ACEOF
8364
8365fi
8366
8367done
8368
8369
caaveryeffc12f2017-09-06 18:18:10 -04008370for ac_header in linux/vm_sockets.h
8371do :
8372 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8373#ifdef HAVE_SYS_SOCKET_H
8374#include <sys/socket.h>
8375#endif
8376
8377"
8378if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8379 cat >>confdefs.h <<_ACEOF
8380#define HAVE_LINUX_VM_SOCKETS_H 1
8381_ACEOF
8382
8383fi
8384
8385done
8386
8387
karl ding360371f2020-04-29 15:31:19 -07008388# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8389for 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 +02008390do :
8391 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8392ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8393#ifdef HAVE_SYS_SOCKET_H
8394#include <sys/socket.h>
8395#endif
8396
8397"
8398if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8399 cat >>confdefs.h <<_ACEOF
8400#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8401_ACEOF
8402
8403fi
8404
8405done
8406
8407
Guido van Rossum627b2d71993-12-24 10:39:16 +00008408# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008409was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8411$as_echo_n "checking for clock_t in time.h... " >&6; }
8412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008413/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008414#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008415
8416_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008419 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008420else
Martin v. Löwis11437992002-04-12 09:54:03 +00008421
8422
Matthias Kloseb9621712010-04-24 17:59:49 +00008423$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008424
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008425
Guido van Rossum627b2d71993-12-24 10:39:16 +00008426fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008427rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008428
Matthias Kloseb9621712010-04-24 17:59:49 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8430$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008431
Matthias Kloseb9621712010-04-24 17:59:49 +00008432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8433$as_echo_n "checking for makedev... " >&6; }
8434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008435/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008436
Jesus Cea740f53a2010-04-28 11:35:30 +00008437#if defined(MAJOR_IN_MKDEV)
8438#include <sys/mkdev.h>
8439#elif defined(MAJOR_IN_SYSMACROS)
8440#include <sys/sysmacros.h>
8441#else
8442#include <sys/types.h>
8443#endif
8444
Neal Norwitz11690112002-07-30 01:08:28 +00008445int
8446main ()
8447{
Jesus Cea740f53a2010-04-28 11:35:30 +00008448
8449 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008450 ;
8451 return 0;
8452}
Matthias Kloseb159a552010-04-25 21:00:44 +00008453
Neal Norwitz11690112002-07-30 01:08:28 +00008454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008455if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008456 ac_cv_has_makedev=yes
8457else
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008460rm -f core conftest.err conftest.$ac_objext \
8461 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8463$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008464if test "$ac_cv_has_makedev" = "yes"; then
8465
Matthias Kloseb9621712010-04-24 17:59:49 +00008466$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008467
8468fi
8469
Christian Heimes985ecdc2013-11-20 11:46:18 +01008470# byte swapping
8471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8472$as_echo_n "checking for le64toh... " >&6; }
8473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8474/* end confdefs.h. */
8475
8476#ifdef HAVE_ENDIAN_H
8477#include <endian.h>
8478#elif defined(HAVE_SYS_ENDIAN_H)
8479#include <sys/endian.h>
8480#endif
8481
8482int
8483main ()
8484{
8485
8486 le64toh(1)
8487 ;
8488 return 0;
8489}
8490
8491_ACEOF
8492if ac_fn_c_try_link "$LINENO"; then :
8493 ac_cv_has_le64toh=yes
8494else
8495 ac_cv_has_le64toh=no
8496fi
8497rm -f core conftest.err conftest.$ac_objext \
8498 conftest$ac_exeext conftest.$ac_ext
8499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8500$as_echo "$ac_cv_has_le64toh" >&6; }
8501if test "$ac_cv_has_le64toh" = "yes"; then
8502
8503$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8504
8505fi
8506
Martin v. Löwis399a6892002-10-04 10:22:02 +00008507use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008508# Don't use largefile support for GNU/Hurd
8509case $ac_sys_system in GNU*)
8510 use_lfs=no
8511esac
8512
Martin v. Löwis399a6892002-10-04 10:22:02 +00008513if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008514# Two defines needed to enable largefile support on various platforms
8515# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008516case $ac_sys_system/$ac_sys_release in
8517AIX*)
8518
8519$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8520
8521 ;;
8522esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008523
Matthias Kloseb9621712010-04-24 17:59:49 +00008524$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008525
8526
Matthias Kloseb9621712010-04-24 17:59:49 +00008527$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008528
Martin v. Löwis399a6892002-10-04 10:22:02 +00008529fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008530
Guido van Rossum84e7b241996-08-19 21:59:00 +00008531# Add some code to confdefs.h so that the test for off_t works on SCO
8532cat >> confdefs.h <<\EOF
8533#if defined(SCO_DS)
8534#undef _OFF_T
8535#endif
8536EOF
8537
Guido van Rossumef2255b2000-03-10 22:30:29 +00008538# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008539ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008540if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008541
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008542else
Martin v. Löwis11437992002-04-12 09:54:03 +00008543
8544cat >>confdefs.h <<_ACEOF
8545#define mode_t int
8546_ACEOF
8547
8548fi
8549
Matthias Kloseb9621712010-04-24 17:59:49 +00008550ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008551if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008552
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008553else
Martin v. Löwis11437992002-04-12 09:54:03 +00008554
8555cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008557_ACEOF
8558
8559fi
8560
Matthias Kloseb9621712010-04-24 17:59:49 +00008561ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008562if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008563
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008564else
Martin v. Löwis11437992002-04-12 09:54:03 +00008565
8566cat >>confdefs.h <<_ACEOF
8567#define pid_t int
8568_ACEOF
8569
8570fi
8571
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008572
Martin v. Löwis11437992002-04-12 09:54:03 +00008573cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008574#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008575_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008576
Matthias Kloseb9621712010-04-24 17:59:49 +00008577ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008578if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008579
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008580else
Martin v. Löwis11437992002-04-12 09:54:03 +00008581
8582cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008584_ACEOF
8585
8586fi
8587
Matthias Kloseb9621712010-04-24 17:59:49 +00008588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8589$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008590if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008592else
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008594/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008595#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008596
8597_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008600 ac_cv_type_uid_t=yes
8601else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008602 ac_cv_type_uid_t=no
8603fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008604rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008605
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8608$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008609if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008610
Matthias Kloseb9621712010-04-24 17:59:49 +00008611$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008612
8613
Matthias Kloseb9621712010-04-24 17:59:49 +00008614$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008615
8616fi
8617
Mark Dickinson983bc162012-12-02 12:11:38 +00008618
Matthias Kloseb9621712010-04-24 17:59:49 +00008619ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008620if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621
Matthias Kloseb9621712010-04-24 17:59:49 +00008622$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008623
8624fi
8625
Stefan Krah1919b7e2012-03-21 18:25:23 +01008626ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8627if test "x$ac_cv_type___uint128_t" = xyes; then :
8628
8629$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8630
8631fi
8632
Jack Jansendd19cf82001-12-06 22:36:17 +00008633
Michael W. Hudson54241132001-12-07 15:38:26 +00008634# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008635# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636# The cast to long int works around a bug in the HP C Compiler
8637# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8638# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8639# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8641$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008642if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008644else
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 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 +00008646
Martin v. Löwis11437992002-04-12 09:54:03 +00008647else
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 if test "$ac_cv_type_int" = yes; then
8649 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008651as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008652See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653 else
8654 ac_cv_sizeof_int=0
8655 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008657
Martin v. Löwis11437992002-04-12 09:54:03 +00008658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8660$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661
8662
8663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008665#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008666_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008667
8668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669# The cast to long int works around a bug in the HP C Compiler
8670# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8671# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8672# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8674$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008675if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008677else
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 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 +00008679
Martin v. Löwis11437992002-04-12 09:54:03 +00008680else
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 if test "$ac_cv_type_long" = yes; then
8682 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008684as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008685See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686 else
8687 ac_cv_sizeof_long=0
8688 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690
Martin v. Löwis11437992002-04-12 09:54:03 +00008691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8693$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694
8695
8696
Martin v. Löwis11437992002-04-12 09:54:03 +00008697cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008698#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008699_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008700
8701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702# The cast to long int works around a bug in the HP C Compiler
8703# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8704# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8705# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8707$as_echo_n "checking size of long long... " >&6; }
8708if ${ac_cv_sizeof_long_long+:} false; then :
8709 $as_echo_n "(cached) " >&6
8710else
8711 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8712
8713else
8714 if test "$ac_cv_type_long_long" = yes; then
8715 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8716$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8717as_fn_error 77 "cannot compute sizeof (long long)
8718See \`config.log' for more details" "$LINENO" 5; }
8719 else
8720 ac_cv_sizeof_long_long=0
8721 fi
8722fi
8723
8724fi
8725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8726$as_echo "$ac_cv_sizeof_long_long" >&6; }
8727
8728
8729
8730cat >>confdefs.h <<_ACEOF
8731#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8732_ACEOF
8733
8734
8735# The cast to long int works around a bug in the HP C Compiler
8736# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8737# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8738# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8740$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008741if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 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 +00008745
Martin v. Löwis11437992002-04-12 09:54:03 +00008746else
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 if test "$ac_cv_type_void_p" = yes; then
8748 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008750as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008751See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752 else
8753 ac_cv_sizeof_void_p=0
8754 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008756
Martin v. Löwis11437992002-04-12 09:54:03 +00008757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8759$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008760
8761
8762
Martin v. Löwis11437992002-04-12 09:54:03 +00008763cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008764#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008765_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008766
8767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008768# The cast to long int works around a bug in the HP C Compiler
8769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8771# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8773$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008774if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008776else
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 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 +00008778
Martin v. Löwis11437992002-04-12 09:54:03 +00008779else
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 if test "$ac_cv_type_short" = yes; then
8781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008783as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008784See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008785 else
8786 ac_cv_sizeof_short=0
8787 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008789
Martin v. Löwis11437992002-04-12 09:54:03 +00008790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8792$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793
8794
8795
Martin v. Löwis11437992002-04-12 09:54:03 +00008796cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008797#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008798_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008799
8800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801# The cast to long int works around a bug in the HP C Compiler
8802# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8803# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8804# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8806$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008807if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008809else
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 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 +00008811
Martin v. Löwis11437992002-04-12 09:54:03 +00008812else
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 if test "$ac_cv_type_float" = yes; then
8814 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008816as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008817See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008818 else
8819 ac_cv_sizeof_float=0
8820 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822
Martin v. Löwis11437992002-04-12 09:54:03 +00008823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8825$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826
8827
8828
Martin v. Löwis11437992002-04-12 09:54:03 +00008829cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008830#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008831_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008832
8833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834# The cast to long int works around a bug in the HP C Compiler
8835# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8836# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8837# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8839$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008840if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008841 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008842else
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 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 +00008844
Martin v. Löwis11437992002-04-12 09:54:03 +00008845else
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 if test "$ac_cv_type_double" = yes; then
8847 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008849as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008850See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 else
8852 ac_cv_sizeof_double=0
8853 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008855
Martin v. Löwis11437992002-04-12 09:54:03 +00008856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8858$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008859
8860
8861
Martin v. Löwis11437992002-04-12 09:54:03 +00008862cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008863#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008864_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008865
8866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008867# The cast to long int works around a bug in the HP C Compiler
8868# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8869# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8870# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8872$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008873if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008875else
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 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 +00008877
Martin v. Löwis11437992002-04-12 09:54:03 +00008878else
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 if test "$ac_cv_type_fpos_t" = yes; then
8880 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008882as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008883See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884 else
8885 ac_cv_sizeof_fpos_t=0
8886 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008888
Martin v. Löwis11437992002-04-12 09:54:03 +00008889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8891$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008892
8893
8894
Martin v. Löwis11437992002-04-12 09:54:03 +00008895cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008896#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008897_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008898
Michael W. Hudson54241132001-12-07 15:38:26 +00008899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900# The cast to long int works around a bug in the HP C Compiler
8901# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8902# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8903# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8905$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008906if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008908else
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 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 +00008910
Martin v. Löwis18e16552006-02-15 17:27:45 +00008911else
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 if test "$ac_cv_type_size_t" = yes; then
8913 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8914$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008915as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008916See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917 else
8918 ac_cv_sizeof_size_t=0
8919 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921
Martin v. Löwis18e16552006-02-15 17:27:45 +00008922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8924$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925
8926
8927
Martin v. Löwis18e16552006-02-15 17:27:45 +00008928cat >>confdefs.h <<_ACEOF
8929#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8930_ACEOF
8931
8932
Christian Heimes400adb02008-02-01 08:12:03 +00008933# The cast to long int works around a bug in the HP C Compiler
8934# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8935# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8936# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8938$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008939if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008941else
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 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 +00008943
Christian Heimes400adb02008-02-01 08:12:03 +00008944else
Matthias Kloseb9621712010-04-24 17:59:49 +00008945 if test "$ac_cv_type_pid_t" = yes; then
8946 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008948as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008949See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008950 else
8951 ac_cv_sizeof_pid_t=0
8952 fi
8953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008954
Christian Heimes400adb02008-02-01 08:12:03 +00008955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8957$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008958
8959
8960
8961cat >>confdefs.h <<_ACEOF
8962#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8963_ACEOF
8964
8965
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008966# The cast to long int works around a bug in the HP C Compiler
8967# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8968# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8969# This bug is HP SR number 8606223364.
8970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8971$as_echo_n "checking size of uintptr_t... " >&6; }
8972if ${ac_cv_sizeof_uintptr_t+:} false; then :
8973 $as_echo_n "(cached) " >&6
8974else
8975 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8976
8977else
8978 if test "$ac_cv_type_uintptr_t" = yes; then
8979 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8980$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8981as_fn_error 77 "cannot compute sizeof (uintptr_t)
8982See \`config.log' for more details" "$LINENO" 5; }
8983 else
8984 ac_cv_sizeof_uintptr_t=0
8985 fi
8986fi
8987
8988fi
8989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8990$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8991
8992
8993
8994cat >>confdefs.h <<_ACEOF
8995#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8996_ACEOF
8997
8998
Michael W. Hudson54241132001-12-07 15:38:26 +00008999
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009000
Eitan Adler3055c942018-05-15 22:58:09 -07009001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
9002$as_echo_n "checking for long double... " >&6; }
9003if ${ac_cv_type_long_double+:} false; then :
9004 $as_echo_n "(cached) " >&6
9005else
9006 if test "$GCC" = yes; then
9007 ac_cv_type_long_double=yes
9008 else
9009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9010/* end confdefs.h. */
9011/* The Stardent Vistra knows sizeof (long double), but does
9012 not support it. */
9013 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009014int
9015main ()
9016{
Eitan Adler3055c942018-05-15 22:58:09 -07009017static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
9018 sizeof (double) <= sizeof (long double))];
9019test_array [0] = 0;
9020return test_array [0];
9021
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009022 ;
9023 return 0;
9024}
9025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009026if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07009027 ac_cv_type_long_double=yes
9028else
9029 ac_cv_type_long_double=no
9030fi
9031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9032 fi
9033fi
9034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
9035$as_echo "$ac_cv_type_long_double" >&6; }
9036 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009037
Matthias Kloseb9621712010-04-24 17:59:49 +00009038$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009039
Eitan Adler3055c942018-05-15 22:58:09 -07009040 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009041
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009042# The cast to long int works around a bug in the HP C Compiler
9043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9045# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
9047$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009048if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009050else
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 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 +00009052
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009053else
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 if test "$ac_cv_type_long_double" = yes; then
9055 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9056$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009057as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009058See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009059 else
9060 ac_cv_sizeof_long_double=0
9061 fi
9062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009063
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9066$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009067
9068
9069
9070cat >>confdefs.h <<_ACEOF
9071#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9072_ACEOF
9073
9074
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009075
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009076# The cast to long int works around a bug in the HP C Compiler
9077# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9078# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9079# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9081$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009082if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00009084else
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 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 +00009086
Thomas Woutersb2137042007-02-01 18:02:27 +00009087else
Matthias Kloseb9621712010-04-24 17:59:49 +00009088 if test "$ac_cv_type__Bool" = yes; then
9089 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009091as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009092See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009093 else
9094 ac_cv_sizeof__Bool=0
9095 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009097
Thomas Woutersb2137042007-02-01 18:02:27 +00009098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9100$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009101
9102
9103
Thomas Woutersb2137042007-02-01 18:02:27 +00009104cat >>confdefs.h <<_ACEOF
9105#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9106_ACEOF
9107
9108
Thomas Woutersb2137042007-02-01 18:02:27 +00009109
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009110# The cast to long int works around a bug in the HP C Compiler
9111# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9112# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9113# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9115$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009116if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009117 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009118else
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009120#ifdef HAVE_SYS_TYPES_H
9121#include <sys/types.h>
9122#endif
9123
Matthias Kloseb9621712010-04-24 17:59:49 +00009124"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009125
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009126else
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 if test "$ac_cv_type_off_t" = yes; then
9128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009130as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009131See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009132 else
9133 ac_cv_sizeof_off_t=0
9134 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009136
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9139$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009141
9142
Martin v. Löwis11437992002-04-12 09:54:03 +00009143cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009144#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009145_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009146
Michael W. Hudson54241132001-12-07 15:38:26 +00009147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009148
Matthias Kloseb9621712010-04-24 17:59:49 +00009149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9150$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009151if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009152 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009153
Matthias Kloseb9621712010-04-24 17:59:49 +00009154$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009155
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9157$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009158else
Matthias Kloseb9621712010-04-24 17:59:49 +00009159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9160$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009161fi
9162
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009163# The cast to long int works around a bug in the HP C Compiler
9164# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9165# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9166# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9168$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009169if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009170 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009171else
Matthias Kloseb9621712010-04-24 17:59:49 +00009172 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009173#ifdef HAVE_SYS_TYPES_H
9174#include <sys/types.h>
9175#endif
9176#ifdef HAVE_TIME_H
9177#include <time.h>
9178#endif
9179
Matthias Kloseb9621712010-04-24 17:59:49 +00009180"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009182else
Matthias Kloseb9621712010-04-24 17:59:49 +00009183 if test "$ac_cv_type_time_t" = yes; then
9184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009186as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009187See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009188 else
9189 ac_cv_sizeof_time_t=0
9190 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009192
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9195$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009197
9198
Martin v. Löwis11437992002-04-12 09:54:03 +00009199cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009200#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009201_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009202
Michael W. Hudson54241132001-12-07 15:38:26 +00009203
9204
Trent Mick635f6fb2000-08-23 21:33:05 +00009205# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009206ac_save_cc="$CC"
9207if test "$ac_cv_kpthread" = "yes"
9208then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009209elif test "$ac_cv_kthread" = "yes"
9210then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009211elif test "$ac_cv_pthread" = "yes"
9212then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009213fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009214
Matthias Kloseb9621712010-04-24 17:59:49 +00009215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9216$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009217have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009219/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009220
9221 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009222int
9223main ()
9224{
Guido van Rossum12580492000-09-24 16:47:19 +00009225pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 ;
9227 return 0;
9228}
Matthias Kloseb159a552010-04-25 21:00:44 +00009229
Martin v. Löwis11437992002-04-12 09:54:03 +00009230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009231if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009232 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9236$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009237if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009238 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009239# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9240# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9241# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9243$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009244if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009245 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009246else
Matthias Kloseb9621712010-04-24 17:59:49 +00009247 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009248#ifdef HAVE_PTHREAD_H
9249#include <pthread.h>
9250#endif
9251
Matthias Kloseb9621712010-04-24 17:59:49 +00009252"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009253
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009254else
Matthias Kloseb9621712010-04-24 17:59:49 +00009255 if test "$ac_cv_type_pthread_t" = yes; then
9256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009258as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009259See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009260 else
9261 ac_cv_sizeof_pthread_t=0
9262 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009264
Trent Mick635f6fb2000-08-23 21:33:05 +00009265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9267$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009269
9270
Martin v. Löwis11437992002-04-12 09:54:03 +00009271cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009272#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009273_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009275
Trent Mick635f6fb2000-08-23 21:33:05 +00009276fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009277
9278# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9279# This checking will be unnecessary after removing deprecated TLS API.
9280# The cast to long int works around a bug in the HP C Compiler
9281# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9282# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9283# This bug is HP SR number 8606223364.
9284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9285$as_echo_n "checking size of pthread_key_t... " >&6; }
9286if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9287 $as_echo_n "(cached) " >&6
9288else
9289 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9290"; then :
9291
9292else
9293 if test "$ac_cv_type_pthread_key_t" = yes; then
9294 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9296as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9297See \`config.log' for more details" "$LINENO" 5; }
9298 else
9299 ac_cv_sizeof_pthread_key_t=0
9300 fi
9301fi
9302
9303fi
9304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9305$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9306
9307
9308
9309cat >>confdefs.h <<_ACEOF
9310#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9311_ACEOF
9312
9313
9314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9315$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9316if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9318/* end confdefs.h. */
9319#include <pthread.h>
9320int
9321main ()
9322{
9323pthread_key_t k; k * 1;
9324 ;
9325 return 0;
9326}
9327_ACEOF
9328if ac_fn_c_try_compile "$LINENO"; then :
9329 ac_pthread_key_t_is_arithmetic_type=yes
9330else
9331 ac_pthread_key_t_is_arithmetic_type=no
9332
9333fi
9334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9336$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9337 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9338
9339$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9340
9341 fi
9342else
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9344$as_echo "no" >&6; }
9345fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009346CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009347
Michael W. Hudson54241132001-12-07 15:38:26 +00009348
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009349case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009350 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009351 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9352 ;;
9353 Darwin/*)
9354 OTHER_LIBTOOL_OPT=""
9355 ;;
9356esac
9357
9358
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009359
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009360case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009361 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009362 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9363 if test "${enable_universalsdk}"; then
9364 :
9365 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009366 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009367 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009368 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009369 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009370 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009371 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009372 if test ${gcc_version} '<' 4.0
9373 then
9374 LIBTOOL_CRUFT="-lcc_dynamic"
9375 else
9376 LIBTOOL_CRUFT=""
9377 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009378 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009379 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009380else
Matthias Kloseb9621712010-04-24 17:59:49 +00009381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009382/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009383
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009384 #include <unistd.h>
9385 int main(int argc, char*argv[])
9386 {
9387 if (sizeof(long) == 4) {
9388 return 0;
9389 } else {
9390 return 1;
9391 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009392 }
9393
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009395if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009396 ac_osx_32bit=yes
9397else
Matthias Kloseb9621712010-04-24 17:59:49 +00009398 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009400rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9401 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009402fi
9403
9404
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009405 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009406 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009407 i386)
9408 MACOSX_DEFAULT_ARCH="i386"
9409 ;;
9410 ppc)
9411 MACOSX_DEFAULT_ARCH="ppc"
9412 ;;
9413 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009414 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009415 ;;
9416 esac
9417 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009418 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009419 i386)
9420 MACOSX_DEFAULT_ARCH="x86_64"
9421 ;;
9422 ppc)
9423 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +01009424 ;;
9425 arm64)
9426 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009427 ;;
9428 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009429 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009430 ;;
9431 esac
9432
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009433 fi
9434
9435 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009436 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009437 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009438esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9440$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009441if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009442then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009443 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009445 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009448
Matthias Kloseb9621712010-04-24 17:59:49 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9450$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009451 if test $enable_shared = "yes"
9452 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009453 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 +00009454 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009455else
Matthias Kloseb9621712010-04-24 17:59:49 +00009456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9457$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009458fi
9459
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9461$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009462case $ac_sys_system/$ac_sys_release in
9463 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009464
Matthias Kloseb9621712010-04-24 17:59:49 +00009465$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
Matthias Kloseb9621712010-04-24 17:59:49 +00009467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9468$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009469 ;;
9470 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9472$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009473 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009474esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009475
Guido van Rossum0a516c91994-09-12 10:58:40 +00009476# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009477
Michael W. Hudson54241132001-12-07 15:38:26 +00009478
9479
9480
9481
Benjamin Peterson99f03762010-04-11 22:15:28 +00009482
Thomas Wouters477c8d52006-05-27 19:21:47 +00009483
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009484# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9485# -- usually .so, .sl on HP-UX, .dll on Cygwin
9486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9487$as_echo_n "checking the extension of shared libraries... " >&6; }
9488if test -z "$SHLIB_SUFFIX"; then
9489 case $ac_sys_system in
9490 hp*|HP*)
9491 case `uname -m` in
9492 ia64) SHLIB_SUFFIX=.so;;
9493 *) SHLIB_SUFFIX=.sl;;
9494 esac
9495 ;;
9496 CYGWIN*) SHLIB_SUFFIX=.dll;;
9497 *) SHLIB_SUFFIX=.so;;
9498 esac
9499fi
9500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9501$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009502
Guido van Rossum0a516c91994-09-12 10:58:40 +00009503# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009504# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009505# (Shared libraries in this instance are shared modules to be loaded into
9506# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9508$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009509if test -z "$LDSHARED"
9510then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009511 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009512 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009513 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009514 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009515 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009517 if test "$GCC" = "yes" ; then
9518 LDSHARED='$(CC) -shared'
9519 LDCXXSHARED='$(CXX) -shared'
9520 else
9521 LDSHARED='$(CC) -G'
9522 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009523 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009524 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009525 if test "$GCC" = "yes" ; then
9526 LDSHARED='$(CC) -shared'
9527 LDCXXSHARED='$(CXX) -shared'
9528 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009529 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009530 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009531 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009532 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009533 LDSHARED='$(CC) -bundle'
9534 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009535 if test "$enable_framework" ; then
9536 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009537 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9538 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009539 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009540 else
9541 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009542 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009543 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009544 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009545 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009546 LDSHARED='$(CC) -bundle'
9547 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009548 if test "$enable_framework" ; then
9549 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009550 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9551 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009552 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009553 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009554 # No framework, use the Python app as bundle-loader
9555 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009556 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009557 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009558 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009559 Darwin/*)
9560 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9561 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009562
Ned Deily36820b62014-06-25 13:44:22 -07009563 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9564 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9565 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9566 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9567 if test ${dep_target_major} -eq 10 && \
9568 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009569 then
Ned Deily36820b62014-06-25 13:44:22 -07009570 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009571 LDSHARED='$(CC) -bundle'
9572 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009573 if test "$enable_framework" ; then
9574 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009575 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9576 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009577 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009578 else
9579 # No framework, use the Python app as bundle-loader
9580 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9581 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009582 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009583 fi
Ned Deily36820b62014-06-25 13:44:22 -07009584 else
9585 # building for OS X 10.3 and later
9586 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9587 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9588 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009589 fi
9590 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009591 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009592 LDSHARED='$(CC) -shared'
9593 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009594 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009595 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009596 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009597 LDSHARED='$(CC) -shared'
9598 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009599 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009600 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009601 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009602 OpenBSD*)
9603 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9604 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009605 LDSHARED='$(CC) -shared $(CCSHARED)'
9606 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009607 else
9608 case `uname -r` in
9609 [01].* | 2.[0-7] | 2.[0-7].*)
9610 LDSHARED="ld -Bshareable ${LDFLAGS}"
9611 ;;
9612 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009613 LDSHARED='$(CC) -shared $(CCSHARED)'
9614 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009615 ;;
9616 esac
9617 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009618 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009619 LDSHARED='$(CC) -shared'
9620 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009621 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009622 if test "$GCC" = "yes" ; then
9623 LDSHARED='$(CC) -shared'
9624 LDCXXSHARED='$(CXX) -shared'
9625 else
9626 LDSHARED='$(CC) -G'
9627 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009628 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009629 SCO_SV*)
9630 LDSHARED='$(CC) -Wl,-G,-Bexport'
9631 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9632 CYGWIN*)
9633 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9634 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009635 *) LDSHARED="ld";;
9636 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9639$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009640LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009641BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009642# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009643# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9645$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009646if test -z "$CCSHARED"
9647then
Guido van Rossum07397971997-04-29 21:49:50 +00009648 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009649 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009650 then CCSHARED="-fPIC";
9651 elif test `uname -p` = sparc;
9652 then CCSHARED="-xcode=pic32";
9653 else CCSHARED="-Kpic";
9654 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009655 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009656 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009657 else CCSHARED="+z";
9658 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009659 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009660 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009661 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009662 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009663 if test "$GCC" = "yes"
9664 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009665 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009666 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009667 SCO_SV*)
9668 if test "$GCC" = "yes"
9669 then CCSHARED="-fPIC"
9670 else CCSHARED="-Kpic -belf"
9671 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009672 VxWorks*)
9673 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009674 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9677$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009678# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009679# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9681$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009682if test -z "$LINKFORSHARED"
9683then
Guido van Rossum07397971997-04-29 21:49:50 +00009684 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009685 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009686 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009687 LINKFORSHARED="-Wl,-E -Wl,+s";;
9688# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009689 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009690 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009691 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009693 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009694
9695 # Issue #18075: the default maximum stack size (8MBytes) is too
9696 # small for the default recursion limit. Increase the stack size
9697 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009698 # Note: This matches the value of THREAD_STACK_SIZE in
9699 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009700 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9701
Jack Jansene578a632001-08-15 01:27:14 +00009702 if test "$enable_framework"
9703 then
Jack Jansenda49e192005-01-07 13:08:22 +00009704 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009705 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009706 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009707 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009708 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009709 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009710 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009711 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9712 then
9713 LINKFORSHARED="-Wl,--export-dynamic"
9714 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009715 SunOS/5*) case $CC in
9716 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009717 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009718 then
9719 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009720 fi;;
9721 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009722 CYGWIN*)
9723 if test $enable_shared = "no"
9724 then
9725 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9726 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009727 QNX*)
9728 # -Wl,-E causes the symbols to be added to the dynamic
9729 # symbol table so that they can be found when a module
9730 # is loaded. -N 2048K causes the stack size to be set
9731 # to 2048 kilobytes so that the stack doesn't overflow
9732 # when running test_compile.py.
9733 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009734 VxWorks*)
pxinwrc1174262020-12-15 06:14:43 +08009735 LINKFORSHARED='-Wl,-export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009736 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9739$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009740
Michael W. Hudson54241132001-12-07 15:38:26 +00009741
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009742
Matthias Kloseb9621712010-04-24 17:59:49 +00009743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9744$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009745if test ! "$LIBRARY" = "$LDLIBRARY"
9746then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009747 case $ac_sys_system in
9748 CYGWIN*)
9749 # Cygwin needs CCSHARED when building extension DLLs
9750 # but not when building the interpreter DLL.
9751 CFLAGSFORSHARED='';;
9752 *)
9753 CFLAGSFORSHARED='$(CCSHARED)'
9754 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9757$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009758
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009759# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9760# library (with --enable-shared).
9761# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009762# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9763# if it is not required, since it creates a dependency of the shared library
9764# to LIBS. This, in turn, means that applications linking the shared libpython
9765# don't need to link LIBS explicitly. The default should be only changed
9766# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009767
Matthias Kloseb9621712010-04-24 17:59:49 +00009768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9769$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009770case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009771 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009772 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009773esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9775$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009776
9777
Guido van Rossum627b2d71993-12-24 10:39:16 +00009778# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9780$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009781if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009782 $as_echo_n "(cached) " >&6
9783else
9784 ac_check_lib_save_LIBS=$LIBS
9785LIBS="-lsendfile $LIBS"
9786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9787/* end confdefs.h. */
9788
9789/* Override any GCC internal prototype to avoid an error.
9790 Use char because int might match the return type of a GCC
9791 builtin and then its argument prototype would still apply. */
9792#ifdef __cplusplus
9793extern "C"
9794#endif
9795char sendfile ();
9796int
9797main ()
9798{
9799return sendfile ();
9800 ;
9801 return 0;
9802}
9803_ACEOF
9804if ac_fn_c_try_link "$LINENO"; then :
9805 ac_cv_lib_sendfile_sendfile=yes
9806else
9807 ac_cv_lib_sendfile_sendfile=no
9808fi
9809rm -f core conftest.err conftest.$ac_objext \
9810 conftest$ac_exeext conftest.$ac_ext
9811LIBS=$ac_check_lib_save_LIBS
9812fi
9813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9814$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009815if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009816 cat >>confdefs.h <<_ACEOF
9817#define HAVE_LIBSENDFILE 1
9818_ACEOF
9819
9820 LIBS="-lsendfile $LIBS"
9821
9822fi
9823
Matthias Kloseb9621712010-04-24 17:59:49 +00009824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9825$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009826if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009828else
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009830LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834/* Override any GCC internal prototype to avoid an error.
9835 Use char because int might match the return type of a GCC
9836 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837#ifdef __cplusplus
9838extern "C"
9839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009840char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009841int
9842main ()
9843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 ;
9846 return 0;
9847}
9848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009849if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009851else
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009854rm -f core conftest.err conftest.$ac_objext \
9855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009856LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9859$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009860if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 cat >>confdefs.h <<_ACEOF
9862#define HAVE_LIBDL 1
9863_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009864
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009865 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009866
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009867fi
9868 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9870$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009871if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009873else
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009875LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879/* Override any GCC internal prototype to avoid an error.
9880 Use char because int might match the return type of a GCC
9881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882#ifdef __cplusplus
9883extern "C"
9884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009885char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009886int
9887main ()
9888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 ;
9891 return 0;
9892}
9893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009896else
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009899rm -f core conftest.err conftest.$ac_objext \
9900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009901LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9904$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009905if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009906 cat >>confdefs.h <<_ACEOF
9907#define HAVE_LIBDLD 1
9908_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009909
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009910 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009911
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009912fi
9913 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009914
Michael Felt0d3ccb42017-12-30 22:39:20 +01009915# checks for uuid.h location
9916for ac_header in uuid/uuid.h uuid.h
9917do :
9918 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9919ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9920if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9921 cat >>confdefs.h <<_ACEOF
9922#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9923_ACEOF
9924
9925fi
9926
9927done
9928
9929
Berker Peksag9a10ff42017-11-08 23:09:16 +03009930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9931$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9933/* end confdefs.h. */
9934#include <uuid/uuid.h>
9935int
9936main ()
9937{
9938
9939#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009940void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009941#endif
9942
9943 ;
9944 return 0;
9945}
9946_ACEOF
9947if ac_fn_c_try_compile "$LINENO"; then :
9948
9949$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9950
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9952$as_echo "yes" >&6; }
9953else
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9955$as_echo "no" >&6; }
9956
9957fi
9958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9959
Michael Felt0d3ccb42017-12-30 22:39:20 +01009960# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009961# FreeBSD and OpenBSD provides support as well
9962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9963$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9965/* end confdefs.h. */
9966#include <uuid.h>
9967int
9968main ()
9969{
9970
9971#ifndef uuid_create
9972void *x = uuid_create
9973#endif
9974
9975 ;
9976 return 0;
9977}
9978_ACEOF
9979if ac_fn_c_try_compile "$LINENO"; then :
9980
9981$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9982
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9984$as_echo "yes" >&6; }
9985else
9986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9987$as_echo "no" >&6; }
9988
9989fi
9990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9991
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009992# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9993# stream in big-endian byte-order
9994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9995$as_echo_n "checking for uuid_enc_be... " >&6; }
9996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9997/* end confdefs.h. */
9998#include <uuid.h>
9999int
10000main ()
10001{
10002
10003#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -040010004void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +030010005#endif
10006
10007 ;
10008 return 0;
10009}
10010_ACEOF
10011if ac_fn_c_try_compile "$LINENO"; then :
10012
10013$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
10014
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10016$as_echo "yes" >&6; }
10017else
10018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10019$as_echo "no" >&6; }
10020
10021fi
10022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10023
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010024# 'Real Time' functions on Solaris
10025# posix4 on Solaris 2.6
10026# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +030010027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010028$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010029if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010031else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010032 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +000010033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010036/* Override any GCC internal prototype to avoid an error.
10037 Use char because int might match the return type of a GCC
10038 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010039#ifdef __cplusplus
10040extern "C"
10041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010042char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010043int
10044main ()
10045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010047 ;
10048 return 0;
10049}
10050_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010051for ac_lib in '' pthread rt posix4; do
10052 if test -z "$ac_lib"; then
10053 ac_res="none required"
10054 else
10055 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010056 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010059 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000010060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010061rm -f core conftest.err conftest.$ac_objext \
10062 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +020010063 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066done
Victor Stinnere0be4232011-10-25 13:06:09 +020010067if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069else
10070 ac_cv_search_sem_init=no
10071fi
10072rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010073LIBS=$ac_func_search_save_LIBS
10074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10076$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010077ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +000010078if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010080
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010081fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010082
Martin v. Löwis519adae2003-09-20 10:47:47 +000010083
Martin v. Löwis19d17342003-06-14 21:03:05 +000010084# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +000010085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10086$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010087if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010088 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000010089else
10090 ac_check_lib_save_LIBS=$LIBS
10091LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010093/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095/* Override any GCC internal prototype to avoid an error.
10096 Use char because int might match the return type of a GCC
10097 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010098#ifdef __cplusplus
10099extern "C"
10100#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010101char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010102int
10103main ()
10104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010105return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010106 ;
10107 return 0;
10108}
10109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010110if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010111 ac_cv_lib_intl_textdomain=yes
10112else
Matthias Kloseb9621712010-04-24 17:59:49 +000010113 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010115rm -f core conftest.err conftest.$ac_objext \
10116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010117LIBS=$ac_check_lib_save_LIBS
10118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10120$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010121if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010124
Brett Cannonc6d936e2009-06-07 20:09:53 +000010125 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010126fi
10127
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010128
10129# checks for system dependent C++ extensions support
10130case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10132$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010134/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010135
Georg Brandl59e87bd2011-02-15 19:48:59 +000010136 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010137int
10138main ()
10139{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010140loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ;
10142 return 0;
10143}
Matthias Kloseb159a552010-04-25 21:00:44 +000010144
Martin v. Löwis11437992002-04-12 09:54:03 +000010145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010146if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010147
Matthias Kloseb159a552010-04-25 21:00:44 +000010148
Matthias Kloseb9621712010-04-24 17:59:49 +000010149$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010150
Matthias Kloseb159a552010-04-25 21:00:44 +000010151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010152$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010153
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010154else
Matthias Kloseb159a552010-04-25 21:00:44 +000010155
10156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010157$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010158
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010160rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010161 conftest$ac_exeext conftest.$ac_ext
10162# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10163# of the AIX system used to build/package Python executable. This tag serves
10164# as a baseline for bdist module packages
10165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10166$as_echo_n "checking for the system builddate... " >&6; }
10167 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10168
10169cat >>confdefs.h <<_ACEOF
10170#define AIX_BUILDDATE $AIX_BUILDDATE
10171_ACEOF
10172
10173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10174$as_echo "$AIX_BUILDDATE" >&6; }
10175 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010176 *) ;;
10177esac
10178
Christian Heimes985ecdc2013-11-20 11:46:18 +010010179# check for systems that require aligned memory access
10180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10181$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010182if ${ac_cv_aligned_required+:} false; then :
10183 $as_echo_n "(cached) " >&6
10184else
10185 if test "$cross_compiling" = yes; then :
10186 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010187else
10188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10189/* end confdefs.h. */
10190
10191int main()
10192{
10193 char s[16];
10194 int i, *p1, *p2;
10195 for (i=0; i < 16; i++)
10196 s[i] = i;
10197 p1 = (int*)(s+1);
10198 p2 = (int*)(s+2);
10199 if (*p1 == *p2)
10200 return 1;
10201 return 0;
10202}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010203_ACEOF
10204if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010205 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010206else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010207 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010208fi
10209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10210 conftest.$ac_objext conftest.beam conftest.$ac_ext
10211fi
10212
10213
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010214fi
10215
10216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10217$as_echo "$ac_cv_aligned_required" >&6; }
10218if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010219
10220$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10221
10222fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010223
10224# str, bytes and memoryview hash algorithm
10225
10226
10227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10228$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10229
10230# Check whether --with-hash_algorithm was given.
10231if test "${with_hash_algorithm+set}" = set; then :
10232 withval=$with_hash_algorithm;
10233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10234$as_echo "$withval" >&6; }
10235case "$withval" in
10236 siphash24)
10237 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10238
10239 ;;
10240 fnv)
10241 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10242
10243 ;;
10244 *)
10245 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10246 ;;
10247esac
10248
10249else
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10251$as_echo "default" >&6; }
10252fi
10253
10254
Paul Ganssle62972d92020-05-16 04:20:06 -040010255validate_tzpath() {
10256 # Checks that each element of hte path is an absolute path
10257 if test -z "$1"; then
10258 # Empty string is allowed: it indicates no system TZPATH
10259 return 0
10260 fi
10261
10262 # Bad paths are those that don't start with /
Paul Ganssle0f664982021-01-12 13:17:52 -050010263 if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
Paul Ganssle62972d92020-05-16 04:20:06 -040010264 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10265 return 1;
10266 fi
10267}
10268
10269TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10271$as_echo_n "checking for --with-tzpath... " >&6; }
10272
10273# Check whether --with-tzpath was given.
10274if test "${with_tzpath+set}" = set; then :
10275 withval=$with_tzpath;
10276case "$withval" in
10277 yes)
10278 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10279 ;;
10280 *)
10281 validate_tzpath "$withval"
10282 TZPATH="$withval"
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10284$as_echo "\"$withval\"" >&6; }
10285 ;;
10286esac
10287
10288else
10289 validate_tzpath "$TZPATH"
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10291$as_echo "\"$TZPATH\"" >&6; }
10292fi
10293
10294
10295
Charles-François Natalid30b0222014-05-08 23:08:51 +010010296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10297$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10298
10299# Check whether --with-address_sanitizer was given.
10300if test "${with_address_sanitizer+set}" = set; then :
10301 withval=$with_address_sanitizer;
10302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10303$as_echo "$withval" >&6; }
10304BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10305LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010306# ASan works by controlling memory allocation, our own malloc interferes.
10307with_pymalloc="no"
10308
10309else
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10316$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10317
10318# Check whether --with-memory_sanitizer was given.
10319if test "${with_memory_sanitizer+set}" = set; then :
10320 withval=$with_memory_sanitizer;
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10322$as_echo "$withval" >&6; }
10323BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10324LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10325# MSan works by controlling memory allocation, our own malloc interferes.
10326with_pymalloc="no"
10327
10328else
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10330$as_echo "no" >&6; }
10331fi
10332
10333
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10335$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10336
10337# Check whether --with-undefined_behavior_sanitizer was given.
10338if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10339 withval=$with_undefined_behavior_sanitizer;
10340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10341$as_echo "$withval" >&6; }
10342BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10343LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010344
10345else
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347$as_echo "no" >&6; }
10348fi
10349
10350
Guido van Rossum70c7f481998-03-26 18:44:10 +000010351# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10353$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010354if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010356else
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010358LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010362/* Override any GCC internal prototype to avoid an error.
10363 Use char because int might match the return type of a GCC
10364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010365#ifdef __cplusplus
10366extern "C"
10367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010368char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010369int
10370main ()
10371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 ;
10374 return 0;
10375}
10376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010377if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010379else
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010382rm -f core conftest.err conftest.$ac_objext \
10383 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010384LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10387$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010388if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010389 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010390fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010391 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10393$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010394if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010396else
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010398LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010402/* Override any GCC internal prototype to avoid an error.
10403 Use char because int might match the return type of a GCC
10404 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010405#ifdef __cplusplus
10406extern "C"
10407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010408char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010409int
10410main ()
10411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010412return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 ;
10414 return 0;
10415}
10416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010417if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010419else
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010422rm -f core conftest.err conftest.$ac_objext \
10423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010424LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10427$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010428if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010429 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010430fi
10431 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010432
Matthias Kloseb9621712010-04-24 17:59:49 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10434$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010436# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010437if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10440$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010441LIBS="$withval $LIBS"
10442
10443else
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010446fi
10447
Guido van Rossum7f43da71994-08-01 12:15:30 +000010448
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010449
10450
10451
10452
10453
10454
Victor Stinnerb477d192020-01-22 22:48:16 +010010455
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010456if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10457 if test -n "$ac_tool_prefix"; then
10458 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10459set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10461$as_echo_n "checking for $ac_word... " >&6; }
10462if ${ac_cv_path_PKG_CONFIG+:} false; then :
10463 $as_echo_n "(cached) " >&6
10464else
10465 case $PKG_CONFIG in
10466 [\\/]* | ?:[\\/]*)
10467 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10468 ;;
10469 *)
10470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10471for as_dir in $PATH
10472do
10473 IFS=$as_save_IFS
10474 test -z "$as_dir" && as_dir=.
10475 for ac_exec_ext in '' $ac_executable_extensions; do
10476 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10477 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10478 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10479 break 2
10480 fi
10481done
10482 done
10483IFS=$as_save_IFS
10484
10485 ;;
10486esac
10487fi
10488PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10489if test -n "$PKG_CONFIG"; then
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10491$as_echo "$PKG_CONFIG" >&6; }
10492else
10493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10494$as_echo "no" >&6; }
10495fi
10496
10497
10498fi
10499if test -z "$ac_cv_path_PKG_CONFIG"; then
10500 ac_pt_PKG_CONFIG=$PKG_CONFIG
10501 # Extract the first word of "pkg-config", so it can be a program name with args.
10502set dummy pkg-config; ac_word=$2
10503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10504$as_echo_n "checking for $ac_word... " >&6; }
10505if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10506 $as_echo_n "(cached) " >&6
10507else
10508 case $ac_pt_PKG_CONFIG in
10509 [\\/]* | ?:[\\/]*)
10510 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10511 ;;
10512 *)
10513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10514for as_dir in $PATH
10515do
10516 IFS=$as_save_IFS
10517 test -z "$as_dir" && as_dir=.
10518 for ac_exec_ext in '' $ac_executable_extensions; do
10519 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10520 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10521 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10522 break 2
10523 fi
10524done
10525 done
10526IFS=$as_save_IFS
10527
10528 ;;
10529esac
10530fi
10531ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10532if test -n "$ac_pt_PKG_CONFIG"; then
10533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10534$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10535else
10536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10537$as_echo "no" >&6; }
10538fi
10539
10540 if test "x$ac_pt_PKG_CONFIG" = x; then
10541 PKG_CONFIG=""
10542 else
10543 case $cross_compiling:$ac_tool_warned in
10544yes:)
10545{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10546$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10547ac_tool_warned=yes ;;
10548esac
10549 PKG_CONFIG=$ac_pt_PKG_CONFIG
10550 fi
10551else
10552 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10553fi
10554
10555fi
10556if test -n "$PKG_CONFIG"; then
10557 _pkg_min_version=0.9.0
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10559$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10560 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10562$as_echo "yes" >&6; }
10563 else
10564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10565$as_echo "no" >&6; }
10566 PKG_CONFIG=""
10567 fi
10568fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010569
10570# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10572$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010573
10574# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010575if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010576 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010577else
10578 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010579fi
10580
10581
Matthias Kloseb9621712010-04-24 17:59:49 +000010582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10583$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010584
10585# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10587$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010588
10589# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010590if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010591 withval=$with_system_ffi;
10592fi
10593
10594
Zachary Waref40d4dd2016-09-17 01:25:24 -050010595if test "$ac_sys_system" = "Darwin"
10596then
10597 case "$with_system_ffi" in
10598 "")
10599 with_system_ffi="no"
10600 ;;
10601 yes|no)
10602 ;;
10603 *)
10604 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10605 ;;
10606 esac
10607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10608$as_echo "$with_system_ffi" >&6; }
10609else
10610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10611$as_echo "yes" >&6; }
10612 if test "$with_system_ffi" != ""
10613 then
10614 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10615$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10616 fi
10617 with_system_ffi="yes"
10618fi
Zachary Ware935043d2016-09-09 17:01:21 -070010619
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010620if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010621 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10622else
10623 LIBFFI_INCLUDEDIR=""
10624fi
10625
10626
Stefan Krah60187b52012-03-23 19:06:27 +010010627# Check for use of the system libmpdec library
10628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10629$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10630
10631# Check whether --with-system_libmpdec was given.
10632if test "${with_system_libmpdec+set}" = set; then :
10633 withval=$with_system_libmpdec;
10634else
10635 with_system_libmpdec="no"
10636fi
10637
10638
10639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10640$as_echo "$with_system_libmpdec" >&6; }
10641
Stefan Krah815280e2020-02-29 19:43:42 +010010642# Check whether _decimal should use a coroutine-local or thread-local context
10643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10644$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10645
10646# Check whether --with-decimal_contextvar was given.
10647if test "${with_decimal_contextvar+set}" = set; then :
10648 withval=$with_decimal_contextvar;
10649else
10650 with_decimal_contextvar="yes"
10651fi
10652
10653
10654if test "$with_decimal_contextvar" != "no"
10655then
10656
10657$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10658
10659fi
10660
10661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10662$as_echo "$with_decimal_contextvar" >&6; }
10663
Benjamin Peterson076ed002010-10-31 17:11:02 +000010664# Check for support for loadable sqlite extensions
10665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10666$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10667# Check whether --enable-loadable-sqlite-extensions was given.
10668if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10669 enableval=$enable_loadable_sqlite_extensions;
10670else
10671 enable_loadable_sqlite_extensions="no"
10672fi
10673
10674
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10676$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10677
Ned Deilyd819b932013-09-06 01:07:05 -070010678# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10679
10680
10681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10682$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10683
10684# Check whether --with-tcltk-includes was given.
10685if test "${with_tcltk_includes+set}" = set; then :
10686 withval=$with_tcltk_includes;
10687else
10688 with_tcltk_includes="default"
10689fi
10690
10691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10692$as_echo "$with_tcltk_includes" >&6; }
10693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10694$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10695
10696# Check whether --with-tcltk-libs was given.
10697if test "${with_tcltk_libs+set}" = set; then :
10698 withval=$with_tcltk_libs;
10699else
10700 with_tcltk_libs="default"
10701fi
10702
10703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10704$as_echo "$with_tcltk_libs" >&6; }
10705if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10706then
10707 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10708 then
10709 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10710 fi
10711 TCLTK_INCLUDES=""
10712 TCLTK_LIBS=""
10713else
10714 TCLTK_INCLUDES="$with_tcltk_includes"
10715 TCLTK_LIBS="$with_tcltk_libs"
10716fi
10717
Matthias Klose55708cc2009-04-30 08:06:49 +000010718# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10720$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010721
10722# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010723if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010724 withval=$with_dbmliborder;
10725if test x$with_dbmliborder = xyes
10726then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010727as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010728else
10729 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10730 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10731 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010732 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010733 fi
10734 done
10735fi
10736fi
10737
Matthias Kloseb9621712010-04-24 17:59:49 +000010738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10739$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010740
Martin v. Löwis11437992002-04-12 09:54:03 +000010741# Templates for things AC_DEFINEd more than once.
10742# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010743
10744
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010745if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010746then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010747 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010749
10750 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010751 if test "$ac_sys_system" = "SunOS"; then
10752 CFLAGS="$CFLAGS -D_REENTRANT"
10753 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010754elif test "$ac_cv_kpthread" = "yes"
10755then
10756 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010757 if test "$ac_cv_cxx_thread" = "yes"; then
10758 CXX="$CXX -Kpthread"
10759 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010760 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010761elif test "$ac_cv_kthread" = "yes"
10762then
10763 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010764 if test "$ac_cv_cxx_thread" = "yes"; then
10765 CXX="$CXX -Kthread"
10766 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010767 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010768elif test "$ac_cv_pthread" = "yes"
10769then
10770 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010771 if test "$ac_cv_cxx_thread" = "yes"; then
10772 CXX="$CXX -pthread"
10773 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010774 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010775else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010776 if test ! -z "$withval" -a -d "$withval"
10777 then LDFLAGS="$LDFLAGS -L$withval"
10778 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010779
10780 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010781 # define _POSIX_THREADS in unistd.h. Some apparently don't
10782 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10784$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010786/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010787
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010788#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010789#ifdef _POSIX_THREADS
10790yes
10791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010792
10793_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010796 unistd_defines_pthreads=yes
10797else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010798 unistd_defines_pthreads=no
10799fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010800rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010801
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10803$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010804
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010806
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010807 # Just looking for pthread_create in libpthread is not enough:
10808 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10809 # So we really have to include pthread.h, and then link.
10810 _libs=$LIBS
10811 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10813$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010815/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010816
10817#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010818#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010819
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010820void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010821int
10822main ()
10823{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010824
10825pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010826 ;
10827 return 0;
10828}
10829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010830if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010831
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10833$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010834 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010835
Guido van Rossum02a1c402000-02-25 19:26:31 +000010836else
Martin v. Löwis11437992002-04-12 09:54:03 +000010837
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010838 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010840if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010841
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010842 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010843
Guido van Rossumad678af1998-10-02 14:42:15 +000010844else
Guido van Rossumad678af1998-10-02 14:42:15 +000010845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10847$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010848if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010850else
Martin v. Löwis11437992002-04-12 09:54:03 +000010851 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010852LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010856/* Override any GCC internal prototype to avoid an error.
10857 Use char because int might match the return type of a GCC
10858 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010859#ifdef __cplusplus
10860extern "C"
10861#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010862char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010863int
10864main ()
10865{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010867 ;
10868 return 0;
10869}
10870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010871if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010872 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010873else
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010876rm -f core conftest.err conftest.$ac_objext \
10877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010878LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10881$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010882if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010883
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010884 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010885 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010886
Greg Steinadf63d62000-07-05 10:38:09 +000010887else
Greg Steinadf63d62000-07-05 10:38:09 +000010888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10890$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010891if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010893else
Martin v. Löwis11437992002-04-12 09:54:03 +000010894 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010895LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899/* Override any GCC internal prototype to avoid an error.
10900 Use char because int might match the return type of a GCC
10901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010902#ifdef __cplusplus
10903extern "C"
10904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010905char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010906int
10907main ()
10908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010909return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010910 ;
10911 return 0;
10912}
10913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010916else
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010919rm -f core conftest.err conftest.$ac_objext \
10920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010921LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10924$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010925if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010926
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010927 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010928 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010929
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010930else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10933$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010934if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010936else
Martin v. Löwis11437992002-04-12 09:54:03 +000010937 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010938LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010942/* Override any GCC internal prototype to avoid an error.
10943 Use char because int might match the return type of a GCC
10944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010945#ifdef __cplusplus
10946extern "C"
10947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010948char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010949int
10950main ()
10951{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010952return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010953 ;
10954 return 0;
10955}
10956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010957if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010958 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010959else
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010962rm -f core conftest.err conftest.$ac_objext \
10963 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010964LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10967$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010968if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010969
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010970 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010971 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010972
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010973else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010974
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10976$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010977if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010979else
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010981LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010985/* Override any GCC internal prototype to avoid an error.
10986 Use char because int might match the return type of a GCC
10987 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010988#ifdef __cplusplus
10989extern "C"
10990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010991char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010992int
10993main ()
10994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010996 ;
10997 return 0;
10998}
10999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011000if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011001 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011002else
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011005rm -f core conftest.err conftest.$ac_objext \
11006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011007LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
11010$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011011if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000011012
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011013 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011014 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011015
Guido van Rossumb93a8621998-05-07 13:27:32 +000011016else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011017
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011018 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
11019
Guido van Rossum2d38f911996-06-26 19:47:01 +000011020fi
11021
Guido van Rossum627b2d71993-12-24 10:39:16 +000011022
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011023fi
11024
Guido van Rossum0be3e491997-05-22 20:33:33 +000011025fi
11026
Guido van Rossum49545951997-12-02 19:28:29 +000011027fi
11028
Guido van Rossumb93a8621998-05-07 13:27:32 +000011029fi
11030
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011032rm -f core conftest.err conftest.$ac_objext \
11033 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011034
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
11036$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011037if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011038 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011039else
Martin v. Löwis11437992002-04-12 09:54:03 +000011040 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011041LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045/* Override any GCC internal prototype to avoid an error.
11046 Use char because int might match the return type of a GCC
11047 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011048#ifdef __cplusplus
11049extern "C"
11050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011051char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011052int
11053main ()
11054{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011055return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011056 ;
11057 return 0;
11058}
11059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011060if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011062else
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011065rm -f core conftest.err conftest.$ac_objext \
11066 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011067LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11070$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011071if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011072
Martin v. Löwis130fb172001-07-19 11:00:41 +000011073 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011074
Guido van Rossum627b2d71993-12-24 10:39:16 +000011075fi
11076
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011077
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011078fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011079
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011080if test "$posix_threads" = "yes"; then
11081 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011082
Matthias Kloseb9621712010-04-24 17:59:49 +000011083$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011084
11085 fi
11086
11087 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11088 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011089 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000011090$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011091
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011092 ;;
11093 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011094$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011095
11096 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011097 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011098$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011099
11100 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011101 esac
11102
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11104$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011105 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011107else
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011109 ac_cv_pthread_system_supported=no
11110else
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011112/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011113
11114 #include <stdio.h>
11115 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011116 void *foo(void *parm) {
11117 return NULL;
11118 }
11119 main() {
11120 pthread_attr_t attr;
11121 pthread_t id;
Joshua Root674fa0a2020-12-14 07:56:34 +110011122 if (pthread_attr_init(&attr)) return (-1);
11123 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
11124 if (pthread_create(&id, &attr, foo, NULL)) return (-1);
11125 return (0);
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011126 }
11127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011128if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011129 ac_cv_pthread_system_supported=yes
11130else
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11134 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011135fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011137
Guido van Rossum627b2d71993-12-24 10:39:16 +000011138fi
11139
Matthias Kloseb9621712010-04-24 17:59:49 +000011140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11141$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011142 if test "$ac_cv_pthread_system_supported" = "yes"; then
11143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011145
11146 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011147 for ac_func in pthread_sigmask
11148do :
11149 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011150if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011151 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011152#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011153_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011154 case $ac_sys_system in
11155 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011156
Matthias Kloseb9621712010-04-24 17:59:49 +000011157$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011158
11159 ;;
11160 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011161fi
11162done
11163
pdoxe14679c2017-10-05 00:01:56 -070011164 for ac_func in pthread_getcpuclockid
11165do :
11166 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11167if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11168 cat >>confdefs.h <<_ACEOF
11169#define HAVE_PTHREAD_GETCPUCLOCKID 1
11170_ACEOF
11171
11172fi
11173done
11174
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011175fi
11176
11177
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011178# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011179
Matthias Kloseb9621712010-04-24 17:59:49 +000011180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11181$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011182# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011183if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011185 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11187$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011188 ipv6=no
11189 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011190 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11191$as_echo "yes" >&6; }
11192 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011193
11194 ipv6=yes
11195 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011196 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011197else
Martin v. Löwis11437992002-04-12 09:54:03 +000011198
Matthias Kloseb9621712010-04-24 17:59:49 +000011199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011200/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011201 /* AF_INET6 available check */
11202#include <sys/types.h>
11203#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011204int
11205main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011206{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011207int domain = AF_INET6;
11208 ;
11209 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011210}
Martin v. Löwis11437992002-04-12 09:54:03 +000011211_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011212if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011213
Matthias Kloseb9621712010-04-24 17:59:49 +000011214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11215$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011216 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011217
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011218else
Matthias Kloseb159a552010-04-25 21:00:44 +000011219
Matthias Kloseb9621712010-04-24 17:59:49 +000011220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11221$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011222 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011223
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011224fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011226
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011227if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11229$as_echo_n "checking if RFC2553 API is available... " >&6; }
11230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011231/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011232
11233 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011234#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011235int
11236main ()
11237{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011238struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011239 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011240 ;
11241 return 0;
11242}
Matthias Kloseb159a552010-04-25 21:00:44 +000011243
Martin v. Löwis11437992002-04-12 09:54:03 +000011244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011245if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011246
11247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011248$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011249 ipv6=yes
11250
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011251else
Matthias Kloseb159a552010-04-25 21:00:44 +000011252
11253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011254$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011255 ipv6=no
11256
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011259fi
11260
11261if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011262 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011263
11264fi
11265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011266fi
11267
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011268
11269ipv6type=unknown
11270ipv6lib=none
11271ipv6trylibc=no
11272
11273if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11275$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011276 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11277 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011278 case $i in
11279 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011281/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011282
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011283#include <netinet/in.h>
11284#ifdef IPV6_INRIA_VERSION
11285yes
11286#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011287_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011289 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011290 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011291fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011292rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011293
11294 ;;
11295 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011297/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011298
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011299#include <netinet/in.h>
11300#ifdef __KAME__
11301yes
11302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011303_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011305 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011306 ipv6type=$i;
11307 ipv6lib=inet6
11308 ipv6libdir=/usr/local/v6/lib
11309 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011310fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011311rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011312
11313 ;;
11314 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011316/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011317
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011318#include <features.h>
11319#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11320yes
11321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011322_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011324 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011325 ipv6type=$i;
11326 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011327fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011328rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011329
11330 ;;
11331 linux-inet6)
11332 if test -d /usr/inet6; then
11333 ipv6type=$i
11334 ipv6lib=inet6
11335 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011336 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011337 fi
11338 ;;
11339 solaris)
11340 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011341 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011342 ipv6type=$i
11343 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011344 fi
11345 fi
11346 ;;
11347 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011349/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011350
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011351#include <sys/param.h>
11352#ifdef _TOSHIBA_INET6
11353yes
11354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011355_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011357 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011358 ipv6type=$i;
11359 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011360 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011361fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011362rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011363
11364 ;;
11365 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011368
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011369#include </usr/local/v6/include/sys/v6config.h>
11370#ifdef __V6D__
11371yes
11372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011373_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011375 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011376 ipv6type=$i;
11377 ipv6lib=v6;
11378 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011379 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011380fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011381rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011382
11383 ;;
11384 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011386/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011387
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011388#include <sys/param.h>
11389#ifdef _ZETA_MINAMI_INET6
11390yes
11391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011392_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011394 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011395 ipv6type=$i;
11396 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011397 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011398fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011399rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011400
11401 ;;
11402 esac
11403 if test "$ipv6type" != "unknown"; then
11404 break
11405 fi
11406 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11408$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011409fi
11410
11411if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11412 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11413 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11414 echo "using lib$ipv6lib"
11415 else
11416 if test $ipv6trylibc = "yes"; then
11417 echo "using libc"
11418 else
11419 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11420 echo "You need to fetch lib$ipv6lib.a from appropriate"
11421 echo 'ipv6 kit and compile beforehand.'
11422 exit 1
11423 fi
11424 fi
11425fi
11426
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11428$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11430/* end confdefs.h. */
11431 /* CAN_RAW_FD_FRAMES available check */
11432#include <linux/can/raw.h>
11433int
11434main ()
11435{
11436int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11437 ;
11438 return 0;
11439}
11440_ACEOF
11441if ac_fn_c_try_compile "$LINENO"; then :
11442
11443
11444$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11445
11446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11447$as_echo "yes" >&6; }
11448
11449else
11450
11451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11452$as_echo "no" >&6; }
11453
11454fi
11455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11456
Zackery Spytz97e0de02020-04-09 06:03:49 -060011457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11458$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11460/* end confdefs.h. */
11461
11462#include <linux/can/raw.h>
11463int
11464main ()
11465{
11466int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11467 ;
11468 return 0;
11469}
11470_ACEOF
11471if ac_fn_c_try_compile "$LINENO"; then :
11472
11473
11474$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11475
11476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11477$as_echo "yes" >&6; }
11478
11479else
11480
11481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11482$as_echo "no" >&6; }
11483
11484fi
11485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11486
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011487# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11489$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011491# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011492if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493 withval=$with_doc_strings;
11494fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011495
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011496
11497if test -z "$with_doc_strings"
11498then with_doc_strings="yes"
11499fi
11500if test "$with_doc_strings" != "no"
11501then
11502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011504
11505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11507$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011508
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011509# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11511$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011514if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515 withval=$with_pymalloc;
11516fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011517
Neil Schemenauera35c6882001-02-27 04:45:05 +000011518
Neil Schemenauer16c22972002-03-22 15:34:49 +000011519if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011520then
11521 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011522fi
11523if test "$with_pymalloc" != "no"
11524then
Martin v. Löwis11437992002-04-12 09:54:03 +000011525
Matthias Kloseb9621712010-04-24 17:59:49 +000011526$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011527
11528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11530$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011531
Nick Coghlan6ea41862017-06-11 13:16:15 +100011532# Check for --with-c-locale-coercion
11533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11534$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11535
11536# Check whether --with-c-locale-coercion was given.
11537if test "${with_c_locale_coercion+set}" = set; then :
11538 withval=$with_c_locale_coercion;
11539fi
11540
11541
11542if test -z "$with_c_locale_coercion"
11543then
11544 with_c_locale_coercion="yes"
11545fi
11546if test "$with_c_locale_coercion" != "no"
11547then
11548
11549$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11550
11551fi
11552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11553$as_echo "$with_c_locale_coercion" >&6; }
11554
Benjamin Peterson05159c42009-12-03 03:01:27 +000011555# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11557$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011558
11559# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011560if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011561 withval=$with_valgrind;
11562else
11563 with_valgrind=no
11564fi
11565
Matthias Kloseb9621712010-04-24 17:59:49 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11567$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011568if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 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 +020011570if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011571
Matthias Kloseb9621712010-04-24 17:59:49 +000011572$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011573
11574else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011575 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011576
11577fi
11578
11579
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011580 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011581fi
11582
Łukasz Langaa785c872016-09-09 17:37:37 -070011583# Check for DTrace support
11584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11585$as_echo_n "checking for --with-dtrace... " >&6; }
11586
11587# Check whether --with-dtrace was given.
11588if test "${with_dtrace+set}" = set; then :
11589 withval=$with_dtrace;
11590else
11591 with_dtrace=no
11592fi
11593
11594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11595$as_echo "$with_dtrace" >&6; }
11596
11597
11598
11599
11600
11601DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011602DTRACE_HEADERS=
11603DTRACE_OBJS=
11604
11605if test "$with_dtrace" = "yes"
11606then
11607 # Extract the first word of "dtrace", so it can be a program name with args.
11608set dummy dtrace; ac_word=$2
11609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11610$as_echo_n "checking for $ac_word... " >&6; }
11611if ${ac_cv_path_DTRACE+:} false; then :
11612 $as_echo_n "(cached) " >&6
11613else
11614 case $DTRACE in
11615 [\\/]* | ?:[\\/]*)
11616 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11617 ;;
11618 *)
11619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11620for as_dir in $PATH
11621do
11622 IFS=$as_save_IFS
11623 test -z "$as_dir" && as_dir=.
11624 for ac_exec_ext in '' $ac_executable_extensions; do
11625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11626 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11628 break 2
11629 fi
11630done
11631 done
11632IFS=$as_save_IFS
11633
11634 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11635 ;;
11636esac
11637fi
11638DTRACE=$ac_cv_path_DTRACE
11639if test -n "$DTRACE"; then
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11641$as_echo "$DTRACE" >&6; }
11642else
11643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11644$as_echo "no" >&6; }
11645fi
11646
11647
11648 if test "$DTRACE" = "not found"; then
11649 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11650 fi
11651
11652$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11653
11654 DTRACE_HEADERS="Include/pydtrace_probes.h"
11655
11656 # On OS X, DTrace providers do not need to be explicitly compiled and
11657 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11658 # generation flag '-G'. We check for presence of this flag, rather than
11659 # hardcoding support by OS, in the interest of robustness.
11660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11661$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11662if ${ac_cv_dtrace_link+:} false; then :
11663 $as_echo_n "(cached) " >&6
11664else
11665 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011666 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011667 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011668 ac_cv_dtrace_link=yes
11669
11670fi
11671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11672$as_echo "$ac_cv_dtrace_link" >&6; }
11673 if test "$ac_cv_dtrace_link" = "yes"; then
11674 DTRACE_OBJS="Python/pydtrace.o"
11675 fi
11676fi
11677
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011678# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011679
Guido van Rossum98935bf2001-09-05 19:13:16 +000011680DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011681
Guido van Rossume97ee181999-12-20 21:27:22 +000011682# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060011683# platforms have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011684for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011685do :
11686 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011687if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011688 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011689#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011690_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011691
Guido van Rossume97ee181999-12-20 21:27:22 +000011692fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011693done
Guido van Rossume97ee181999-12-20 21:27:22 +000011694
Michael W. Hudson54241132001-12-07 15:38:26 +000011695
Guido van Rossume97ee181999-12-20 21:27:22 +000011696# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11697# loading of modules.
11698
Matthias Kloseb9621712010-04-24 17:59:49 +000011699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11700$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011701if test -z "$DYNLOADFILE"
11702then
11703 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011704 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011705 *)
11706 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11707 # out any dynamic loading
11708 if test "$ac_cv_func_dlopen" = yes
11709 then DYNLOADFILE="dynload_shlib.o"
11710 else DYNLOADFILE="dynload_stub.o"
11711 fi
11712 ;;
11713 esac
11714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11716$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011717if test "$DYNLOADFILE" != "dynload_stub.o"
11718then
Martin v. Löwis11437992002-04-12 09:54:03 +000011719
Matthias Kloseb9621712010-04-24 17:59:49 +000011720$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011721
11722fi
11723
Neil Schemenauer4e425612001-06-19 15:44:15 +000011724# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11725
Michael W. Hudson54241132001-12-07 15:38:26 +000011726
Matthias Kloseb9621712010-04-24 17:59:49 +000011727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11728$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011729if test -z "$MACHDEP_OBJS"
11730then
Jack Jansene578a632001-08-15 01:27:14 +000011731 MACHDEP_OBJS=$extra_machdep_objs
11732else
11733 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011734fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011735if test -z "$MACHDEP_OBJS"; then
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11737$as_echo "none" >&6; }
11738else
11739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11740$as_echo "$MACHDEP_OBJS" >&6; }
11741fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011742
Guido van Rossum627b2d71993-12-24 10:39:16 +000011743# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011744for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Kyle Evans1800c602020-10-11 15:18:53 -050011745 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11746 explicit_memset faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011747 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011748 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011749 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011750 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011751 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011752 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011753 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011754 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011755 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011756 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011757 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011758 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011759 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011760 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011761 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011762 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11763 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011764 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Pablo Galindoa57b3d32020-11-17 00:00:38 +000011765 sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011766 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Alexey Izbyshev976da902020-10-24 03:47:01 +030011767 truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011768 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011769do :
11770 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11771ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011772if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011773 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011774#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011775_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011776
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011777fi
11778done
11779
Michael W. Hudson54241132001-12-07 15:38:26 +000011780
Benjamin Peterson40caa052018-09-12 15:52:40 -070011781# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11782# links. Some libc implementations have a stub lchmod implementation that always
11783# returns an error.
11784if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011785 for ac_func in lchmod
11786do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011787 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11788if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011789 cat >>confdefs.h <<_ACEOF
11790#define HAVE_LCHMOD 1
11791_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011792
11793fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011794done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011795
11796fi
11797
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011798ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11799 #include <dirent.h>
11800"
11801if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11802
11803$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11804
11805fi
11806
11807
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011808# For some functions, having a definition is not sufficient, since
11809# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11811$as_echo_n "checking for chroot... " >&6; }
11812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011813/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011814#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011815int
11816main ()
11817{
11818void *x=chroot
11819 ;
11820 return 0;
11821}
11822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011823if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011824
Matthias Kloseb9621712010-04-24 17:59:49 +000011825$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011826
Matthias Kloseb159a552010-04-25 21:00:44 +000011827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011828$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011829else
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11831$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011832
11833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11836$as_echo_n "checking for link... " >&6; }
11837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011838/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011839#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011840int
11841main ()
11842{
11843void *x=link
11844 ;
11845 return 0;
11846}
11847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011848if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011851
Matthias Kloseb159a552010-04-25 21:00:44 +000011852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011853$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11856$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011857
11858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11861$as_echo_n "checking for symlink... " >&6; }
11862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011863/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011864#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011865int
11866main ()
11867{
11868void *x=symlink
11869 ;
11870 return 0;
11871}
11872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011873if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011876
Matthias Kloseb159a552010-04-25 21:00:44 +000011877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011878$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11881$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011882
11883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11886$as_echo_n "checking for fchdir... " >&6; }
11887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011888/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011889#include <unistd.h>
11890int
11891main ()
11892{
11893void *x=fchdir
11894 ;
11895 return 0;
11896}
11897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011898if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011901
Matthias Kloseb159a552010-04-25 21:00:44 +000011902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011903$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011904else
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11906$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011907
11908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11911$as_echo_n "checking for fsync... " >&6; }
11912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011913/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011914#include <unistd.h>
11915int
11916main ()
11917{
11918void *x=fsync
11919 ;
11920 return 0;
11921}
11922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011923if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011924
Matthias Kloseb9621712010-04-24 17:59:49 +000011925$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011926
Matthias Kloseb159a552010-04-25 21:00:44 +000011927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011928$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011929else
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11931$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011932
11933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11936$as_echo_n "checking for fdatasync... " >&6; }
11937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011938/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011939#include <unistd.h>
11940int
11941main ()
11942{
11943void *x=fdatasync
11944 ;
11945 return 0;
11946}
11947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011948if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011949
Matthias Kloseb9621712010-04-24 17:59:49 +000011950$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011951
Matthias Kloseb159a552010-04-25 21:00:44 +000011952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011953$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011954else
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11956$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011957
11958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11961$as_echo_n "checking for epoll... " >&6; }
11962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011963/* end confdefs.h. */
11964#include <sys/epoll.h>
11965int
11966main ()
11967{
11968void *x=epoll_create
11969 ;
11970 return 0;
11971}
11972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011973if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011974
Matthias Kloseb9621712010-04-24 17:59:49 +000011975$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011976
Matthias Kloseb159a552010-04-25 21:00:44 +000011977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011978$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011979else
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11981$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011982
11983fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11986$as_echo_n "checking for epoll_create1... " >&6; }
11987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11988/* end confdefs.h. */
11989#include <sys/epoll.h>
11990int
11991main ()
11992{
11993void *x=epoll_create1
11994 ;
11995 return 0;
11996}
11997_ACEOF
11998if ac_fn_c_try_compile "$LINENO"; then :
11999
12000$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
12001
12002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12003$as_echo "yes" >&6; }
12004else
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12006$as_echo "no" >&6; }
12007
12008fi
12009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
12011$as_echo_n "checking for kqueue... " >&6; }
12012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012013/* end confdefs.h. */
12014
12015#include <sys/types.h>
12016#include <sys/event.h>
12017
12018int
12019main ()
12020{
12021int x=kqueue()
12022 ;
12023 return 0;
12024}
12025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012026if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012027
Matthias Kloseb9621712010-04-24 17:59:49 +000012028$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012029
Matthias Kloseb159a552010-04-25 21:00:44 +000012030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012031$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012032else
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12034$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012035
12036fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
12039$as_echo_n "checking for prlimit... " >&6; }
12040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12041/* end confdefs.h. */
12042
12043#include <sys/time.h>
12044#include <sys/resource.h>
12045
12046int
12047main ()
12048{
12049void *x=prlimit
12050 ;
12051 return 0;
12052}
12053_ACEOF
12054if ac_fn_c_try_compile "$LINENO"; then :
12055
12056$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
12057
12058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12059$as_echo "yes" >&6; }
12060else
12061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12062$as_echo "no" >&6; }
12063
12064fi
12065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren41761932020-11-08 10:05:27 +010012066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12067$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
12068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12069/* end confdefs.h. */
12070#include <mach-o/dyld.h>
12071int
12072main ()
12073{
12074void *x=_dyld_shared_cache_contains_path
12075 ;
12076 return 0;
12077}
12078_ACEOF
12079if ac_fn_c_try_compile "$LINENO"; then :
12080
12081$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
12082
12083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12084$as_echo "yes" >&6; }
12085else
12086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12087$as_echo "no" >&6; }
12088
12089fi
12090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012091
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12093$as_echo_n "checking for memfd_create... " >&6; }
12094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12095/* end confdefs.h. */
12096
12097#ifdef HAVE_SYS_MMAN_H
12098#include <sys/mman.h>
12099#endif
12100#ifdef HAVE_SYS_MEMFD_H
12101#include <sys/memfd.h>
12102#endif
12103
12104int
12105main ()
12106{
12107void *x=memfd_create
12108 ;
12109 return 0;
12110}
12111_ACEOF
12112if ac_fn_c_try_compile "$LINENO"; then :
12113
12114$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12115
12116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12117$as_echo "yes" >&6; }
12118else
12119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12120$as_echo "no" >&6; }
12121
12122fi
12123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12124
Christian Heimescd9fed62020-11-13 19:48:52 +010012125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
12126$as_echo_n "checking for eventfd... " >&6; }
12127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128/* end confdefs.h. */
12129
12130#ifdef HAVE_SYS_EVENTFD_H
12131#include <sys/eventfd.h>
12132#endif
12133
12134int
12135main ()
12136{
12137int x = eventfd(0, EFD_CLOEXEC)
12138 ;
12139 return 0;
12140}
12141_ACEOF
12142if ac_fn_c_try_compile "$LINENO"; then :
12143
12144$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h
12145
12146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12147$as_echo "yes" >&6; }
12148else
12149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12150$as_echo "no" >&6; }
12151
12152fi
12153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12154
Martin v. Löwisd5843682002-11-21 20:41:28 +000012155# On some systems (eg. FreeBSD 5), we would find a definition of the
12156# functions ctermid_r, setgroups in the library, but no prototype
12157# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12158# address to avoid compiler warnings and potential miscompilations
12159# because of the missing prototypes.
12160
Matthias Kloseb9621712010-04-24 17:59:49 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12162$as_echo_n "checking for ctermid_r... " >&6; }
12163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012164/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012165
Martin v. Löwisd5843682002-11-21 20:41:28 +000012166#include <stdio.h>
12167
Martin v. Löwisd5843682002-11-21 20:41:28 +000012168int
12169main ()
12170{
12171void* p = ctermid_r
12172 ;
12173 return 0;
12174}
12175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012176if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012177
Matthias Kloseb9621712010-04-24 17:59:49 +000012178$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012179
Matthias Kloseb159a552010-04-25 21:00:44 +000012180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012181$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012182else
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12184$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012185
12186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12188
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12190$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012191if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012192 $as_echo_n "(cached) " >&6
12193else
12194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012195/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012196#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012197int
12198main ()
12199{
12200void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012201
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012202 ;
12203 return 0;
12204}
12205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012206if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012207 ac_cv_flock_decl=yes
12208else
12209 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012210
12211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012213
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012214fi
12215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12216$as_echo "$ac_cv_flock_decl" >&6; }
12217if test "x${ac_cv_flock_decl}" = xyes; then
12218 for ac_func in flock
12219do :
12220 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012221if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012222 cat >>confdefs.h <<_ACEOF
12223#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012224_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012225
Antoine Pitroua3000072010-09-07 14:52:42 +000012226else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012228$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012229if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012230 $as_echo_n "(cached) " >&6
12231else
12232 ac_check_lib_save_LIBS=$LIBS
12233LIBS="-lbsd $LIBS"
12234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12235/* end confdefs.h. */
12236
12237/* Override any GCC internal prototype to avoid an error.
12238 Use char because int might match the return type of a GCC
12239 builtin and then its argument prototype would still apply. */
12240#ifdef __cplusplus
12241extern "C"
12242#endif
12243char flock ();
12244int
12245main ()
12246{
12247return flock ();
12248 ;
12249 return 0;
12250}
12251_ACEOF
12252if ac_fn_c_try_link "$LINENO"; then :
12253 ac_cv_lib_bsd_flock=yes
12254else
12255 ac_cv_lib_bsd_flock=no
12256fi
12257rm -f core conftest.err conftest.$ac_objext \
12258 conftest$ac_exeext conftest.$ac_ext
12259LIBS=$ac_check_lib_save_LIBS
12260fi
12261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12262$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012263if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012264 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012265
12266
12267$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12268
12269
12270fi
12271
12272
12273fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012274done
12275
Antoine Pitroua3000072010-09-07 14:52:42 +000012276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012277
Matthias Kloseb9621712010-04-24 17:59:49 +000012278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12279$as_echo_n "checking for getpagesize... " >&6; }
12280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012281/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012282
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012283#include <unistd.h>
12284
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012285int
12286main ()
12287{
12288void* p = getpagesize
12289 ;
12290 return 0;
12291}
12292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012294
Matthias Kloseb9621712010-04-24 17:59:49 +000012295$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012296
Matthias Kloseb159a552010-04-25 21:00:44 +000012297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012298$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012299else
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12301$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012302
12303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012305
Victor Stinner984890f2011-11-24 13:53:38 +010012306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12307$as_echo_n "checking for broken unsetenv... " >&6; }
12308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12309/* end confdefs.h. */
12310
12311#include <stdlib.h>
12312
12313int
12314main ()
12315{
12316int res = unsetenv("DUMMY")
12317 ;
12318 return 0;
12319}
12320_ACEOF
12321if ac_fn_c_try_compile "$LINENO"; then :
12322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12323$as_echo "no" >&6; }
12324else
12325
12326$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12327
12328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12329$as_echo "yes" >&6; }
12330
12331fi
12332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12333
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012334for ac_prog in true
12335do
12336 # Extract the first word of "$ac_prog", so it can be a program name with args.
12337set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12339$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012340if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012342else
12343 if test -n "$TRUE"; then
12344 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12345else
12346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12347for as_dir in $PATH
12348do
12349 IFS=$as_save_IFS
12350 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012351 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012352 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012353 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012354 $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 +000012355 break 2
12356 fi
12357done
Matthias Kloseb9621712010-04-24 17:59:49 +000012358 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012360
12361fi
12362fi
12363TRUE=$ac_cv_prog_TRUE
12364if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12366$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012367else
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12369$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012370fi
12371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012373 test -n "$TRUE" && break
12374done
12375test -n "$TRUE" || TRUE="/bin/true"
12376
12377
Matthias Kloseb9621712010-04-24 17:59:49 +000012378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12379$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012380if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012382else
12383 ac_check_lib_save_LIBS=$LIBS
12384LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012386/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012388/* Override any GCC internal prototype to avoid an error.
12389 Use char because int might match the return type of a GCC
12390 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012391#ifdef __cplusplus
12392extern "C"
12393#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012394char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012395int
12396main ()
12397{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012398return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012399 ;
12400 return 0;
12401}
12402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012403if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012404 ac_cv_lib_c_inet_aton=yes
12405else
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012408rm -f core conftest.err conftest.$ac_objext \
12409 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012410LIBS=$ac_check_lib_save_LIBS
12411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12413$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012414if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012415 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012416else
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12418$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012419if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012421else
12422 ac_check_lib_save_LIBS=$LIBS
12423LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012425/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427/* Override any GCC internal prototype to avoid an error.
12428 Use char because int might match the return type of a GCC
12429 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012430#ifdef __cplusplus
12431extern "C"
12432#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012433char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012434int
12435main ()
12436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012438 ;
12439 return 0;
12440}
12441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012442if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012443 ac_cv_lib_resolv_inet_aton=yes
12444else
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012447rm -f core conftest.err conftest.$ac_objext \
12448 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012449LIBS=$ac_check_lib_save_LIBS
12450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12452$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012453if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012454 cat >>confdefs.h <<_ACEOF
12455#define HAVE_LIBRESOLV 1
12456_ACEOF
12457
12458 LIBS="-lresolv $LIBS"
12459
12460fi
12461
12462
12463fi
12464
12465
Christian Heimesd0764e22007-12-04 15:00:33 +000012466# On Tru64, chflags seems to be present, but calling it will
12467# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12469$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012470if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012472else
Matthias Kloseb9621712010-04-24 17:59:49 +000012473 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012474 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012475else
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012477/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012478
Christian Heimesd0764e22007-12-04 15:00:33 +000012479#include <sys/stat.h>
12480#include <unistd.h>
12481int main(int argc, char*argv[])
12482{
12483 if(chflags(argv[0], 0) != 0)
12484 return 1;
12485 return 0;
12486}
Ned Deily3eb67d52011-06-28 00:00:28 -070012487
Christian Heimesd0764e22007-12-04 15:00:33 +000012488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012489if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012490 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012491else
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012496fi
12497
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012498
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12501$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012502if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012504if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012505 ac_cv_have_chflags="yes"
12506else
12507 ac_cv_have_chflags="no"
12508fi
12509
12510fi
12511if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012512
Matthias Kloseb9621712010-04-24 17:59:49 +000012513$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012514
12515fi
12516
Matthias Kloseb9621712010-04-24 17:59:49 +000012517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12518$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012519if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012520 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012521else
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012523 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012524else
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012526/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012527
Christian Heimesd0764e22007-12-04 15:00:33 +000012528#include <sys/stat.h>
12529#include <unistd.h>
12530int main(int argc, char*argv[])
12531{
12532 if(lchflags(argv[0], 0) != 0)
12533 return 1;
12534 return 0;
12535}
Ned Deily3eb67d52011-06-28 00:00:28 -070012536
Christian Heimesd0764e22007-12-04 15:00:33 +000012537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012538if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012539 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12544 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012545fi
12546
12547
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12550$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012551if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012553if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012554 ac_cv_have_lchflags="yes"
12555else
12556 ac_cv_have_lchflags="no"
12557fi
12558
12559fi
12560if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012561
Matthias Kloseb9621712010-04-24 17:59:49 +000012562$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012563
12564fi
12565
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012566case $ac_sys_system/$ac_sys_release in
12567Darwin/*)
12568 _CUR_CFLAGS="${CFLAGS}"
12569 _CUR_LDFLAGS="${LDFLAGS}"
12570 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12571 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12572 ;;
12573esac
12574
Matthias Kloseb9621712010-04-24 17:59:49 +000012575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12576$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012577if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012579else
12580 ac_check_lib_save_LIBS=$LIBS
12581LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012583/* end confdefs.h. */
12584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012585/* Override any GCC internal prototype to avoid an error.
12586 Use char because int might match the return type of a GCC
12587 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012588#ifdef __cplusplus
12589extern "C"
12590#endif
12591char inflateCopy ();
12592int
12593main ()
12594{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012596 ;
12597 return 0;
12598}
12599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012600if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012601 ac_cv_lib_z_inflateCopy=yes
12602else
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012605rm -f core conftest.err conftest.$ac_objext \
12606 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012607LIBS=$ac_check_lib_save_LIBS
12608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12610$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012611if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012612
Matthias Kloseb9621712010-04-24 17:59:49 +000012613$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012614
12615fi
12616
12617
12618case $ac_sys_system/$ac_sys_release in
12619Darwin/*)
12620 CFLAGS="${_CUR_CFLAGS}"
12621 LDFLAGS="${_CUR_LDFLAGS}"
12622 ;;
12623esac
12624
Matthias Kloseb9621712010-04-24 17:59:49 +000012625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12626$as_echo_n "checking for hstrerror... " >&6; }
12627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012628/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012629
Martin v. Löwise9416172003-05-03 10:12:45 +000012630#include <netdb.h>
12631
Martin v. Löwise9416172003-05-03 10:12:45 +000012632int
12633main ()
12634{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012635void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012636 ;
12637 return 0;
12638}
12639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012640if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012641
Matthias Kloseb9621712010-04-24 17:59:49 +000012642$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012643
Matthias Kloseb159a552010-04-25 21:00:44 +000012644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012645$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012646else
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12648$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012649
12650fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012651rm -f core conftest.err conftest.$ac_objext \
12652 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012653
Matthias Kloseb9621712010-04-24 17:59:49 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12655$as_echo_n "checking for inet_aton... " >&6; }
12656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012657/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012658
Martin v. Löwis86d66262006-02-17 08:40:11 +000012659#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012660#include <sys/socket.h>
12661#include <netinet/in.h>
12662#include <arpa/inet.h>
12663
Martin v. Löwise9416172003-05-03 10:12:45 +000012664int
12665main ()
12666{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012667void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012668 ;
12669 return 0;
12670}
12671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012673
Matthias Kloseb9621712010-04-24 17:59:49 +000012674$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012675
Matthias Kloseb159a552010-04-25 21:00:44 +000012676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012677$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012678else
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12680$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012681
12682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012683rm -f core conftest.err conftest.$ac_objext \
12684 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685
Matthias Kloseb9621712010-04-24 17:59:49 +000012686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12687$as_echo_n "checking for inet_pton... " >&6; }
12688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012689/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012690
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012691#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012692#include <sys/socket.h>
12693#include <netinet/in.h>
12694#include <arpa/inet.h>
12695
Martin v. Löwise9416172003-05-03 10:12:45 +000012696int
12697main ()
12698{
12699void* p = inet_pton
12700 ;
12701 return 0;
12702}
12703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012704if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012705
Matthias Kloseb9621712010-04-24 17:59:49 +000012706$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012707
Matthias Kloseb159a552010-04-25 21:00:44 +000012708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012709$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012710else
Matthias Kloseb9621712010-04-24 17:59:49 +000012711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12712$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012713
12714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012716
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012717# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12719$as_echo_n "checking for setgroups... " >&6; }
12720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012721/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012722
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012723#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012724#ifdef HAVE_GRP_H
12725#include <grp.h>
12726#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012727
Martin v. Löwisd5843682002-11-21 20:41:28 +000012728int
12729main ()
12730{
12731void* p = setgroups
12732 ;
12733 return 0;
12734}
12735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012736if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012739
Matthias Kloseb159a552010-04-25 21:00:44 +000012740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012742else
Matthias Kloseb9621712010-04-24 17:59:49 +000012743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12744$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012745
12746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012748
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012749# check for openpty and forkpty
12750
12751for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012752do :
12753 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012754if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012756#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012757_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012758
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012759else
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12761$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012762if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012763 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012764else
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012766LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770/* Override any GCC internal prototype to avoid an error.
12771 Use char because int might match the return type of a GCC
12772 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012773#ifdef __cplusplus
12774extern "C"
12775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012776char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012777int
12778main ()
12779{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 ;
12782 return 0;
12783}
12784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012785if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012787else
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012790rm -f core conftest.err conftest.$ac_objext \
12791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012792LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12795$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012796if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012798 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012799else
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12801$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012802if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012804else
12805 ac_check_lib_save_LIBS=$LIBS
12806LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012808/* end confdefs.h. */
12809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810/* Override any GCC internal prototype to avoid an error.
12811 Use char because int might match the return type of a GCC
12812 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012813#ifdef __cplusplus
12814extern "C"
12815#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012816char openpty ();
12817int
12818main ()
12819{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012821 ;
12822 return 0;
12823}
12824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012825if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012826 ac_cv_lib_bsd_openpty=yes
12827else
Matthias Kloseb9621712010-04-24 17:59:49 +000012828 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012830rm -f core conftest.err conftest.$ac_objext \
12831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012832LIBS=$ac_check_lib_save_LIBS
12833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12835$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012836if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012837 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012838 LIBS="$LIBS -lbsd"
12839fi
12840
12841
12842fi
12843
Fred Drake8cef4cf2000-06-28 16:40:38 +000012844
12845fi
12846done
12847
12848for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012849do :
12850 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012851if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012853#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012854_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012855
Fred Drake8cef4cf2000-06-28 16:40:38 +000012856else
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12858$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012859if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012861else
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012863LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867/* Override any GCC internal prototype to avoid an error.
12868 Use char because int might match the return type of a GCC
12869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012870#ifdef __cplusplus
12871extern "C"
12872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012873char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012874int
12875main ()
12876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012878 ;
12879 return 0;
12880}
12881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012882if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012883 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012884else
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012887rm -f core conftest.err conftest.$ac_objext \
12888 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012889LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12892$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012893if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012894 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012895 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012896else
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12898$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012899if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012900 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012901else
12902 ac_check_lib_save_LIBS=$LIBS
12903LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012905/* end confdefs.h. */
12906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907/* Override any GCC internal prototype to avoid an error.
12908 Use char because int might match the return type of a GCC
12909 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012910#ifdef __cplusplus
12911extern "C"
12912#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012913char forkpty ();
12914int
12915main ()
12916{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012918 ;
12919 return 0;
12920}
12921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012922if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012923 ac_cv_lib_bsd_forkpty=yes
12924else
Matthias Kloseb9621712010-04-24 17:59:49 +000012925 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012927rm -f core conftest.err conftest.$ac_objext \
12928 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012929LIBS=$ac_check_lib_save_LIBS
12930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12932$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012933if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012935 LIBS="$LIBS -lbsd"
12936fi
12937
12938
12939fi
12940
Fred Drake8cef4cf2000-06-28 16:40:38 +000012941
12942fi
12943done
12944
Jack Jansendd19cf82001-12-06 22:36:17 +000012945
Michael W. Hudson54241132001-12-07 15:38:26 +000012946# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012947for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012948do :
12949 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12950ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012951if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012953#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012954_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012955
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012956fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012957done
12958
Michael W. Hudson54241132001-12-07 15:38:26 +000012959
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012960ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012961if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012962 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012963
Martin v. Löwis1142de32002-03-29 16:28:31 +000012964else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012966 *" dup2.$ac_objext "* ) ;;
12967 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012968 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012969esac
12970
Martin v. Löwis1142de32002-03-29 16:28:31 +000012971fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012972
Martin v. Löwis1142de32002-03-29 16:28:31 +000012973
12974for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012975do :
12976 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012977if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012979#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012982/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012983#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012984int
12985main ()
12986{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ;
12989 return 0;
12990}
12991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012992if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012993
Matthias Kloseb9621712010-04-24 17:59:49 +000012994$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012995
Guido van Rossum627b2d71993-12-24 10:39:16 +000012996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012998
Guido van Rossum627b2d71993-12-24 10:39:16 +000012999fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013000done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013001
Jack Jansen150753c2003-03-29 22:07:47 +000013002for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000013003do :
13004 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020013005if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000013006 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013007#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000013008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013010/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013011#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013012int
13013main ()
13014{
13015setpgrp(0,0);
13016 ;
13017 return 0;
13018}
13019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013020if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000013023
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000013026
13027fi
13028done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013029
Michael W. Hudson54241132001-12-07 15:38:26 +000013030
Gregory P. Smith387512c2018-12-30 15:42:32 -080013031# We search for both crypt and crypt_r as one or the other may be defined
13032# This gets us our -lcrypt in LIBS when required on the target platform.
13033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
13034$as_echo_n "checking for library containing crypt... " >&6; }
13035if ${ac_cv_search_crypt+:} false; then :
13036 $as_echo_n "(cached) " >&6
13037else
13038 ac_func_search_save_LIBS=$LIBS
13039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13040/* end confdefs.h. */
13041
13042/* Override any GCC internal prototype to avoid an error.
13043 Use char because int might match the return type of a GCC
13044 builtin and then its argument prototype would still apply. */
13045#ifdef __cplusplus
13046extern "C"
13047#endif
13048char crypt ();
13049int
13050main ()
13051{
13052return crypt ();
13053 ;
13054 return 0;
13055}
13056_ACEOF
13057for ac_lib in '' crypt; do
13058 if test -z "$ac_lib"; then
13059 ac_res="none required"
13060 else
13061 ac_res=-l$ac_lib
13062 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13063 fi
13064 if ac_fn_c_try_link "$LINENO"; then :
13065 ac_cv_search_crypt=$ac_res
13066fi
13067rm -f core conftest.err conftest.$ac_objext \
13068 conftest$ac_exeext
13069 if ${ac_cv_search_crypt+:} false; then :
13070 break
13071fi
13072done
13073if ${ac_cv_search_crypt+:} false; then :
13074
13075else
13076 ac_cv_search_crypt=no
13077fi
13078rm conftest.$ac_ext
13079LIBS=$ac_func_search_save_LIBS
13080fi
13081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13082$as_echo "$ac_cv_search_crypt" >&6; }
13083ac_res=$ac_cv_search_crypt
13084if test "$ac_res" != no; then :
13085 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13086
13087fi
13088
13089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13090$as_echo_n "checking for library containing crypt_r... " >&6; }
13091if ${ac_cv_search_crypt_r+:} false; then :
13092 $as_echo_n "(cached) " >&6
13093else
13094 ac_func_search_save_LIBS=$LIBS
13095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13096/* end confdefs.h. */
13097
13098/* Override any GCC internal prototype to avoid an error.
13099 Use char because int might match the return type of a GCC
13100 builtin and then its argument prototype would still apply. */
13101#ifdef __cplusplus
13102extern "C"
13103#endif
13104char crypt_r ();
13105int
13106main ()
13107{
13108return crypt_r ();
13109 ;
13110 return 0;
13111}
13112_ACEOF
13113for ac_lib in '' crypt; do
13114 if test -z "$ac_lib"; then
13115 ac_res="none required"
13116 else
13117 ac_res=-l$ac_lib
13118 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13119 fi
13120 if ac_fn_c_try_link "$LINENO"; then :
13121 ac_cv_search_crypt_r=$ac_res
13122fi
13123rm -f core conftest.err conftest.$ac_objext \
13124 conftest$ac_exeext
13125 if ${ac_cv_search_crypt_r+:} false; then :
13126 break
13127fi
13128done
13129if ${ac_cv_search_crypt_r+:} false; then :
13130
13131else
13132 ac_cv_search_crypt_r=no
13133fi
13134rm conftest.$ac_ext
13135LIBS=$ac_func_search_save_LIBS
13136fi
13137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13138$as_echo "$ac_cv_search_crypt_r" >&6; }
13139ac_res=$ac_cv_search_crypt_r
13140if test "$ac_res" != no; then :
13141 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13142
13143fi
13144
13145
13146ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13147if test "x$ac_cv_func_crypt_r" = xyes; then :
13148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13149/* end confdefs.h. */
13150
13151#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13152#include <crypt.h>
13153
13154int
13155main ()
13156{
13157
13158struct crypt_data d;
13159char *r = crypt_r("", "", &d);
13160
13161 ;
13162 return 0;
13163}
13164_ACEOF
13165if ac_fn_c_try_compile "$LINENO"; then :
13166
13167$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13168
13169fi
13170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13171
13172fi
13173
13174
Victor Stinnere0be4232011-10-25 13:06:09 +020013175for ac_func in clock_gettime
13176do :
13177 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13178if test "x$ac_cv_func_clock_gettime" = xyes; then :
13179 cat >>confdefs.h <<_ACEOF
13180#define HAVE_CLOCK_GETTIME 1
13181_ACEOF
13182
13183else
13184
13185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13186$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13187if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13188 $as_echo_n "(cached) " >&6
13189else
13190 ac_check_lib_save_LIBS=$LIBS
13191LIBS="-lrt $LIBS"
13192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13193/* end confdefs.h. */
13194
13195/* Override any GCC internal prototype to avoid an error.
13196 Use char because int might match the return type of a GCC
13197 builtin and then its argument prototype would still apply. */
13198#ifdef __cplusplus
13199extern "C"
13200#endif
13201char clock_gettime ();
13202int
13203main ()
13204{
13205return clock_gettime ();
13206 ;
13207 return 0;
13208}
13209_ACEOF
13210if ac_fn_c_try_link "$LINENO"; then :
13211 ac_cv_lib_rt_clock_gettime=yes
13212else
13213 ac_cv_lib_rt_clock_gettime=no
13214fi
13215rm -f core conftest.err conftest.$ac_objext \
13216 conftest$ac_exeext conftest.$ac_ext
13217LIBS=$ac_check_lib_save_LIBS
13218fi
13219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13220$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13221if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13222
Victor Stinner7efb8332014-08-29 15:41:08 +020013223 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013224 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13225
13226
13227$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13228
13229
13230fi
13231
13232
13233fi
13234done
13235
13236
13237for ac_func in clock_getres
13238do :
13239 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13240if test "x$ac_cv_func_clock_getres" = xyes; then :
13241 cat >>confdefs.h <<_ACEOF
13242#define HAVE_CLOCK_GETRES 1
13243_ACEOF
13244
13245else
13246
13247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13248$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13249if ${ac_cv_lib_rt_clock_getres+:} false; then :
13250 $as_echo_n "(cached) " >&6
13251else
13252 ac_check_lib_save_LIBS=$LIBS
13253LIBS="-lrt $LIBS"
13254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13255/* end confdefs.h. */
13256
13257/* Override any GCC internal prototype to avoid an error.
13258 Use char because int might match the return type of a GCC
13259 builtin and then its argument prototype would still apply. */
13260#ifdef __cplusplus
13261extern "C"
13262#endif
13263char clock_getres ();
13264int
13265main ()
13266{
13267return clock_getres ();
13268 ;
13269 return 0;
13270}
13271_ACEOF
13272if ac_fn_c_try_link "$LINENO"; then :
13273 ac_cv_lib_rt_clock_getres=yes
13274else
13275 ac_cv_lib_rt_clock_getres=no
13276fi
13277rm -f core conftest.err conftest.$ac_objext \
13278 conftest$ac_exeext conftest.$ac_ext
13279LIBS=$ac_check_lib_save_LIBS
13280fi
13281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13282$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13283if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13284
13285 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13286
13287
13288fi
13289
13290
13291fi
13292done
13293
13294
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013295for ac_func in clock_settime
13296do :
13297 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13298if test "x$ac_cv_func_clock_settime" = xyes; then :
13299 cat >>confdefs.h <<_ACEOF
13300#define HAVE_CLOCK_SETTIME 1
13301_ACEOF
13302
13303else
13304
13305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13306$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13307if ${ac_cv_lib_rt_clock_settime+:} false; then :
13308 $as_echo_n "(cached) " >&6
13309else
13310 ac_check_lib_save_LIBS=$LIBS
13311LIBS="-lrt $LIBS"
13312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13313/* end confdefs.h. */
13314
13315/* Override any GCC internal prototype to avoid an error.
13316 Use char because int might match the return type of a GCC
13317 builtin and then its argument prototype would still apply. */
13318#ifdef __cplusplus
13319extern "C"
13320#endif
13321char clock_settime ();
13322int
13323main ()
13324{
13325return clock_settime ();
13326 ;
13327 return 0;
13328}
13329_ACEOF
13330if ac_fn_c_try_link "$LINENO"; then :
13331 ac_cv_lib_rt_clock_settime=yes
13332else
13333 ac_cv_lib_rt_clock_settime=no
13334fi
13335rm -f core conftest.err conftest.$ac_objext \
13336 conftest$ac_exeext conftest.$ac_ext
13337LIBS=$ac_check_lib_save_LIBS
13338fi
13339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13340$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13341if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13342
13343 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13344
13345
13346fi
13347
13348
13349fi
13350done
13351
13352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13354$as_echo_n "checking for major... " >&6; }
13355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013356/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013357
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013358#if defined(MAJOR_IN_MKDEV)
13359#include <sys/mkdev.h>
13360#elif defined(MAJOR_IN_SYSMACROS)
13361#include <sys/sysmacros.h>
13362#else
13363#include <sys/types.h>
13364#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013365
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013366int
13367main ()
13368{
13369
13370 makedev(major(0),minor(0));
13371
13372 ;
13373 return 0;
13374}
13375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013376if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013377
13378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13382$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013383
13384else
Skip Montanaro6dead952003-09-25 14:50:04 +000013385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13387$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013388
13389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013390rm -f core conftest.err conftest.$ac_objext \
13391 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013392
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013393# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013394# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13396$as_echo_n "checking for getaddrinfo... " >&6; }
13397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013398/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013399
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013400#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013401#include <sys/socket.h>
13402#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013403#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013404
Martin v. Löwis11437992002-04-12 09:54:03 +000013405int
13406main ()
13407{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013408getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 ;
13410 return 0;
13411}
13412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013413if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013414 have_getaddrinfo=yes
13415else
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013418rm -f core conftest.err conftest.$ac_objext \
13419 conftest$ac_exeext conftest.$ac_ext
13420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13421$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013422if test $have_getaddrinfo = yes
13423then
Matthias Kloseb9621712010-04-24 17:59:49 +000013424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13425$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013426 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013428else
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013430
13431if test "${enable_ipv6+set}" = set; then
13432 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13433else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013434 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013435fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013436else
Matthias Kloseb9621712010-04-24 17:59:49 +000013437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013438/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013439
Stefan Krah19c21392012-11-22 23:47:32 +010013440#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013441#include <sys/types.h>
13442#include <netdb.h>
13443#include <string.h>
13444#include <sys/socket.h>
13445#include <netinet/in.h>
13446
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013447int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013448{
13449 int passive, gaierr, inet4 = 0, inet6 = 0;
13450 struct addrinfo hints, *ai, *aitop;
13451 char straddr[INET6_ADDRSTRLEN], strport[16];
13452
13453 for (passive = 0; passive <= 1; passive++) {
13454 memset(&hints, 0, sizeof(hints));
13455 hints.ai_family = AF_UNSPEC;
13456 hints.ai_flags = passive ? AI_PASSIVE : 0;
13457 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013458 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013459 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13460 (void)gai_strerror(gaierr);
13461 goto bad;
13462 }
13463 for (ai = aitop; ai; ai = ai->ai_next) {
13464 if (ai->ai_addr == NULL ||
13465 ai->ai_addrlen == 0 ||
13466 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13467 straddr, sizeof(straddr), strport, sizeof(strport),
13468 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13469 goto bad;
13470 }
13471 switch (ai->ai_family) {
13472 case AF_INET:
13473 if (strcmp(strport, "54321") != 0) {
13474 goto bad;
13475 }
13476 if (passive) {
13477 if (strcmp(straddr, "0.0.0.0") != 0) {
13478 goto bad;
13479 }
13480 } else {
13481 if (strcmp(straddr, "127.0.0.1") != 0) {
13482 goto bad;
13483 }
13484 }
13485 inet4++;
13486 break;
13487 case AF_INET6:
13488 if (strcmp(strport, "54321") != 0) {
13489 goto bad;
13490 }
13491 if (passive) {
13492 if (strcmp(straddr, "::") != 0) {
13493 goto bad;
13494 }
13495 } else {
13496 if (strcmp(straddr, "::1") != 0) {
13497 goto bad;
13498 }
13499 }
13500 inet6++;
13501 break;
13502 case AF_UNSPEC:
13503 goto bad;
13504 break;
13505 default:
13506 /* another family support? */
13507 break;
13508 }
13509 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013510 freeaddrinfo(aitop);
13511 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013512 }
13513
13514 if (!(inet4 == 0 || inet4 == 2))
13515 goto bad;
13516 if (!(inet6 == 0 || inet6 == 2))
13517 goto bad;
13518
13519 if (aitop)
13520 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013521 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013522
13523 bad:
13524 if (aitop)
13525 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013526 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013527}
13528
Martin v. Löwis11437992002-04-12 09:54:03 +000013529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013531 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013538
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013539fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013540
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013542
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13544$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13545
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013546if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013547then
13548 if test $ipv6 = yes
13549 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013550 echo 'Fatal: You must get working getaddrinfo() function.'
13551 echo ' or you can specify "--disable-ipv6"'.
13552 exit 1
13553 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013554else
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013557
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013558fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013559
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013560for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013561do :
13562 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013563if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013565#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013566_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013567
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013568fi
13569done
13570
Michael W. Hudson54241132001-12-07 15:38:26 +000013571
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013572# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13574$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013575if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577else
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013579/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013580#include <sys/types.h>
13581#include <sys/time.h>
13582#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
Martin v. Löwis11437992002-04-12 09:54:03 +000013584int
13585main ()
13586{
13587if ((struct tm *) 0)
13588return 0;
13589 ;
13590 return 0;
13591}
13592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013593if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013594 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013595else
Matthias Kloseb9621712010-04-24 17:59:49 +000013596 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13601$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013602if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013603
Matthias Kloseb9621712010-04-24 17:59:49 +000013604$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013605
13606fi
13607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13609$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013610if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013612else
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013614/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013615#include <sys/types.h>
13616#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013617
Martin v. Löwis11437992002-04-12 09:54:03 +000013618int
13619main ()
13620{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013621struct tm tm;
13622 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013623 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 ;
13625 return 0;
13626}
13627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013628if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013629 ac_cv_struct_tm=time.h
13630else
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13636$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013637if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013638
Matthias Kloseb9621712010-04-24 17:59:49 +000013639$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013640
13641fi
13642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643ac_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 +000013644#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646"
Victor Stinnere0be4232011-10-25 13:06:09 +020013647if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013648
13649cat >>confdefs.h <<_ACEOF
13650#define HAVE_STRUCT_TM_TM_ZONE 1
13651_ACEOF
13652
13653
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013654fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013655
Martin v. Löwis11437992002-04-12 09:54:03 +000013656if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013659
13660else
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13662"
Victor Stinnere0be4232011-10-25 13:06:09 +020013663if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013667fi
13668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013669cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013670#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013671_ACEOF
13672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13674$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013675if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013677else
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013679/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013680#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013681#if !HAVE_DECL_TZNAME
13682extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013684
Martin v. Löwis11437992002-04-12 09:54:03 +000013685int
13686main ()
13687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013688return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 ;
13690 return 0;
13691}
13692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013693if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013694 ac_cv_var_tzname=yes
13695else
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013698rm -f core conftest.err conftest.$ac_objext \
13699 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13702$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013703 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013706
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013707 fi
13708fi
13709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710ac_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 +020013711if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013712
13713cat >>confdefs.h <<_ACEOF
13714#define HAVE_STRUCT_STAT_ST_RDEV 1
13715_ACEOF
13716
13717
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013718fi
13719
Matthias Kloseb9621712010-04-24 17:59:49 +000013720ac_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 +020013721if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013722
Martin v. Löwis11437992002-04-12 09:54:03 +000013723cat >>confdefs.h <<_ACEOF
13724#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13725_ACEOF
13726
13727
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013728fi
13729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730ac_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 +020013731if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013732
13733cat >>confdefs.h <<_ACEOF
13734#define HAVE_STRUCT_STAT_ST_FLAGS 1
13735_ACEOF
13736
13737
13738fi
13739
Matthias Kloseb9621712010-04-24 17:59:49 +000013740ac_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 +020013741if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013742
13743cat >>confdefs.h <<_ACEOF
13744#define HAVE_STRUCT_STAT_ST_GEN 1
13745_ACEOF
13746
13747
13748fi
13749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750ac_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 +020013751if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013752
13753cat >>confdefs.h <<_ACEOF
13754#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13755_ACEOF
13756
13757
13758fi
13759
Matthias Kloseb9621712010-04-24 17:59:49 +000013760ac_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 +020013761if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013762
Martin v. Löwis11437992002-04-12 09:54:03 +000013763cat >>confdefs.h <<_ACEOF
13764#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13765_ACEOF
13766
13767
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013768fi
13769
Stefan Krah267b6392016-04-26 01:09:18 +020013770ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13771 #include <sys/types.h>
13772 #include <pwd.h>
13773
13774"
13775if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13776
13777cat >>confdefs.h <<_ACEOF
13778#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13779_ACEOF
13780
13781
13782fi
13783ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13784 #include <sys/types.h>
13785 #include <pwd.h>
13786
13787"
13788if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13789
13790cat >>confdefs.h <<_ACEOF
13791#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13792_ACEOF
13793
13794
13795fi
13796
Zachary Ware6a6967e2016-10-01 00:47:27 -050013797# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13798ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13799"
13800if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13801
13802cat >>confdefs.h <<_ACEOF
13803#define HAVE_SIGINFO_T_SI_BAND 1
13804_ACEOF
13805
13806
13807fi
13808
Michael W. Hudson54241132001-12-07 15:38:26 +000013809
Matthias Kloseb9621712010-04-24 17:59:49 +000013810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13811$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013812if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013814else
Matthias Kloseb159a552010-04-25 21:00:44 +000013815
Matthias Kloseb9621712010-04-24 17:59:49 +000013816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013817/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013818#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013819int
13820main ()
13821{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013822return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 ;
13824 return 0;
13825}
13826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013827if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013828 ac_cv_header_time_altzone=yes
13829else
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834fi
13835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13837$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013838if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013839
Matthias Kloseb9621712010-04-24 17:59:49 +000013840$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013841
13842fi
13843
Guido van Rossumda88dad1995-01-26 00:46:29 +000013844was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13846$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013848/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013849
13850#include <sys/types.h>
13851#include <sys/select.h>
13852#include <sys/time.h>
13853
Martin v. Löwis11437992002-04-12 09:54:03 +000013854int
13855main ()
13856{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857;
Martin v. Löwis11437992002-04-12 09:54:03 +000013858 ;
13859 return 0;
13860}
13861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013862if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013863
13864
Matthias Kloseb9621712010-04-24 17:59:49 +000013865$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013867 was_it_defined=yes
13868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13872$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13875$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013876if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013878else
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013880/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013881#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013882int
13883main ()
13884{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013885struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013886 ;
13887 return 0;
13888}
13889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013890if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013891 ac_cv_struct_addrinfo=yes
13892else
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13896fi
13897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13899$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013900if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013903
13904fi
13905
Matthias Kloseb9621712010-04-24 17:59:49 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13907$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013908if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013910else
Matthias Kloseb9621712010-04-24 17:59:49 +000013911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013912/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013913
13914# include <sys/types.h>
13915# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013916int
13917main ()
13918{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013919struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 ;
13921 return 0;
13922}
13923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013924if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013925 ac_cv_struct_sockaddr_storage=yes
13926else
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13930fi
13931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13933$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013934if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013935
Matthias Kloseb9621712010-04-24 17:59:49 +000013936$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013937
13938fi
13939
Christian Heimesdffa3942016-09-05 23:54:41 +020013940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13941$as_echo_n "checking for sockaddr_alg... " >&6; }
13942if ${ac_cv_struct_sockaddr_alg+:} false; then :
13943 $as_echo_n "(cached) " >&6
13944else
13945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13946/* end confdefs.h. */
13947
13948# include <sys/types.h>
13949# include <sys/socket.h>
13950# include <linux/if_alg.h>
13951int
13952main ()
13953{
13954struct sockaddr_alg s
13955 ;
13956 return 0;
13957}
13958_ACEOF
13959if ac_fn_c_try_compile "$LINENO"; then :
13960 ac_cv_struct_sockaddr_alg=yes
13961else
13962 ac_cv_struct_sockaddr_alg=no
13963fi
13964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13965fi
13966
13967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13968$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13969if test $ac_cv_struct_sockaddr_alg = yes; then
13970
13971$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13972
13973fi
13974
Guido van Rossum627b2d71993-12-24 10:39:16 +000013975# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13978$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013979if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013980 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013981else
Matthias Kloseb9621712010-04-24 17:59:49 +000013982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013984$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013985int
13986main ()
13987{
13988static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013989test_array [0] = 0;
13990return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013991
13992 ;
13993 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013994}
Martin v. Löwis11437992002-04-12 09:54:03 +000013995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013996if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013997 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013998else
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
14004$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014005if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014006 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014007
14008fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
14011$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014012if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014014else
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014016/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014017
Martin v. Löwis11437992002-04-12 09:54:03 +000014018int
14019main ()
14020{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014023 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014024 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014025 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000014026 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027 char const *const *pcpcc;
14028 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000014029 /* NEC SVR4.0.2 mips cc rejects this. */
14030 struct point {int x, y;};
14031 static struct point const zero = {0,0};
14032 /* AIX XL C 1.02.0.0 rejects this.
14033 It does not let you subtract one const X* pointer from another in
14034 an arm of an if-expression whose if-part is not a constant
14035 expression */
14036 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014037 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014038 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014039 ++pcpcc;
14040 ppc = (char**) pcpcc;
14041 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014042 { /* SCO 3.2v4 cc rejects this sort of thing. */
14043 char tx;
14044 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000014045 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014046
Martin v. Löwis11437992002-04-12 09:54:03 +000014047 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014048 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014049 }
14050 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14051 int x[] = {25, 17};
14052 const int *foo = &x[0];
14053 ++foo;
14054 }
14055 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14056 typedef const int *iptr;
14057 iptr p = 0;
14058 ++p;
14059 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014060 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014062 struct s { int j; const int *ap[3]; } bx;
14063 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 }
14065 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14066 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014067 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014070#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014071
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 ;
14073 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014074}
Martin v. Löwis11437992002-04-12 09:54:03 +000014075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014076if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014077 ac_cv_c_const=yes
14078else
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14084$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014085if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014086
Matthias Kloseb9621712010-04-24 17:59:49 +000014087$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014088
14089fi
14090
Michael W. Hudson54241132001-12-07 15:38:26 +000014091
Guido van Rossumda88dad1995-01-26 00:46:29 +000014092works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14094$as_echo_n "checking for working signed char... " >&6; }
14095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014096/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014097
Martin v. Löwis11437992002-04-12 09:54:03 +000014098int
14099main ()
14100{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014101signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014102 ;
14103 return 0;
14104}
14105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014106if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014107 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014108else
Skip Montanaro6dead952003-09-25 14:50:04 +000014109
Matthias Kloseb9621712010-04-24 17:59:49 +000014110$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014111
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014112
Guido van Rossum7f43da71994-08-01 12:15:30 +000014113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14116$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014117
Guido van Rossumda88dad1995-01-26 00:46:29 +000014118have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14120$as_echo_n "checking for prototypes... " >&6; }
14121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014122/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014123int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014124int
14125main ()
14126{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014127return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014128 ;
14129 return 0;
14130}
14131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014132if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014133
Matthias Kloseb9621712010-04-24 17:59:49 +000014134$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014135
Matthias Kloseb159a552010-04-25 21:00:44 +000014136 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14140$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014141
Guido van Rossumda88dad1995-01-26 00:46:29 +000014142works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14144$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014146/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014147
14148#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014149int foo(int x, ...) {
14150 va_list va;
14151 va_start(va, x);
14152 va_arg(va, int);
14153 va_arg(va, char *);
14154 va_arg(va, double);
14155 return 0;
14156}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014157
Martin v. Löwis11437992002-04-12 09:54:03 +000014158int
14159main ()
14160{
Guido van Rossum90eea071996-08-30 20:58:57 +000014161return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014162 ;
14163 return 0;
14164}
14165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014166if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
14168
Matthias Kloseb9621712010-04-24 17:59:49 +000014169$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014170
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014171 works=yes
14172
Guido van Rossum627b2d71993-12-24 10:39:16 +000014173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14176$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014177
Martin v. Löwisd6320502004-08-12 13:45:08 +000014178# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14180$as_echo_n "checking for socketpair... " >&6; }
14181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014182/* end confdefs.h. */
14183
14184#include <sys/types.h>
14185#include <sys/socket.h>
14186
14187int
14188main ()
14189{
14190void *x=socketpair
14191 ;
14192 return 0;
14193}
14194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014195if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014196
Matthias Kloseb9621712010-04-24 17:59:49 +000014197$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014198
Matthias Kloseb159a552010-04-25 21:00:44 +000014199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014200$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014201else
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14203$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014204
14205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014207
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014208# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14210$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014212/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014213#include <sys/types.h>
14214#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014215int
14216main ()
14217{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014218struct sockaddr x;
14219x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014220 ;
14221 return 0;
14222}
14223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014224if ac_fn_c_try_compile "$LINENO"; then :
14225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14226$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014227
Matthias Kloseb9621712010-04-24 17:59:49 +000014228$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014229
14230else
Matthias Kloseb9621712010-04-24 17:59:49 +000014231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14232$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014233
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014236
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014237# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014238
14239
Matthias Kloseb9621712010-04-24 17:59:49 +000014240ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014241if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014242
Matthias Kloseb9621712010-04-24 17:59:49 +000014243 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014244
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14246$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014247 OLD_CFLAGS=$CFLAGS
14248 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014250/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014251
14252# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014253
Martin v. Löwis11437992002-04-12 09:54:03 +000014254int
14255main ()
14256{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014257
14258 char *name;
14259 struct hostent *he, *res;
14260 char buffer[2048];
14261 int buflen = 2048;
14262 int h_errnop;
14263
14264 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014265
14266 ;
14267 return 0;
14268}
14269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014270if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014271
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014273
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
Matthias Kloseb9621712010-04-24 17:59:49 +000014275$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014276
Matthias Kloseb9621712010-04-24 17:59:49 +000014277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14278$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014279
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014280else
Skip Montanaro6dead952003-09-25 14:50:04 +000014281
Matthias Kloseb9621712010-04-24 17:59:49 +000014282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14283$as_echo "no" >&6; }
14284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14285$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014287/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014288
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014289# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014290
Martin v. Löwis11437992002-04-12 09:54:03 +000014291int
14292main ()
14293{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014294
14295 char *name;
14296 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014297 char buffer[2048];
14298 int buflen = 2048;
14299 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014300
Matthias Kloseb159a552010-04-25 21:00:44 +000014301 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014302
14303 ;
14304 return 0;
14305}
14306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014310
Martin v. Löwis11437992002-04-12 09:54:03 +000014311
Matthias Kloseb159a552010-04-25 21:00:44 +000014312$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014313
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14315$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014316
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014317else
Skip Montanaro6dead952003-09-25 14:50:04 +000014318
Matthias Kloseb9621712010-04-24 17:59:49 +000014319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14320$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14322$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14324/* end confdefs.h. */
14325
14326# include <netdb.h>
14327
14328int
14329main ()
14330{
14331
14332 char *name;
14333 struct hostent *he;
14334 struct hostent_data data;
14335
14336 (void) gethostbyname_r(name, he, &data);
14337
14338 ;
14339 return 0;
14340}
14341_ACEOF
14342if ac_fn_c_try_compile "$LINENO"; then :
14343
14344 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14345
14346
14347$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14348
14349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14350$as_echo "yes" >&6; }
14351
14352else
14353
14354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14355$as_echo "no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014365 CFLAGS=$OLD_CFLAGS
14366
14367else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014368
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 for ac_func in gethostbyname
14370do :
14371 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014372if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014373 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014374#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014375_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014376
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014377fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014378done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014379
Michael W. Hudson54241132001-12-07 15:38:26 +000014380
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014381fi
14382
Michael W. Hudson54241132001-12-07 15:38:26 +000014383
14384
14385
14386
14387
14388
Guido van Rossum627b2d71993-12-24 10:39:16 +000014389# checks for system services
14390# (none yet)
14391
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014392# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014393ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014394if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014395
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014396else
Matthias Kloseb9621712010-04-24 17:59:49 +000014397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14398$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014399if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014401else
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014403LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407/* Override any GCC internal prototype to avoid an error.
14408 Use char because int might match the return type of a GCC
14409 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014410#ifdef __cplusplus
14411extern "C"
14412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014413char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014414int
14415main ()
14416{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014418 ;
14419 return 0;
14420}
14421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014422if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014424else
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014427rm -f core conftest.err conftest.$ac_objext \
14428 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014429LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14432$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014433if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014434 cat >>confdefs.h <<_ACEOF
14435#define HAVE_LIBIEEE 1
14436_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014437
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014438 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014439
Guido van Rossum627b2d71993-12-24 10:39:16 +000014440fi
14441
Michael W. Hudson54241132001-12-07 15:38:26 +000014442
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014443fi
14444
Michael W. Hudson54241132001-12-07 15:38:26 +000014445
Guido van Rossum7f43da71994-08-01 12:15:30 +000014446# check for --with-libm=...
14447
Guido van Rossum563e7081996-09-10 18:20:48 +000014448case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014449Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014450*) LIBM=-lm
14451esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14453$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014456if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014458if test "$withval" = no
14459then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14461$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014462elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014463then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14465$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014466else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014467fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014468else
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14470$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471fi
14472
Guido van Rossum7f43da71994-08-01 12:15:30 +000014473
14474# check for --with-libc=...
14475
Matthias Kloseb9621712010-04-24 17:59:49 +000014476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14477$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014480if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014482if test "$withval" = no
14483then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14485$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014486elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014487then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14489$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014490else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014491fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014492else
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14494$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495fi
14496
Guido van Rossum7f43da71994-08-01 12:15:30 +000014497
Stefan Krah1919b7e2012-03-21 18:25:23 +010014498# **************************************
14499# * Check for gcc x64 inline assembler *
14500# **************************************
14501
14502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14503$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14505/* end confdefs.h. */
14506
14507int
14508main ()
14509{
14510
14511 __asm__ __volatile__ ("movq %rcx, %rax");
14512
14513 ;
14514 return 0;
14515}
14516_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014517if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014518 have_gcc_asm_for_x64=yes
14519else
14520 have_gcc_asm_for_x64=no
14521fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014522rm -f core conftest.err conftest.$ac_objext \
14523 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14525$as_echo "$have_gcc_asm_for_x64" >&6; }
14526if test "$have_gcc_asm_for_x64" = yes
14527then
14528
14529$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14530
14531fi
14532
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014533# **************************************************
14534# * Check for various properties of floating point *
14535# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014536
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14538$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14539if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014541else
14542
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014543
14544ax_cv_c_float_words_bigendian=unknown
14545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014546/* end confdefs.h. */
14547
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014548
14549double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14550
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014551
14552_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014553if ac_fn_c_try_compile "$LINENO"; then :
14554
14555
Arnon Yaari5dd83602020-04-01 18:19:09 +030014556if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014557 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014558fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014559if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014560 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14561 ax_cv_c_float_words_bigendian=no
14562 else
14563 ax_cv_c_float_words_bigendian=unknown
14564 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014565fi
14566
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014567
14568fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014570fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14572$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014573
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014574case $ax_cv_c_float_words_bigendian in
14575 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014576
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014577$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14578 ;;
14579 no)
14580 ;;
14581 *)
14582 as_fn_error $? "
14583
14584Unknown float word ordering. You need to manually preset
14585ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14586
14587 " "$LINENO" 5 ;;
14588esac
14589
14590
14591if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014592then
14593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014595
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014596elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014597then
14598
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014599$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14600
14601else
14602 # Some ARM platforms use a mixed-endian representation for doubles.
14603 # While Python doesn't currently have full support for these platforms
14604 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14605 # conversions work.
14606 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14607 # or little, then it must be this?
14608
Matthias Kloseb9621712010-04-24 17:59:49 +000014609$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014610
14611fi
14612
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014613# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014614# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014615# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014616# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014617# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014618# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014619
14620# This inline assembler syntax may also work for suncc and icc,
14621# so we try it on all platforms.
14622
Matthias Kloseb9621712010-04-24 17:59:49 +000014623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14624$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014626/* end confdefs.h. */
14627
14628int
14629main ()
14630{
14631
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014632 unsigned short cw;
14633 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14634 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014635
14636 ;
14637 return 0;
14638}
14639_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014640if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014641 have_gcc_asm_for_x87=yes
14642else
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014644fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014645rm -f core conftest.err conftest.$ac_objext \
14646 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14648$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014649if test "$have_gcc_asm_for_x87" = yes
14650then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014651
Matthias Kloseb9621712010-04-24 17:59:49 +000014652$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014653
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014655
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14657$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14659/* end confdefs.h. */
14660
14661int
14662main ()
14663{
14664
14665 unsigned int fpcr;
14666 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14667 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14668
14669 ;
14670 return 0;
14671}
14672_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014673if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014674 have_gcc_asm_for_mc68881=yes
14675else
14676 have_gcc_asm_for_mc68881=no
14677fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014678rm -f core conftest.err conftest.$ac_objext \
14679 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14681$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14682if test "$have_gcc_asm_for_mc68881" = yes
14683then
14684
14685$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14686
14687fi
14688
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014689# Detect whether system arithmetic is subject to x87-style double
14690# rounding issues. The result of this test has little meaning on non
14691# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14692# mode is round-to-nearest and double rounding issues are present, and
14693# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14695$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014696# $BASECFLAGS may affect the result
14697ac_save_cc="$CC"
14698CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014699if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014700 ac_cv_x87_double_rounding=no
14701else
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014703/* end confdefs.h. */
14704
14705#include <stdlib.h>
14706#include <math.h>
14707int main() {
14708 volatile double x, y, z;
14709 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14710 x = 0.99999999999999989; /* 1-2**-53 */
14711 y = 1./x;
14712 if (y != 1.)
14713 exit(0);
14714 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14715 x = 1e16;
14716 y = 2.99999;
14717 z = x + y;
14718 if (z != 1e16+4.)
14719 exit(0);
14720 /* both tests show evidence of double rounding */
14721 exit(1);
14722}
14723
14724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014725if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014726 ac_cv_x87_double_rounding=no
14727else
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014732fi
14733
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014734CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14736$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014737if test "$ac_cv_x87_double_rounding" = yes
14738then
14739
Matthias Kloseb9621712010-04-24 17:59:49 +000014740$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014741
14742fi
14743
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014744# ************************************
14745# * Check for mathematical functions *
14746# ************************************
14747
14748LIBS_SAVE=$LIBS
14749LIBS="$LIBS $LIBM"
14750
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014751for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14752do :
14753 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14754ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014755if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014756 cat >>confdefs.h <<_ACEOF
14757#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14758_ACEOF
14759
14760fi
14761done
14762
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014763for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014764do :
14765 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14766ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014767if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014768 cat >>confdefs.h <<_ACEOF
14769#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14770_ACEOF
14771
14772fi
14773done
14774
14775ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14776"
Victor Stinnere0be4232011-10-25 13:06:09 +020014777if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014778 ac_have_decl=1
14779else
14780 ac_have_decl=0
14781fi
14782
14783cat >>confdefs.h <<_ACEOF
14784#define HAVE_DECL_ISINF $ac_have_decl
14785_ACEOF
14786ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14787"
Victor Stinnere0be4232011-10-25 13:06:09 +020014788if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014789 ac_have_decl=1
14790else
14791 ac_have_decl=0
14792fi
14793
14794cat >>confdefs.h <<_ACEOF
14795#define HAVE_DECL_ISNAN $ac_have_decl
14796_ACEOF
14797ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14798"
Victor Stinnere0be4232011-10-25 13:06:09 +020014799if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014800 ac_have_decl=1
14801else
14802 ac_have_decl=0
14803fi
14804
14805cat >>confdefs.h <<_ACEOF
14806#define HAVE_DECL_ISFINITE $ac_have_decl
14807_ACEOF
14808
14809
Mark Dickinsona614f042009-11-28 12:48:43 +000014810# For multiprocessing module, check that sem_open
14811# actually works. For FreeBSD versions <= 7.2,
14812# the kernel module that provides POSIX semaphores
14813# isn't loaded by default, so an attempt to call
14814# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14816$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014817if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014819else
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014821 ac_cv_posix_semaphores_enabled=yes
14822else
Matthias Kloseb9621712010-04-24 17:59:49 +000014823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014824/* end confdefs.h. */
14825
14826#include <unistd.h>
14827#include <fcntl.h>
14828#include <stdio.h>
14829#include <semaphore.h>
14830#include <sys/stat.h>
14831
14832int main(void) {
14833 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14834 if (a == SEM_FAILED) {
14835 perror("sem_open");
14836 return 1;
14837 }
14838 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014839 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014840 return 0;
14841}
14842
14843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014844if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014845 ac_cv_posix_semaphores_enabled=yes
14846else
Matthias Kloseb9621712010-04-24 17:59:49 +000014847 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014851fi
14852
14853
Mark Dickinsona614f042009-11-28 12:48:43 +000014854fi
14855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14857$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014858if test $ac_cv_posix_semaphores_enabled = no
14859then
14860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014862
14863fi
14864
Mark Dickinson10683072009-04-18 21:18:19 +000014865# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14867$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014868if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014870else
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014872 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014873else
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014875/* end confdefs.h. */
14876
14877#include <unistd.h>
14878#include <fcntl.h>
14879#include <stdio.h>
14880#include <semaphore.h>
14881#include <sys/stat.h>
14882
14883int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014884 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014885 int count;
14886 int res;
14887 if(a==SEM_FAILED){
14888 perror("sem_open");
14889 return 1;
14890
14891 }
14892 res = sem_getvalue(a, &count);
14893 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014894 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014895 return res==-1 ? 1 : 0;
14896}
14897
Mark Dickinson10683072009-04-18 21:18:19 +000014898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014899if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014900 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014901else
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14905 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014906fi
14907
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014908
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014909fi
14910
Matthias Kloseb9621712010-04-24 17:59:49 +000014911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14912$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014913if test $ac_cv_broken_sem_getvalue = yes
14914then
14915
Matthias Kloseb9621712010-04-24 17:59:49 +000014916$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014917
14918fi
14919
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014920ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14921"
14922if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14923 ac_have_decl=1
14924else
14925 ac_have_decl=0
14926fi
14927
14928cat >>confdefs.h <<_ACEOF
14929#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14930_ACEOF
14931ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14932"
14933if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14934 ac_have_decl=1
14935else
14936 ac_have_decl=0
14937fi
14938
14939cat >>confdefs.h <<_ACEOF
14940#define HAVE_DECL_RTLD_NOW $ac_have_decl
14941_ACEOF
14942ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14943"
14944if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14945 ac_have_decl=1
14946else
14947 ac_have_decl=0
14948fi
14949
14950cat >>confdefs.h <<_ACEOF
14951#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14952_ACEOF
14953ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14954"
14955if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14956 ac_have_decl=1
14957else
14958 ac_have_decl=0
14959fi
14960
14961cat >>confdefs.h <<_ACEOF
14962#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14963_ACEOF
14964ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14965"
14966if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14967 ac_have_decl=1
14968else
14969 ac_have_decl=0
14970fi
14971
14972cat >>confdefs.h <<_ACEOF
14973#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14974_ACEOF
14975ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14976"
14977if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14978 ac_have_decl=1
14979else
14980 ac_have_decl=0
14981fi
14982
14983cat >>confdefs.h <<_ACEOF
14984#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14985_ACEOF
14986ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14987"
14988if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14989 ac_have_decl=1
14990else
14991 ac_have_decl=0
14992fi
14993
14994cat >>confdefs.h <<_ACEOF
14995#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14996_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014997ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14998"
14999if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
15000 ac_have_decl=1
15001else
15002 ac_have_decl=0
15003fi
15004
15005cat >>confdefs.h <<_ACEOF
15006#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
15007_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030015008
15009
Mark Dickinsonbd792642009-03-18 20:06:12 +000015010# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000015011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
15012$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015013# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015014if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000015015 enableval=$enable_big_digits; case $enable_big_digits in
15016yes)
15017 enable_big_digits=30 ;;
15018no)
15019 enable_big_digits=15 ;;
1502015|30)
15021 ;;
15022*)
Victor Stinnere0be4232011-10-25 13:06:09 +020015023 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 +000015024esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
15026$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015027
15028cat >>confdefs.h <<_ACEOF
15029#define PYLONG_BITS_IN_DIGIT $enable_big_digits
15030_ACEOF
15031
15032
15033else
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15035$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015036fi
15037
15038
Guido van Rossumef2255b2000-03-10 22:30:29 +000015039# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015040ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020015041if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015042
15043
Matthias Kloseb9621712010-04-24 17:59:49 +000015044$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015045
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015046 wchar_h="yes"
15047
Guido van Rossumef2255b2000-03-10 22:30:29 +000015048else
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015050
15051fi
15052
Michael W. Hudson54241132001-12-07 15:38:26 +000015053
Martin v. Löwis11437992002-04-12 09:54:03 +000015054
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015055# determine wchar_t size
15056if test "$wchar_h" = yes
15057then
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15060# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15061# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000015062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15063$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015064if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015066else
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
15068"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015069
Martin v. Löwis11437992002-04-12 09:54:03 +000015070else
Matthias Kloseb9621712010-04-24 17:59:49 +000015071 if test "$ac_cv_type_wchar_t" = yes; then
15072 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015074as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015075See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076 else
15077 ac_cv_sizeof_wchar_t=0
15078 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015080
Martin v. Löwis11437992002-04-12 09:54:03 +000015081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15083$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084
15085
15086
Martin v. Löwis11437992002-04-12 09:54:03 +000015087cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015088#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015089_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015090
Michael W. Hudson54241132001-12-07 15:38:26 +000015091
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015092fi
15093
Matthias Kloseb9621712010-04-24 17:59:49 +000015094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15095$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015096have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015098/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015099
15100#include <tcl.h>
15101#if TCL_UTF_MAX != 6
15102# error "NOT UCS4_TCL"
15103#endif
15104int
15105main ()
15106{
15107
15108 ;
15109 return 0;
15110}
15111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015112if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015113
15114
Matthias Kloseb9621712010-04-24 17:59:49 +000015115$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015116
15117 have_ucs4_tcl=yes
15118
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15122$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015123
Skip Montanaro6dead952003-09-25 14:50:04 +000015124# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015125if test "$wchar_h" = yes
15126then
15127 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15129$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015130 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015132else
15133
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015135 ac_cv_wchar_t_signed=yes
15136else
Matthias Kloseb9621712010-04-24 17:59:49 +000015137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015138/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015139
15140 #include <wchar.h>
15141 int main()
15142 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015143 /* Success: exit code 0 */
Joshua Root674fa0a2020-12-14 07:56:34 +110015144 return ((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015145 }
15146
15147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015148if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015149 ac_cv_wchar_t_signed=yes
15150else
Matthias Kloseb9621712010-04-24 17:59:49 +000015151 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15154 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015155fi
15156
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015157fi
15158
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15160$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161fi
15162
Michael Osipov3738fad2018-08-24 18:17:19 +020015163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15164$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015165# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015166if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015167 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015168then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015169
Matthias Kloseb9621712010-04-24 17:59:49 +000015170$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015171
Michael Osipov3738fad2018-08-24 18:17:19 +020015172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15173$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015174else
Michael Osipov3738fad2018-08-24 18:17:19 +020015175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15176$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015177fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015178
15179# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15181$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015182if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015184else
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 ac_cv_c_bigendian=unknown
15186 # See if we're dealing with a universal compiler.
15187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15188/* end confdefs.h. */
15189#ifndef __APPLE_CC__
15190 not a universal capable compiler
15191 #endif
15192 typedef int dummy;
15193
Skip Montanaro6dead952003-09-25 14:50:04 +000015194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015195if ac_fn_c_try_compile "$LINENO"; then :
15196
15197 # Check for potential -arch flags. It is not universal unless
15198 # there are at least two -arch flags with different values.
15199 ac_arch=
15200 ac_prev=
15201 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15202 if test -n "$ac_prev"; then
15203 case $ac_word in
15204 i?86 | x86_64 | ppc | ppc64)
15205 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15206 ac_arch=$ac_word
15207 else
15208 ac_cv_c_bigendian=universal
15209 break
15210 fi
15211 ;;
15212 esac
15213 ac_prev=
15214 elif test "x$ac_word" = "x-arch"; then
15215 ac_prev=arch
15216 fi
15217 done
15218fi
15219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15220 if test $ac_cv_c_bigendian = unknown; then
15221 # See if sys/param.h defines the BYTE_ORDER macro.
15222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015223/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015224#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015226
Martin v. Löwis11437992002-04-12 09:54:03 +000015227int
15228main ()
15229{
Matthias Kloseb9621712010-04-24 17:59:49 +000015230#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15231 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15232 && LITTLE_ENDIAN)
15233 bogus endian macros
15234 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015235
15236 ;
15237 return 0;
15238}
15239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015240if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015241 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015243/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015244#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015246
Martin v. Löwis11437992002-04-12 09:54:03 +000015247int
15248main ()
15249{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015250#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015251 not big endian
15252 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015253
15254 ;
15255 return 0;
15256}
15257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015258if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015259 ac_cv_c_bigendian=yes
15260else
Matthias Kloseb9621712010-04-24 17:59:49 +000015261 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015264fi
15265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15266 fi
15267 if test $ac_cv_c_bigendian = unknown; then
15268 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015270/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015271#include <limits.h>
15272
Martin v. Löwis11437992002-04-12 09:54:03 +000015273int
15274main ()
15275{
Matthias Kloseb9621712010-04-24 17:59:49 +000015276#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15277 bogus endian macros
15278 #endif
15279
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 ;
15281 return 0;
15282}
15283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015284if ac_fn_c_try_compile "$LINENO"; then :
15285 # It does; now see whether it defined to _BIG_ENDIAN or not.
15286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15287/* end confdefs.h. */
15288#include <limits.h>
15289
15290int
15291main ()
15292{
15293#ifndef _BIG_ENDIAN
15294 not big endian
15295 #endif
15296
15297 ;
15298 return 0;
15299}
15300_ACEOF
15301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015302 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015303else
Matthias Kloseb9621712010-04-24 17:59:49 +000015304 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15307fi
15308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15309 fi
15310 if test $ac_cv_c_bigendian = unknown; then
15311 # Compile a test program.
15312 if test "$cross_compiling" = yes; then :
15313 # Try to guess by grepping values from an object file.
15314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15315/* end confdefs.h. */
15316short int ascii_mm[] =
15317 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15318 short int ascii_ii[] =
15319 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15320 int use_ascii (int i) {
15321 return ascii_mm[i] + ascii_ii[i];
15322 }
15323 short int ebcdic_ii[] =
15324 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15325 short int ebcdic_mm[] =
15326 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15327 int use_ebcdic (int i) {
15328 return ebcdic_mm[i] + ebcdic_ii[i];
15329 }
15330 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015331
Matthias Kloseb9621712010-04-24 17:59:49 +000015332int
15333main ()
15334{
15335return use_ascii (foo) == use_ebcdic (foo);
15336 ;
15337 return 0;
15338}
15339_ACEOF
15340if ac_fn_c_try_compile "$LINENO"; then :
15341 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15342 ac_cv_c_bigendian=yes
15343 fi
15344 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15345 if test "$ac_cv_c_bigendian" = unknown; then
15346 ac_cv_c_bigendian=no
15347 else
15348 # finding both strings is unlikely to happen, but who knows?
15349 ac_cv_c_bigendian=unknown
15350 fi
15351 fi
15352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015354else
Matthias Kloseb9621712010-04-24 17:59:49 +000015355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015356/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015357$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015358int
15359main ()
15360{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 /* Are we little or big endian? From Harbison&Steele. */
15363 union
15364 {
15365 long int l;
15366 char c[sizeof (long int)];
15367 } u;
15368 u.l = 1;
15369 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370
15371 ;
15372 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015373}
Martin v. Löwis11437992002-04-12 09:54:03 +000015374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015375if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015376 ac_cv_c_bigendian=no
15377else
Matthias Kloseb9621712010-04-24 17:59:49 +000015378 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15381 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015383
Matthias Kloseb9621712010-04-24 17:59:49 +000015384 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15387$as_echo "$ac_cv_c_bigendian" >&6; }
15388 case $ac_cv_c_bigendian in #(
15389 yes)
15390 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15391;; #(
15392 no)
15393 ;; #(
15394 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015395
Matthias Kloseb9621712010-04-24 17:59:49 +000015396$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015397
Matthias Kloseb9621712010-04-24 17:59:49 +000015398 ;; #(
15399 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015400 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015401 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015402 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015403
Michael W. Hudson54241132001-12-07 15:38:26 +000015404
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015405# ABI version string for Python extension modules. This appears between the
15406# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15407# from the following attributes which affect the ABI of this Python build (in
15408# this order):
15409#
15410# * The Python implementation (always 'cpython-' for us)
15411# * The major and minor version numbers
15412# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015413#
15414# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015415# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15416# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015417#
15418# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15419# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015420
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15422$as_echo_n "checking ABIFLAGS... " >&6; }
15423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15424$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15426$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015427SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15429$as_echo "$SOABI" >&6; }
15430
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015431# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15432if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015433 # Similar to SOABI but remove "d" flag from ABIFLAGS
15434
15435 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15436
15437cat >>confdefs.h <<_ACEOF
15438#define ALT_SOABI "${ALT_SOABI}"
15439_ACEOF
15440
15441fi
15442
Victor Stinner52a327c2020-12-23 03:41:08 +010015443
Matti Picusa44ce6c2020-12-20 04:56:57 +020015444EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015445
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15447$as_echo_n "checking LDVERSION... " >&6; }
15448LDVERSION='$(VERSION)$(ABIFLAGS)'
15449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15450$as_echo "$LDVERSION" >&6; }
15451
E. M. Brayc994c8f2019-05-24 17:33:47 +020015452# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015453
E. M. Brayb1fc4172019-05-24 18:39:39 +020015454if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015455 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015456else
15457 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015458fi
15459
doko@python.org87421192013-01-26 11:39:31 +010015460
Victor Stinner51ae31e2020-06-09 15:32:43 +020015461
15462BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15463
15464
15465# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015466# /usr/$LIDIRNAME/python$VERSION
15467
15468PLATLIBDIR="lib"
15469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15470$as_echo_n "checking for --with-platlibdir... " >&6; }
15471
15472# Check whether --with-platlibdir was given.
15473if test "${with_platlibdir+set}" = set; then :
15474 withval=$with_platlibdir;
15475# ignore 3 options:
15476# --with-platlibdir
15477# --with-platlibdir=
15478# --without-platlibdir
15479if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15480then
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15482$as_echo "yes" >&6; }
15483 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015484 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015485else
Victor Stinner8510f432020-03-10 09:53:09 +010015486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15487$as_echo "no" >&6; }
15488fi
15489else
15490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15491$as_echo "no" >&6; }
15492fi
15493
15494
15495
15496
15497if test x$PLATFORM_TRIPLET = x; then
15498 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15499else
15500 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015501fi
doko@python.org87421192013-01-26 11:39:31 +010015502
15503
Victor Stinner75e59a92021-01-20 17:07:21 +010015504# Check for --with-wheel-pkg-dir=PATH
15505
15506WHEEL_PKG_DIR=""
15507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5
15508$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; }
15509
15510# Check whether --with-wheel-pkg-dir was given.
15511if test "${with_wheel_pkg_dir+set}" = set; then :
15512 withval=$with_wheel_pkg_dir;
15513if test -n "$withval"; then
15514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15515$as_echo "yes" >&6; }
15516 WHEEL_PKG_DIR="$withval"
15517else
15518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15519$as_echo "no" >&6; }
15520fi
15521else
15522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15523$as_echo "no" >&6; }
15524fi
15525
15526
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015527# Check whether right shifting a negative integer extends the sign bit
15528# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15530$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015531if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015533else
Martin v. Löwis11437992002-04-12 09:54:03 +000015534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015536 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015537else
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015539/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015540
15541int main()
15542{
Joshua Root674fa0a2020-12-14 07:56:34 +110015543 return (((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015544}
15545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015547if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015548 ac_cv_rshift_extends_sign=yes
15549else
Matthias Kloseb9621712010-04-24 17:59:49 +000015550 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015551fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015552rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15553 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015554fi
15555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015556fi
15557
Matthias Kloseb9621712010-04-24 17:59:49 +000015558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15559$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015560if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015561then
Martin v. Löwis11437992002-04-12 09:54:03 +000015562
Matthias Kloseb9621712010-04-24 17:59:49 +000015563$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015564
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015565fi
15566
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015567# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15569$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015570if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015571 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015572else
Martin v. Löwis11437992002-04-12 09:54:03 +000015573
Matthias Kloseb9621712010-04-24 17:59:49 +000015574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015575/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015576#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015577int
15578main ()
15579{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015580
15581 FILE *f = fopen("/dev/null", "r");
15582 flockfile(f);
15583 getc_unlocked(f);
15584 funlockfile(f);
15585
Martin v. Löwis11437992002-04-12 09:54:03 +000015586 ;
15587 return 0;
15588}
15589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015590if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015591 ac_cv_have_getc_unlocked=yes
15592else
Matthias Kloseb9621712010-04-24 17:59:49 +000015593 ac_cv_have_getc_unlocked=no
15594fi
15595rm -f core conftest.err conftest.$ac_objext \
15596 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015598
Matthias Kloseb9621712010-04-24 17:59:49 +000015599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15600$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015601if test "$ac_cv_have_getc_unlocked" = yes
15602then
Martin v. Löwis11437992002-04-12 09:54:03 +000015603
Matthias Kloseb9621712010-04-24 17:59:49 +000015604$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015605
15606fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015607
Roland Hiebere1f77692021-02-09 02:05:25 +010015608
15609# Check whether --with-readline was given.
15610if test "${with_readline+set}" = set; then :
15611 withval=$with_readline;
15612else
15613 with_readline=yes
15614fi
15615
15616
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015617# check where readline lives
Roland Hiebere1f77692021-02-09 02:05:25 +010015618py_cv_lib_readline=no
Martin v. Löwis82bca632006-02-10 20:49:30 +000015619# save the value of LIBS so we don't actually link Python with readline
15620LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015621
Roland Hiebere1f77692021-02-09 02:05:25 +010015622if test "$with_readline" != no; then
15623 case "$with_readline" in
15624 editline|edit)
15625 LIBREADLINE=edit
15626
15627$as_echo "#define WITH_EDITLINE 1" >>confdefs.h
15628
15629 ;;
15630 yes|readline)
15631 LIBREADLINE=readline
15632 ;;
15633 *)
15634 as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
15635 ;;
15636 esac
15637
15638 # On some systems we need to link readline to a termcap compatible
15639 # library. NOTE: Keep the precedence of listed libraries synchronised
15640 # with setup.py.
15641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015642$as_echo_n "checking how to link readline libs... " >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015643 for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
15644 if test -z "$py_libtermcap"; then
15645 READLINE_LIBS="-l$LIBREADLINE"
15646 else
15647 READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
15648 fi
15649 LIBS="$READLINE_LIBS $LIBS_no_readline"
15650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015651/* end confdefs.h. */
15652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015653/* Override any GCC internal prototype to avoid an error.
15654 Use char because int might match the return type of a GCC
15655 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015656#ifdef __cplusplus
15657extern "C"
15658#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015659char readline ();
15660int
15661main ()
15662{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015663return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015664 ;
15665 return 0;
15666}
15667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015668if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015669 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015671rm -f core conftest.err conftest.$ac_objext \
15672 conftest$ac_exeext conftest.$ac_ext
Roland Hiebere1f77692021-02-09 02:05:25 +010015673 if test $py_cv_lib_readline = yes; then
15674 break
15675 fi
15676 done
15677
15678 # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
15679 #AC_SUBST([READLINE_LIBS])
15680 if test $py_cv_lib_readline = no; then
15681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015682$as_echo "none" >&6; }
Roland Hiebere1f77692021-02-09 02:05:25 +010015683 else
15684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015685$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015686
Matthias Kloseb9621712010-04-24 17:59:49 +000015687$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015688
Roland Hiebere1f77692021-02-09 02:05:25 +010015689 fi
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015690fi
15691
Roland Hiebere1f77692021-02-09 02:05:25 +010015692if test "$py_cv_lib_readline" = yes; then
15693 # check for readline 2.2
15694 ac_fn_c_check_decl "$LINENO" "rl_completion_append_character" "ac_cv_have_decl_rl_completion_append_character" "
15695#include <stdio.h> /* Must be first for Gnu Readline */
15696#ifdef WITH_EDITLINE
15697# include <editline/readline.h>
15698#else
15699# include <readline/readline.h>
15700#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015701
Roland Hiebere1f77692021-02-09 02:05:25 +010015702"
15703if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015704
Matthias Kloseb9621712010-04-24 17:59:49 +000015705$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015706
15707fi
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015708
Roland Hiebere1f77692021-02-09 02:05:25 +010015709 ac_fn_c_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" "
15710#include <stdio.h> /* Must be first for Gnu Readline */
15711#ifdef WITH_EDITLINE
15712# include <editline/readline.h>
15713#else
15714# include <readline/readline.h>
15715#endif
Antoine Pitroud5131772009-10-26 19:22:14 +000015716
Roland Hiebere1f77692021-02-09 02:05:25 +010015717"
15718if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015719
Matthias Kloseb9621712010-04-24 17:59:49 +000015720$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015721
15722fi
Antoine Pitroud5131772009-10-26 19:22:14 +000015723
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015724
Roland Hiebere1f77692021-02-09 02:05:25 +010015725 # check for readline 4.0
15726 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_pre_input_hook" | $as_tr_sh`
15727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
15728$as_echo_n "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
15729if eval \${$as_ac_Lib+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015730 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015731else
Martin v. Löwis11437992002-04-12 09:54:03 +000015732 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015733LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015737/* Override any GCC internal prototype to avoid an error.
15738 Use char because int might match the return type of a GCC
15739 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015740#ifdef __cplusplus
15741extern "C"
15742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015743char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015744int
15745main ()
15746{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015747return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 ;
15749 return 0;
15750}
15751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015752if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015753 eval "$as_ac_Lib=yes"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015754else
Roland Hiebere1f77692021-02-09 02:05:25 +010015755 eval "$as_ac_Lib=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015757rm -f core conftest.err conftest.$ac_objext \
15758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015759LIBS=$ac_check_lib_save_LIBS
15760fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015761eval ac_res=\$$as_ac_Lib
15762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15763$as_echo "$ac_res" >&6; }
15764if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015765
Matthias Kloseb9621712010-04-24 17:59:49 +000015766$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015767
Martin v. Löwis0daad592001-09-30 21:09:59 +000015768fi
15769
Michael W. Hudson54241132001-12-07 15:38:26 +000015770
Roland Hiebere1f77692021-02-09 02:05:25 +010015771 # also in 4.0
15772 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_display_matches_hook" | $as_tr_sh`
15773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
15774$as_echo_n "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
15775if eval \${$as_ac_Lib+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015776 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015777else
15778 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015779LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015781/* end confdefs.h. */
15782
15783/* Override any GCC internal prototype to avoid an error.
15784 Use char because int might match the return type of a GCC
15785 builtin and then its argument prototype would still apply. */
15786#ifdef __cplusplus
15787extern "C"
15788#endif
15789char rl_completion_display_matches_hook ();
15790int
15791main ()
15792{
15793return rl_completion_display_matches_hook ();
15794 ;
15795 return 0;
15796}
15797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015798if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015799 eval "$as_ac_Lib=yes"
Thomas Wouters89d996e2007-09-08 17:39:28 +000015800else
Roland Hiebere1f77692021-02-09 02:05:25 +010015801 eval "$as_ac_Lib=no"
Thomas Wouters89d996e2007-09-08 17:39:28 +000015802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015803rm -f core conftest.err conftest.$ac_objext \
15804 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015805LIBS=$ac_check_lib_save_LIBS
15806fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015807eval ac_res=\$$as_ac_Lib
15808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15809$as_echo "$ac_res" >&6; }
15810if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015811
Matthias Kloseb9621712010-04-24 17:59:49 +000015812$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015813
15814fi
15815
15816
Roland Hiebere1f77692021-02-09 02:05:25 +010015817 # also in 4.0, but not in editline
15818 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_resize_terminal" | $as_tr_sh`
15819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
15820$as_echo_n "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
15821if eval \${$as_ac_Lib+:} false; then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015822 $as_echo_n "(cached) " >&6
15823else
15824 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015825LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15827/* end confdefs.h. */
15828
15829/* Override any GCC internal prototype to avoid an error.
15830 Use char because int might match the return type of a GCC
15831 builtin and then its argument prototype would still apply. */
15832#ifdef __cplusplus
15833extern "C"
15834#endif
15835char rl_resize_terminal ();
15836int
15837main ()
15838{
15839return rl_resize_terminal ();
15840 ;
15841 return 0;
15842}
15843_ACEOF
15844if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015845 eval "$as_ac_Lib=yes"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015846else
Roland Hiebere1f77692021-02-09 02:05:25 +010015847 eval "$as_ac_Lib=no"
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015848fi
15849rm -f core conftest.err conftest.$ac_objext \
15850 conftest$ac_exeext conftest.$ac_ext
15851LIBS=$ac_check_lib_save_LIBS
15852fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015853eval ac_res=\$$as_ac_Lib
15854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15855$as_echo "$ac_res" >&6; }
15856if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015857
15858$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15859
15860fi
15861
15862
Roland Hiebere1f77692021-02-09 02:05:25 +010015863 # check for readline 4.2
15864 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_matches" | $as_tr_sh`
15865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
15866$as_echo_n "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
15867if eval \${$as_ac_Lib+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015869else
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015871LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015875/* Override any GCC internal prototype to avoid an error.
15876 Use char because int might match the return type of a GCC
15877 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015878#ifdef __cplusplus
15879extern "C"
15880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015881char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015882int
15883main ()
15884{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015885return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 ;
15887 return 0;
15888}
15889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015890if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015891 eval "$as_ac_Lib=yes"
Guido van Rossum353ae582001-07-10 16:45:32 +000015892else
Roland Hiebere1f77692021-02-09 02:05:25 +010015893 eval "$as_ac_Lib=no"
Guido van Rossum353ae582001-07-10 16:45:32 +000015894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015895rm -f core conftest.err conftest.$ac_objext \
15896 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015897LIBS=$ac_check_lib_save_LIBS
15898fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015899eval ac_res=\$$as_ac_Lib
15900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15901$as_echo "$ac_res" >&6; }
15902if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015903
Matthias Kloseb9621712010-04-24 17:59:49 +000015904$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015905
Guido van Rossum353ae582001-07-10 16:45:32 +000015906fi
15907
Jack Jansendd19cf82001-12-06 22:36:17 +000015908
Roland Hiebere1f77692021-02-09 02:05:25 +010015909 # also in readline 4.2
15910 ac_fn_c_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
15911#include <stdio.h> /* Must be first for Gnu Readline */
15912#ifdef WITH_EDITLINE
15913# include <editline/readline.h>
15914#else
15915# include <readline/readline.h>
15916#endif
Matthias Kloseb159a552010-04-25 21:00:44 +000015917
Roland Hiebere1f77692021-02-09 02:05:25 +010015918"
15919if test "x$ac_cv_have_decl_rl_catch_signals" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015920
Matthias Kloseb9621712010-04-24 17:59:49 +000015921$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015922
15923fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015924
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015925
Roland Hiebere1f77692021-02-09 02:05:25 +010015926 as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_append_history" | $as_tr_sh`
15927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
15928$as_echo_n "checking for append_history in -l$LIBREADLINE... " >&6; }
15929if eval \${$as_ac_Lib+:} false; then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015930 $as_echo_n "(cached) " >&6
15931else
15932 ac_check_lib_save_LIBS=$LIBS
Roland Hiebere1f77692021-02-09 02:05:25 +010015933LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15935/* end confdefs.h. */
15936
15937/* Override any GCC internal prototype to avoid an error.
15938 Use char because int might match the return type of a GCC
15939 builtin and then its argument prototype would still apply. */
15940#ifdef __cplusplus
15941extern "C"
15942#endif
15943char append_history ();
15944int
15945main ()
15946{
15947return append_history ();
15948 ;
15949 return 0;
15950}
15951_ACEOF
15952if ac_fn_c_try_link "$LINENO"; then :
Roland Hiebere1f77692021-02-09 02:05:25 +010015953 eval "$as_ac_Lib=yes"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015954else
Roland Hiebere1f77692021-02-09 02:05:25 +010015955 eval "$as_ac_Lib=no"
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015956fi
15957rm -f core conftest.err conftest.$ac_objext \
15958 conftest$ac_exeext conftest.$ac_ext
15959LIBS=$ac_check_lib_save_LIBS
15960fi
Roland Hiebere1f77692021-02-09 02:05:25 +010015961eval ac_res=\$$as_ac_Lib
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15963$as_echo "$ac_res" >&6; }
15964if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015965
15966$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15967
15968fi
15969
Roland Hiebere1f77692021-02-09 02:05:25 +010015970fi
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015971
Martin v. Löwis82bca632006-02-10 20:49:30 +000015972# End of readline checks: restore LIBS
15973LIBS=$LIBS_no_readline
15974
Matthias Kloseb9621712010-04-24 17:59:49 +000015975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15976$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015977if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015978 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015979else
Martin v. Löwis11437992002-04-12 09:54:03 +000015980
Matthias Kloseb9621712010-04-24 17:59:49 +000015981if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015982 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015983else
Matthias Kloseb9621712010-04-24 17:59:49 +000015984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015985/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015986
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015987#include <stdlib.h>
15988#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015989int main()
15990{
15991 int val1 = nice(1);
15992 if (val1 != -1 && val1 == nice(2))
15993 exit(0);
15994 exit(1);
15995}
15996
Martin v. Löwis11437992002-04-12 09:54:03 +000015997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015998if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015999 ac_cv_broken_nice=yes
16000else
Matthias Kloseb9621712010-04-24 17:59:49 +000016001 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16004 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016005fi
16006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016007fi
16008
Matthias Kloseb9621712010-04-24 17:59:49 +000016009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
16010$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016011if test "$ac_cv_broken_nice" = yes
16012then
Martin v. Löwis11437992002-04-12 09:54:03 +000016013
Matthias Kloseb9621712010-04-24 17:59:49 +000016014$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016015
16016fi
16017
Matthias Kloseb9621712010-04-24 17:59:49 +000016018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
16019$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016020if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016021 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016022else
Matthias Kloseb9621712010-04-24 17:59:49 +000016023 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016024 ac_cv_broken_poll=no
16025else
Matthias Kloseb9621712010-04-24 17:59:49 +000016026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016027/* end confdefs.h. */
16028
16029#include <poll.h>
Joshua Root674fa0a2020-12-14 07:56:34 +110016030#include <unistd.h>
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016031
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016032int main()
16033{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016034 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016035 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016036
16037 close (42);
16038
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016039 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016040 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016041 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016042 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016043 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016044 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016045 return 1;
16046}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016047
16048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016049if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016050 ac_cv_broken_poll=yes
16051else
Matthias Kloseb9621712010-04-24 17:59:49 +000016052 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016058fi
16059
Matthias Kloseb9621712010-04-24 17:59:49 +000016060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
16061$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016062if test "$ac_cv_broken_poll" = yes
16063then
16064
Matthias Kloseb9621712010-04-24 17:59:49 +000016065$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000016066
16067fi
16068
Martin v. Löwis1d459062005-03-14 21:23:33 +000016069# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000016070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
16071$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016072if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016073 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016074else
16075
Matthias Kloseb9621712010-04-24 17:59:49 +000016076if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016077 ac_cv_working_tzset=no
16078else
Matthias Kloseb9621712010-04-24 17:59:49 +000016079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016080/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016081
16082#include <stdlib.h>
16083#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000016084#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000016085
16086#if HAVE_TZNAME
16087extern char *tzname[];
16088#endif
16089
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016090int main()
16091{
Brett Cannon18367812003-09-19 00:59:16 +000016092 /* Note that we need to ensure that not only does tzset(3)
16093 do 'something' with localtime, but it works as documented
16094 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016095 This includes making sure that tzname is set properly if
16096 tm->tm_zone does not exist since it is the alternative way
16097 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016098
16099 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016100 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016101 */
16102
Martin v. Löwis1d459062005-03-14 21:23:33 +000016103 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016104 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16105
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016106 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016107 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016108 if (localtime(&groundhogday)->tm_hour != 0)
16109 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016110#if HAVE_TZNAME
16111 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16112 if (strcmp(tzname[0], "UTC") ||
16113 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16114 exit(1);
16115#endif
Brett Cannon18367812003-09-19 00:59:16 +000016116
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016117 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016118 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016119 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016120 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016121#if HAVE_TZNAME
16122 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16123 exit(1);
16124#endif
Brett Cannon18367812003-09-19 00:59:16 +000016125
16126 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16127 tzset();
16128 if (localtime(&groundhogday)->tm_hour != 11)
16129 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016130#if HAVE_TZNAME
16131 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16132 exit(1);
16133#endif
16134
16135#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016136 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16137 exit(1);
16138 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16139 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016140#endif
Brett Cannon18367812003-09-19 00:59:16 +000016141
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016142 exit(0);
16143}
16144
16145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016146if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016147 ac_cv_working_tzset=yes
16148else
Matthias Kloseb9621712010-04-24 17:59:49 +000016149 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16152 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016153fi
16154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016155fi
16156
Matthias Kloseb9621712010-04-24 17:59:49 +000016157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16158$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016159if test "$ac_cv_working_tzset" = yes
16160then
16161
Matthias Kloseb9621712010-04-24 17:59:49 +000016162$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016163
16164fi
16165
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016166# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16168$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016169if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016170 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016171else
Matthias Kloseb9621712010-04-24 17:59:49 +000016172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016173/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016174#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016175int
16176main ()
16177{
16178
16179struct stat st;
16180st.st_mtim.tv_nsec = 1;
16181
16182 ;
16183 return 0;
16184}
16185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016186if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016187 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016188else
Matthias Kloseb9621712010-04-24 17:59:49 +000016189 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16192fi
16193
Matthias Kloseb9621712010-04-24 17:59:49 +000016194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16195$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016196if test "$ac_cv_stat_tv_nsec" = yes
16197then
16198
Matthias Kloseb9621712010-04-24 17:59:49 +000016199$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016200
16201fi
16202
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016203# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16205$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016206if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016207 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016208else
Matthias Kloseb9621712010-04-24 17:59:49 +000016209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016210/* end confdefs.h. */
16211#include <sys/stat.h>
16212int
16213main ()
16214{
16215
16216struct stat st;
16217st.st_mtimespec.tv_nsec = 1;
16218
16219 ;
16220 return 0;
16221}
16222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016224 ac_cv_stat_tv_nsec2=yes
16225else
Matthias Kloseb9621712010-04-24 17:59:49 +000016226 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16229fi
16230
Matthias Kloseb9621712010-04-24 17:59:49 +000016231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16232$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016233if test "$ac_cv_stat_tv_nsec2" = yes
16234then
16235
Matthias Kloseb9621712010-04-24 17:59:49 +000016236$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016237
16238fi
16239
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016240# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016241ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016242if test "$cross_compiling" = no; then
16243 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16244fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016245
16246for ac_header in curses.h ncurses.h
16247do :
16248 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16249ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16250if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16251 cat >>confdefs.h <<_ACEOF
16252#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16253_ACEOF
16254
16255fi
16256
16257done
16258
16259
16260# On Solaris, term.h requires curses.h
16261for ac_header in term.h
16262do :
16263 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16264#ifdef HAVE_CURSES_H
16265#include <curses.h>
16266#endif
16267
16268"
16269if test "x$ac_cv_header_term_h" = xyes; then :
16270 cat >>confdefs.h <<_ACEOF
16271#define HAVE_TERM_H 1
16272_ACEOF
16273
16274fi
16275
16276done
16277
16278
Jack Jansen666b1e72001-10-31 12:11:48 +000016279# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16281$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016282if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016283 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016284else
Matthias Kloseb9621712010-04-24 17:59:49 +000016285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016286/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016287#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016288int
16289main ()
16290{
Jack Jansen666b1e72001-10-31 12:11:48 +000016291
16292 int rtn;
16293 rtn = mvwdelch(0,0,0);
16294
Martin v. Löwis11437992002-04-12 09:54:03 +000016295 ;
16296 return 0;
16297}
16298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016299if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016300 ac_cv_mvwdelch_is_expression=yes
16301else
Matthias Kloseb9621712010-04-24 17:59:49 +000016302 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16305fi
16306
Matthias Kloseb9621712010-04-24 17:59:49 +000016307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16308$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016309
16310if test "$ac_cv_mvwdelch_is_expression" = yes
16311then
Martin v. Löwis11437992002-04-12 09:54:03 +000016312
Matthias Kloseb9621712010-04-24 17:59:49 +000016313$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016314
16315fi
16316
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016317# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16318# structs since version 5.7. If the macro is defined as zero before including
16319# [n]curses.h, ncurses will expose fields of the structs regardless of the
16320# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16322$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016323if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016324 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016325else
Matthias Kloseb9621712010-04-24 17:59:49 +000016326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016327/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016328
16329 #define NCURSES_OPAQUE 0
16330 #include <curses.h>
16331
Martin v. Löwis11437992002-04-12 09:54:03 +000016332int
16333main ()
16334{
Jack Jansen666b1e72001-10-31 12:11:48 +000016335
16336 WINDOW *w;
16337 w->_flags = 0;
16338
Martin v. Löwis11437992002-04-12 09:54:03 +000016339 ;
16340 return 0;
16341}
16342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016343if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016344 ac_cv_window_has_flags=yes
16345else
Matthias Kloseb9621712010-04-24 17:59:49 +000016346 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16349fi
16350
Matthias Kloseb9621712010-04-24 17:59:49 +000016351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16352$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016353
Jack Jansen666b1e72001-10-31 12:11:48 +000016354
16355if test "$ac_cv_window_has_flags" = yes
16356then
Martin v. Löwis11437992002-04-12 09:54:03 +000016357
Matthias Kloseb9621712010-04-24 17:59:49 +000016358$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016359
16360fi
16361
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16363$as_echo_n "checking for is_pad... " >&6; }
16364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16365/* end confdefs.h. */
16366#include <curses.h>
16367int
16368main ()
16369{
16370
16371#ifndef is_pad
16372void *x=is_pad
16373#endif
16374
16375 ;
16376 return 0;
16377}
16378_ACEOF
16379if ac_fn_c_try_compile "$LINENO"; then :
16380
16381$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16382
16383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16384$as_echo "yes" >&6; }
16385else
16386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16387$as_echo "no" >&6; }
16388
16389fi
16390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16391
Matthias Kloseb9621712010-04-24 17:59:49 +000016392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16393$as_echo_n "checking for is_term_resized... " >&6; }
16394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016395/* end confdefs.h. */
16396#include <curses.h>
16397int
16398main ()
16399{
16400void *x=is_term_resized
16401 ;
16402 return 0;
16403}
16404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016405if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016406
Matthias Kloseb9621712010-04-24 17:59:49 +000016407$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016408
Matthias Kloseb159a552010-04-25 21:00:44 +000016409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016410$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016411else
Matthias Kloseb9621712010-04-24 17:59:49 +000016412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16413$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016414
16415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16417
Matthias Kloseb9621712010-04-24 17:59:49 +000016418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16419$as_echo_n "checking for resize_term... " >&6; }
16420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016421/* end confdefs.h. */
16422#include <curses.h>
16423int
16424main ()
16425{
16426void *x=resize_term
16427 ;
16428 return 0;
16429}
16430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016431if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016432
Matthias Kloseb9621712010-04-24 17:59:49 +000016433$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016434
Matthias Kloseb159a552010-04-25 21:00:44 +000016435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016436$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016437else
Matthias Kloseb9621712010-04-24 17:59:49 +000016438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16439$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016440
16441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16443
Matthias Kloseb9621712010-04-24 17:59:49 +000016444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16445$as_echo_n "checking for resizeterm... " >&6; }
16446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016447/* end confdefs.h. */
16448#include <curses.h>
16449int
16450main ()
16451{
16452void *x=resizeterm
16453 ;
16454 return 0;
16455}
16456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016457if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016458
Matthias Kloseb9621712010-04-24 17:59:49 +000016459$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016460
Matthias Kloseb159a552010-04-25 21:00:44 +000016461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016462$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016463else
Matthias Kloseb9621712010-04-24 17:59:49 +000016464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16465$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016466
16467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016469
16470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16471$as_echo_n "checking for immedok... " >&6; }
16472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16473/* end confdefs.h. */
16474#include <curses.h>
16475int
16476main ()
16477{
16478
16479#ifndef immedok
16480void *x=immedok
16481#endif
16482
16483 ;
16484 return 0;
16485}
16486_ACEOF
16487if ac_fn_c_try_compile "$LINENO"; then :
16488
16489$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16490
16491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16492$as_echo "yes" >&6; }
16493else
16494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16495$as_echo "no" >&6; }
16496
16497fi
16498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16499
16500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16501$as_echo_n "checking for syncok... " >&6; }
16502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16503/* end confdefs.h. */
16504#include <curses.h>
16505int
16506main ()
16507{
16508
16509#ifndef syncok
16510void *x=syncok
16511#endif
16512
16513 ;
16514 return 0;
16515}
16516_ACEOF
16517if ac_fn_c_try_compile "$LINENO"; then :
16518
16519$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16520
16521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16522$as_echo "yes" >&6; }
16523else
16524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16525$as_echo "no" >&6; }
16526
16527fi
16528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16529
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16531$as_echo_n "checking for wchgat... " >&6; }
16532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16533/* end confdefs.h. */
16534#include <curses.h>
16535int
16536main ()
16537{
16538
16539#ifndef wchgat
16540void *x=wchgat
16541#endif
16542
16543 ;
16544 return 0;
16545}
16546_ACEOF
16547if ac_fn_c_try_compile "$LINENO"; then :
16548
16549$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16550
16551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16552$as_echo "yes" >&6; }
16553else
16554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16555$as_echo "no" >&6; }
16556
16557fi
16558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16559
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16561$as_echo_n "checking for filter... " >&6; }
16562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16563/* end confdefs.h. */
16564#include <curses.h>
16565int
16566main ()
16567{
16568
16569#ifndef filter
16570void *x=filter
16571#endif
16572
16573 ;
16574 return 0;
16575}
16576_ACEOF
16577if ac_fn_c_try_compile "$LINENO"; then :
16578
16579$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16580
16581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16582$as_echo "yes" >&6; }
16583else
16584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16585$as_echo "no" >&6; }
16586
16587fi
16588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16589
16590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16591$as_echo_n "checking for has_key... " >&6; }
16592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16593/* end confdefs.h. */
16594#include <curses.h>
16595int
16596main ()
16597{
16598
16599#ifndef has_key
16600void *x=has_key
16601#endif
16602
16603 ;
16604 return 0;
16605}
16606_ACEOF
16607if ac_fn_c_try_compile "$LINENO"; then :
16608
16609$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16610
16611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16612$as_echo "yes" >&6; }
16613else
16614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16615$as_echo "no" >&6; }
16616
16617fi
16618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16619
16620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16621$as_echo_n "checking for typeahead... " >&6; }
16622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16623/* end confdefs.h. */
16624#include <curses.h>
16625int
16626main ()
16627{
16628
16629#ifndef typeahead
16630void *x=typeahead
16631#endif
16632
16633 ;
16634 return 0;
16635}
16636_ACEOF
16637if ac_fn_c_try_compile "$LINENO"; then :
16638
16639$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16640
16641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16642$as_echo "yes" >&6; }
16643else
16644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16645$as_echo "no" >&6; }
16646
16647fi
16648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16649
16650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16651$as_echo_n "checking for use_env... " >&6; }
16652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16653/* end confdefs.h. */
16654#include <curses.h>
16655int
16656main ()
16657{
16658
16659#ifndef use_env
16660void *x=use_env
16661#endif
16662
16663 ;
16664 return 0;
16665}
16666_ACEOF
16667if ac_fn_c_try_compile "$LINENO"; then :
16668
16669$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16670
16671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16672$as_echo "yes" >&6; }
16673else
16674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16675$as_echo "no" >&6; }
16676
16677fi
16678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016679# last curses configure check
16680CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016681
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16683$as_echo "$as_me: checking for device files" >&6;}
16684
16685if test "x$cross_compiling" = xyes; then
16686 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16688$as_echo_n "checking for /dev/ptmx... " >&6; }
16689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16690$as_echo "not set" >&6; }
16691 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16692 fi
16693 if test "${ac_cv_file__dev_ptc+set}" != set; then
16694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16695$as_echo_n "checking for /dev/ptc... " >&6; }
16696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16697$as_echo "not set" >&6; }
16698 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16699 fi
16700fi
16701
Matthias Kloseb9621712010-04-24 17:59:49 +000016702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16703$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016704if ${ac_cv_file__dev_ptmx+:} false; then :
16705 $as_echo_n "(cached) " >&6
16706else
16707 test "$cross_compiling" = yes &&
16708 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16709if test -r "/dev/ptmx"; then
16710 ac_cv_file__dev_ptmx=yes
16711else
16712 ac_cv_file__dev_ptmx=no
16713fi
16714fi
16715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16716$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16717if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016718
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016719fi
16720
16721if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016722
Matthias Kloseb9621712010-04-24 17:59:49 +000016723$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016724
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016725fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16727$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016728if ${ac_cv_file__dev_ptc+:} false; then :
16729 $as_echo_n "(cached) " >&6
16730else
16731 test "$cross_compiling" = yes &&
16732 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16733if test -r "/dev/ptc"; then
16734 ac_cv_file__dev_ptc=yes
16735else
16736 ac_cv_file__dev_ptc=no
16737fi
16738fi
16739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16740$as_echo "$ac_cv_file__dev_ptc" >&6; }
16741if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016742
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016743fi
16744
16745if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016746
Matthias Kloseb9621712010-04-24 17:59:49 +000016747$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016748
Neal Norwitz865400f2003-03-21 01:42:58 +000016749fi
16750
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016751if test $ac_sys_system = Darwin
16752then
16753 LIBS="$LIBS -framework CoreFoundation"
16754fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016755
Matthias Kloseb9621712010-04-24 17:59:49 +000016756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16757$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016758if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016759 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016760else
Matthias Kloseb9621712010-04-24 17:59:49 +000016761 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016762 ac_cv_have_size_t_format="cross -- assuming yes"
16763
Thomas Wouters477c8d52006-05-27 19:21:47 +000016764else
Matthias Kloseb9621712010-04-24 17:59:49 +000016765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016766/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016767
Thomas Wouters477c8d52006-05-27 19:21:47 +000016768#include <stdio.h>
16769#include <stddef.h>
16770#include <string.h>
16771
Christian Heimes2c181612007-12-17 20:04:13 +000016772#ifdef HAVE_SYS_TYPES_H
16773#include <sys/types.h>
16774#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016775
16776#ifdef HAVE_SSIZE_T
16777typedef ssize_t Py_ssize_t;
16778#elif SIZEOF_VOID_P == SIZEOF_LONG
16779typedef long Py_ssize_t;
16780#else
16781typedef int Py_ssize_t;
16782#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016783
Christian Heimes2c181612007-12-17 20:04:13 +000016784int main()
16785{
16786 char buffer[256];
16787
Thomas Wouters477c8d52006-05-27 19:21:47 +000016788 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16789 return 1;
16790
Thomas Wouters89f507f2006-12-13 04:49:30 +000016791 if (strcmp(buffer, "123"))
16792 return 1;
16793
16794 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16795 return 1;
16796
16797 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016798 return 1;
16799
16800 return 0;
16801}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016802
Thomas Wouters477c8d52006-05-27 19:21:47 +000016803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016804if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016805 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016806else
Matthias Kloseb9621712010-04-24 17:59:49 +000016807 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16810 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016811fi
16812
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16815$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016816if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016817
Matthias Kloseb9621712010-04-24 17:59:49 +000016818$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016819
16820fi
16821
Matthias Kloseb9621712010-04-24 17:59:49 +000016822ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016823#ifdef HAVE_SYS_TYPES_H
16824#include <sys/types.h>
16825#endif
16826#ifdef HAVE_SYS_SOCKET_H
16827#include <sys/socket.h>
16828#endif
16829
Matthias Kloseb9621712010-04-24 17:59:49 +000016830"
Victor Stinnere0be4232011-10-25 13:06:09 +020016831if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016832
Martin v. Löwis11437992002-04-12 09:54:03 +000016833else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016834
Matthias Kloseb9621712010-04-24 17:59:49 +000016835$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016836
16837fi
16838
Michael W. Hudson54241132001-12-07 15:38:26 +000016839
Matthias Kloseb9621712010-04-24 17:59:49 +000016840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16841$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016842if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016843 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016844else
Matthias Kloseb9621712010-04-24 17:59:49 +000016845 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016846 ac_cv_broken_mbstowcs=no
16847else
Matthias Kloseb9621712010-04-24 17:59:49 +000016848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016849/* end confdefs.h. */
16850
Stefan Krah19c21392012-11-22 23:47:32 +010016851#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016852#include<stdlib.h>
16853int main() {
16854 size_t len = -1;
16855 const char *str = "text";
16856 len = mbstowcs(NULL, str, 0);
16857 return (len != 4);
16858}
16859
16860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016861if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016862 ac_cv_broken_mbstowcs=no
16863else
Matthias Kloseb9621712010-04-24 17:59:49 +000016864 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16867 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016868fi
16869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016870fi
16871
Matthias Kloseb9621712010-04-24 17:59:49 +000016872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16873$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016874if test "$ac_cv_broken_mbstowcs" = yes
16875then
16876
Matthias Kloseb9621712010-04-24 17:59:49 +000016877$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016878
16879fi
16880
Antoine Pitroub52ec782009-01-25 16:34:23 +000016881# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16883$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016884
16885# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016886if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016887 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016888if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016889then
16890
Matthias Kloseb9621712010-04-24 17:59:49 +000016891$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016892
Matthias Kloseb9621712010-04-24 17:59:49 +000016893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16894$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016895fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016896if test "$withval" = no
16897then
16898
16899$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16900
Matthias Kloseb9621712010-04-24 17:59:49 +000016901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16902$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016903fi
16904
Antoine Pitrou042b1282010-08-13 21:15:58 +000016905else
16906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16907$as_echo "no value specified" >&6; }
16908fi
16909
Antoine Pitroub52ec782009-01-25 16:34:23 +000016910
Matthias Kloseb17289e2012-03-15 19:51:34 +010016911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16912$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16913if ${ac_cv_computed_gotos+:} false; then :
16914 $as_echo_n "(cached) " >&6
16915else
16916 if test "$cross_compiling" = yes; then :
16917 if test "${with_computed_gotos+set}" = set; then
16918 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16919 else
16920 ac_cv_computed_gotos=no
16921 fi
16922else
16923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16924/* end confdefs.h. */
16925
16926int main(int argc, char **argv)
16927{
16928 static void *targets[1] = { &&LABEL1 };
16929 goto LABEL2;
16930LABEL1:
16931 return 0;
16932LABEL2:
16933 goto *targets[0];
16934 return 1;
16935}
16936
16937_ACEOF
16938if ac_fn_c_try_run "$LINENO"; then :
16939 ac_cv_computed_gotos=yes
16940else
16941 ac_cv_computed_gotos=no
16942fi
16943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16944 conftest.$ac_objext conftest.beam conftest.$ac_ext
16945fi
16946
16947fi
16948
16949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16950$as_echo "$ac_cv_computed_gotos" >&6; }
16951case "$ac_cv_computed_gotos" in yes*)
16952
16953$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16954
16955esac
16956
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016957case $ac_sys_system in
16958AIX*)
16959
16960$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16961 ;;
16962esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016963
Michael W. Hudson54241132001-12-07 15:38:26 +000016964
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016965
16966
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016967for h in `(cd $srcdir;echo Python/thread_*.h)`
16968do
16969 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16970done
16971
Michael W. Hudson54241132001-12-07 15:38:26 +000016972
Ned Deily8d02f912020-06-25 10:46:44 -040016973SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16975$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016976for dir in $SRCDIRS; do
16977 if test ! -d $dir; then
16978 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016979 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016980done
Matthias Kloseb9621712010-04-24 17:59:49 +000016981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16982$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016983
Stefan Krah1919b7e2012-03-21 18:25:23 +010016984# Availability of -O2:
16985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16986$as_echo_n "checking for -O2... " >&6; }
16987saved_cflags="$CFLAGS"
16988CFLAGS="-O2"
16989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16990/* end confdefs.h. */
16991
16992int
16993main ()
16994{
16995
16996
16997 ;
16998 return 0;
16999}
17000_ACEOF
17001if ac_fn_c_try_compile "$LINENO"; then :
17002 have_O2=yes
17003else
17004 have_O2=no
17005fi
17006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
17008$as_echo "$have_O2" >&6; }
17009CFLAGS="$saved_cflags"
17010
17011# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
17012# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
17013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
17014$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
17015saved_cflags="$CFLAGS"
17016CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
17017if test "$have_O2" = no; then
17018 CFLAGS=""
17019fi
17020if test "$cross_compiling" = yes; then :
17021 have_glibc_memmove_bug=undefined
17022else
17023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17024/* end confdefs.h. */
17025
17026#include <stdio.h>
17027#include <stdlib.h>
17028#include <string.h>
17029void foo(void *p, void *q) { memmove(p, q, 19); }
17030int main() {
17031 char a[32] = "123456789000000000";
17032 foo(&a[9], a);
17033 if (strcmp(a, "123456789123456789000000000") != 0)
17034 return 1;
17035 foo(a, &a[9]);
17036 if (strcmp(a, "123456789000000000") != 0)
17037 return 1;
17038 return 0;
17039}
17040
17041_ACEOF
17042if ac_fn_c_try_run "$LINENO"; then :
17043 have_glibc_memmove_bug=no
17044else
17045 have_glibc_memmove_bug=yes
17046fi
17047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17048 conftest.$ac_objext conftest.beam conftest.$ac_ext
17049fi
17050
17051CFLAGS="$saved_cflags"
17052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
17053$as_echo "$have_glibc_memmove_bug" >&6; }
17054if test "$have_glibc_memmove_bug" = yes; then
17055
17056$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
17057
17058fi
17059
17060if test "$have_gcc_asm_for_x87" = yes; then
17061 # Some versions of gcc miscompile inline asm:
17062 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
17063 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
17064 case $CC in
17065 *gcc*)
17066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
17067$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
17068 saved_cflags="$CFLAGS"
17069 CFLAGS="-O2"
17070 if test "$cross_compiling" = yes; then :
17071 have_ipa_pure_const_bug=undefined
17072else
17073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17074/* end confdefs.h. */
17075
17076 __attribute__((noinline)) int
17077 foo(int *p) {
17078 int r;
17079 asm ( "movl \$6, (%1)\n\t"
17080 "xorl %0, %0\n\t"
17081 : "=r" (r) : "r" (p) : "memory"
17082 );
17083 return r;
17084 }
17085 int main() {
17086 int p = 8;
17087 if ((foo(&p) ? : p) != 6)
17088 return 1;
17089 return 0;
17090 }
17091
17092_ACEOF
17093if ac_fn_c_try_run "$LINENO"; then :
17094 have_ipa_pure_const_bug=no
17095else
17096 have_ipa_pure_const_bug=yes
17097fi
17098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17099 conftest.$ac_objext conftest.beam conftest.$ac_ext
17100fi
17101
17102 CFLAGS="$saved_cflags"
17103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17104$as_echo "$have_ipa_pure_const_bug" >&6; }
17105 if test "$have_ipa_pure_const_bug" = yes; then
17106
17107$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
17108
17109 fi
17110 ;;
17111 esac
17112fi
17113
Victor Stinner4f5366e2015-01-09 02:13:19 +010017114# Check for stdatomic.h
17115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17116$as_echo_n "checking for stdatomic.h... " >&6; }
17117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17118/* end confdefs.h. */
17119
17120
17121 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017122 atomic_int int_var;
17123 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017124 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017125 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17126 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17127 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017128 return 0;
17129 }
17130
17131
17132_ACEOF
17133if ac_fn_c_try_link "$LINENO"; then :
17134 have_stdatomic_h=yes
17135else
17136 have_stdatomic_h=no
17137fi
17138rm -f core conftest.err conftest.$ac_objext \
17139 conftest$ac_exeext conftest.$ac_ext
17140
17141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17142$as_echo "$have_stdatomic_h" >&6; }
17143
17144if test "$have_stdatomic_h" = yes; then
17145
17146$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
17147
17148fi
17149
Victor Stinner52a327c2020-12-23 03:41:08 +010017150# Check for GCC >= 4.7 and clang __atomic builtin functions
17151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
17152$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
Victor Stinner4f5366e2015-01-09 02:13:19 +010017153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17154/* end confdefs.h. */
17155
17156
Victor Stinner52a327c2020-12-23 03:41:08 +010017157 int val;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017158 int main() {
Victor Stinner52a327c2020-12-23 03:41:08 +010017159 __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST);
17160 (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017161 return 0;
17162 }
17163
17164
17165_ACEOF
17166if ac_fn_c_try_link "$LINENO"; then :
17167 have_builtin_atomic=yes
17168else
17169 have_builtin_atomic=no
17170fi
17171rm -f core conftest.err conftest.$ac_objext \
17172 conftest$ac_exeext conftest.$ac_ext
17173
17174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17175$as_echo "$have_builtin_atomic" >&6; }
17176
17177if test "$have_builtin_atomic" = yes; then
17178
17179$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17180
17181fi
17182
Ned Deily322f5ba2013-11-21 23:01:59 -080017183# ensurepip option
17184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17185$as_echo_n "checking for ensurepip... " >&6; }
17186
17187# Check whether --with-ensurepip was given.
17188if test "${with_ensurepip+set}" = set; then :
17189 withval=$with_ensurepip;
17190else
17191 with_ensurepip=upgrade
17192fi
17193
17194case $with_ensurepip in #(
17195 yes|upgrade) :
17196 ENSUREPIP=upgrade ;; #(
17197 install) :
17198 ENSUREPIP=install ;; #(
17199 no) :
17200 ENSUREPIP=no ;; #(
17201 *) :
17202 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17203esac
17204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17205$as_echo "$ENSUREPIP" >&6; }
17206
17207
Victor Stinner35a97c02015-03-08 02:59:09 +010017208# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17210$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17212/* end confdefs.h. */
17213
17214
17215 #include <dirent.h>
17216
17217 int main() {
17218 struct dirent entry;
17219 return entry.d_type == DT_UNKNOWN;
17220 }
17221
17222
17223_ACEOF
17224if ac_fn_c_try_link "$LINENO"; then :
17225 have_dirent_d_type=yes
17226else
17227 have_dirent_d_type=no
17228fi
17229rm -f core conftest.err conftest.$ac_objext \
17230 conftest$ac_exeext conftest.$ac_ext
17231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17232$as_echo "$have_dirent_d_type" >&6; }
17233
17234if test "$have_dirent_d_type" = yes; then
17235
17236$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17237
17238fi
17239
Victor Stinner9eb57c52015-03-19 22:21:49 +010017240# check if the Linux getrandom() syscall is available
17241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17242$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17244/* end confdefs.h. */
17245
17246
Victor Stinner1b80b242016-04-12 22:34:58 +020017247 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017248 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017249 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017250
17251 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017252 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017253 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017254 const int flags = GRND_NONBLOCK;
17255 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017256 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017257 return 0;
17258 }
17259
17260
17261_ACEOF
17262if ac_fn_c_try_link "$LINENO"; then :
17263 have_getrandom_syscall=yes
17264else
17265 have_getrandom_syscall=no
17266fi
17267rm -f core conftest.err conftest.$ac_objext \
17268 conftest$ac_exeext conftest.$ac_ext
17269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17270$as_echo "$have_getrandom_syscall" >&6; }
17271
17272if test "$have_getrandom_syscall" = yes; then
17273
17274$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17275
17276fi
17277
Victor Stinner3abf44e2015-09-18 15:38:37 +020017278# check if the getrandom() function is available
17279# the test was written for the Solaris function of <sys/random.h>
17280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17281$as_echo_n "checking for the getrandom() function... " >&6; }
17282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17283/* end confdefs.h. */
17284
17285
17286 #include <sys/random.h>
17287
17288 int main() {
17289 char buffer[1];
17290 const size_t buflen = sizeof(buffer);
17291 const int flags = 0;
17292 /* ignore the result, Python checks for ENOSYS at runtime */
17293 (void)getrandom(buffer, buflen, flags);
17294 return 0;
17295 }
17296
17297
17298_ACEOF
17299if ac_fn_c_try_link "$LINENO"; then :
17300 have_getrandom=yes
17301else
17302 have_getrandom=no
17303fi
17304rm -f core conftest.err conftest.$ac_objext \
17305 conftest$ac_exeext conftest.$ac_ext
17306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17307$as_echo "$have_getrandom" >&6; }
17308
17309if test "$have_getrandom" = yes; then
17310
17311$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17312
17313fi
17314
Neil Schemenauer5741c452019-02-08 10:48:46 -080017315# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17316# shm_* may only be available if linking against librt
17317save_LIBS="$LIBS"
17318save_includes_default="$ac_includes_default"
17319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17320$as_echo_n "checking for library containing shm_open... " >&6; }
17321if ${ac_cv_search_shm_open+:} false; then :
17322 $as_echo_n "(cached) " >&6
17323else
17324 ac_func_search_save_LIBS=$LIBS
17325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17326/* end confdefs.h. */
17327
17328/* Override any GCC internal prototype to avoid an error.
17329 Use char because int might match the return type of a GCC
17330 builtin and then its argument prototype would still apply. */
17331#ifdef __cplusplus
17332extern "C"
17333#endif
17334char shm_open ();
17335int
17336main ()
17337{
17338return shm_open ();
17339 ;
17340 return 0;
17341}
17342_ACEOF
17343for ac_lib in '' rt; do
17344 if test -z "$ac_lib"; then
17345 ac_res="none required"
17346 else
17347 ac_res=-l$ac_lib
17348 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17349 fi
17350 if ac_fn_c_try_link "$LINENO"; then :
17351 ac_cv_search_shm_open=$ac_res
17352fi
17353rm -f core conftest.err conftest.$ac_objext \
17354 conftest$ac_exeext
17355 if ${ac_cv_search_shm_open+:} false; then :
17356 break
17357fi
17358done
17359if ${ac_cv_search_shm_open+:} false; then :
17360
17361else
17362 ac_cv_search_shm_open=no
17363fi
17364rm conftest.$ac_ext
17365LIBS=$ac_func_search_save_LIBS
17366fi
17367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17368$as_echo "$ac_cv_search_shm_open" >&6; }
17369ac_res=$ac_cv_search_shm_open
17370if test "$ac_res" != no; then :
17371 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17372
17373fi
17374
17375if test "$ac_cv_search_shm_open" = "-lrt"; then
17376
17377$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17378
17379fi
17380for ac_header in sys/mman.h
17381do :
17382 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17383if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17384 cat >>confdefs.h <<_ACEOF
17385#define HAVE_SYS_MMAN_H 1
17386_ACEOF
17387
17388fi
17389
17390done
17391
17392# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17393ac_includes_default="\
17394${ac_includes_default}
17395#ifndef __cplusplus
17396# ifdef HAVE_SYS_MMAN_H
17397# include <sys/mman.h>
17398# endif
17399#endif
17400"
17401for ac_func in shm_open shm_unlink
17402do :
17403 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17404ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17405if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17406 cat >>confdefs.h <<_ACEOF
17407#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17408_ACEOF
17409
17410fi
17411done
17412
17413# we don't want to link with librt always, restore LIBS
17414LIBS="$save_LIBS"
17415ac_includes_default="$save_includes_default"
17416
Christian Heimesff5be6e2018-01-20 13:19:21 +010017417# Check for usable OpenSSL
17418
17419 found=false
17420
17421# Check whether --with-openssl was given.
17422if test "${with_openssl+set}" = set; then :
17423 withval=$with_openssl;
17424 case "$withval" in
17425 "" | y | ye | yes | n | no)
17426 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17427 ;;
17428 *) ssldirs="$withval"
17429 ;;
17430 esac
17431
17432else
17433
17434 # if pkg-config is installed and openssl has installed a .pc file,
17435 # then use that information and don't search ssldirs
17436 if test -n "$ac_tool_prefix"; then
17437 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17438set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17440$as_echo_n "checking for $ac_word... " >&6; }
17441if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17442 $as_echo_n "(cached) " >&6
17443else
17444 if test -n "$PKG_CONFIG"; then
17445 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17446else
17447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17448for as_dir in $PATH
17449do
17450 IFS=$as_save_IFS
17451 test -z "$as_dir" && as_dir=.
17452 for ac_exec_ext in '' $ac_executable_extensions; do
17453 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17454 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17455 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17456 break 2
17457 fi
17458done
17459 done
17460IFS=$as_save_IFS
17461
17462fi
17463fi
17464PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17465if test -n "$PKG_CONFIG"; then
17466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17467$as_echo "$PKG_CONFIG" >&6; }
17468else
17469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17470$as_echo "no" >&6; }
17471fi
17472
17473
17474fi
17475if test -z "$ac_cv_prog_PKG_CONFIG"; then
17476 ac_ct_PKG_CONFIG=$PKG_CONFIG
17477 # Extract the first word of "pkg-config", so it can be a program name with args.
17478set dummy pkg-config; ac_word=$2
17479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17480$as_echo_n "checking for $ac_word... " >&6; }
17481if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17482 $as_echo_n "(cached) " >&6
17483else
17484 if test -n "$ac_ct_PKG_CONFIG"; then
17485 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17486else
17487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17488for as_dir in $PATH
17489do
17490 IFS=$as_save_IFS
17491 test -z "$as_dir" && as_dir=.
17492 for ac_exec_ext in '' $ac_executable_extensions; do
17493 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17494 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17495 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17496 break 2
17497 fi
17498done
17499 done
17500IFS=$as_save_IFS
17501
17502fi
17503fi
17504ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17505if test -n "$ac_ct_PKG_CONFIG"; then
17506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17507$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17508else
17509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17510$as_echo "no" >&6; }
17511fi
17512
17513 if test "x$ac_ct_PKG_CONFIG" = x; then
17514 PKG_CONFIG=""
17515 else
17516 case $cross_compiling:$ac_tool_warned in
17517yes:)
17518{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17519$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17520ac_tool_warned=yes ;;
17521esac
17522 PKG_CONFIG=$ac_ct_PKG_CONFIG
17523 fi
17524else
17525 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17526fi
17527
17528 if test x"$PKG_CONFIG" != x""; then
17529 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17530 if test $? = 0; then
17531 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17532 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17533 found=true
17534 fi
17535 fi
17536
17537 # no such luck; use some default ssldirs
17538 if ! $found; then
17539 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17540 fi
17541
17542
17543fi
17544
17545
17546
17547 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17548 # an 'openssl' subdirectory
17549
17550 if ! $found; then
17551 OPENSSL_INCLUDES=
17552 for ssldir in $ssldirs; do
17553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17554$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17555 if test -f "$ssldir/include/openssl/ssl.h"; then
17556 OPENSSL_INCLUDES="-I$ssldir/include"
17557 OPENSSL_LDFLAGS="-L$ssldir/lib"
17558 OPENSSL_LIBS="-lssl -lcrypto"
17559 found=true
17560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17561$as_echo "yes" >&6; }
17562 break
17563 else
17564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17565$as_echo "no" >&6; }
17566 fi
17567 done
17568
17569 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17570 # it will just work!
17571 fi
17572
17573 # try the preprocessor and linker with our new flags,
17574 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17575
17576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17577$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17578 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17579 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17580
17581 save_LIBS="$LIBS"
17582 save_LDFLAGS="$LDFLAGS"
17583 save_CPPFLAGS="$CPPFLAGS"
17584 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17585 LIBS="$OPENSSL_LIBS $LIBS"
17586 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17588/* end confdefs.h. */
17589#include <openssl/ssl.h>
17590int
17591main ()
17592{
17593SSL_new(NULL)
17594 ;
17595 return 0;
17596}
17597_ACEOF
17598if ac_fn_c_try_link "$LINENO"; then :
17599
17600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17601$as_echo "yes" >&6; }
17602 have_openssl=yes
17603
17604else
17605
17606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17607$as_echo "no" >&6; }
17608 have_openssl=no
17609
17610fi
17611rm -f core conftest.err conftest.$ac_objext \
17612 conftest$ac_exeext conftest.$ac_ext
17613 CPPFLAGS="$save_CPPFLAGS"
17614 LDFLAGS="$save_LDFLAGS"
17615 LIBS="$save_LIBS"
17616
17617
17618
17619
17620
17621
17622if test "$have_openssl" = yes; then
17623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17624$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17625
17626 save_LIBS="$LIBS"
17627 save_LDFLAGS="$LDFLAGS"
17628 save_CPPFLAGS="$CPPFLAGS"
17629 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17630 LIBS="$OPENSSL_LIBS $LIBS"
17631 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17632
17633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17634/* end confdefs.h. */
17635
17636 #include <openssl/x509_vfy.h>
17637
17638int
17639main ()
17640{
17641
17642 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17643 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17644 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17645 X509_VERIFY_PARAM_set_hostflags(p, 0);
17646
17647 ;
17648 return 0;
17649}
17650
17651_ACEOF
17652if ac_fn_c_try_link "$LINENO"; then :
17653
17654 ac_cv_has_x509_verify_param_set1_host=yes
17655
17656else
17657
17658 ac_cv_has_x509_verify_param_set1_host=no
17659
17660fi
17661rm -f core conftest.err conftest.$ac_objext \
17662 conftest$ac_exeext conftest.$ac_ext
17663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17664$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17665 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17666
17667$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17668
17669 fi
17670
17671 CPPFLAGS="$save_CPPFLAGS"
17672 LDFLAGS="$save_LDFLAGS"
17673 LIBS="$save_LIBS"
17674fi
17675
Christian Heimes892d66e2018-01-29 14:10:18 +010017676# ssl module default cipher suite string
17677
17678
17679
17680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17681$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17682
17683# Check whether --with-ssl-default-suites was given.
17684if test "${with_ssl_default_suites+set}" = set; then :
17685 withval=$with_ssl_default_suites;
17686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17687$as_echo "$withval" >&6; }
17688case "$withval" in
17689 python)
17690 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17691
17692 ;;
17693 openssl)
17694 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17695
17696 ;;
17697 *)
17698 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17699
17700 cat >>confdefs.h <<_ACEOF
17701#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17702_ACEOF
17703
17704 ;;
17705esac
17706
17707else
17708
17709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17710$as_echo "python" >&6; }
17711$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17712
17713
17714fi
17715
17716
Christian Heimes9b60e552020-05-15 23:54:53 +020017717# builtin hash modules
17718default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17719
17720$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17721
17722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17723$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17724
17725# Check whether --with-builtin-hashlib-hashes was given.
17726if test "${with_builtin_hashlib_hashes+set}" = set; then :
17727 withval=$with_builtin_hashlib_hashes;
17728case "$withval" in
17729 yes)
17730 withval=$default_hashlib_hashes
17731 ;;
17732 no)
17733 withval=""
17734 ;;
17735esac
17736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17737$as_echo "$withval" >&6; }
17738cat >>confdefs.h <<_ACEOF
17739#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17740_ACEOF
17741
17742
17743else
17744
17745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17746$as_echo "$default_hashlib_hashes" >&6; };
17747cat >>confdefs.h <<_ACEOF
17748#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17749_ACEOF
17750
17751
17752fi
17753
17754
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017755# --with-experimental-isolated-subinterpreters
17756
17757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17758$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17759
17760# Check whether --with-experimental-isolated-subinterpreters was given.
17761if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17762 withval=$with_experimental_isolated_subinterpreters;
17763if test "$withval" != no
17764then
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17766$as_echo "yes" >&6; };
17767 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17768
17769else
17770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17771$as_echo "no" >&6; };
17772fi
17773else
17774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17775$as_echo "no" >&6; }
17776fi
17777
17778
pxinwr277ce302020-12-30 20:50:39 +080017779# Check whether to disable test modules. Once set, setup.py will not build
17780# test extension modules and "make install" will not install test suites.
17781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5
17782$as_echo_n "checking for --disable-test-modules... " >&6; }
17783# Check whether --enable-test-modules was given.
17784if test "${enable_test_modules+set}" = set; then :
17785 enableval=$enable_test_modules;
17786fi
17787
17788if test "$enable_test_modules" = no; then
17789 TEST_MODULES=no
17790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17791$as_echo "yes" >&6; }
17792else
17793 TEST_MODULES=yes
17794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17795$as_echo "no" >&6; }
17796fi
17797
17798
Christian Heimes892d66e2018-01-29 14:10:18 +010017799
Guido van Rossum627b2d71993-12-24 10:39:16 +000017800# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017801ac_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 +000017802
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017803ac_config_files="$ac_config_files Modules/ld_so_aix"
17804
Martin v. Löwis11437992002-04-12 09:54:03 +000017805cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017806# This file is a shell script that caches the results of configure
17807# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017808# scripts and configure runs, see configure's option --config-cache.
17809# It is not useful on other systems. If it contains results you don't
17810# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017811#
Martin v. Löwis11437992002-04-12 09:54:03 +000017812# config.status only pays attention to the cache file if you give it
17813# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017814#
Skip Montanaro6dead952003-09-25 14:50:04 +000017815# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017816# loading this file, other *unset* `ac_cv_foo' will be assigned the
17817# following values.
17818
17819_ACEOF
17820
Guido van Rossumf78abae1997-01-21 22:02:36 +000017821# The following way of writing the cache mishandles newlines in values,
17822# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017824# Ultrix sh set writes to stderr and can't be redirected directly,
17825# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826(
17827 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17828 eval ac_val=\$$ac_var
17829 case $ac_val in #(
17830 *${as_nl}*)
17831 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017832 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17833$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834 esac
17835 case $ac_var in #(
17836 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017837 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17838 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017839 esac ;;
17840 esac
17841 done
17842
Martin v. Löwis11437992002-04-12 09:54:03 +000017843 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17845 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017846 # `set' does not quote correctly, so add quotes: double-quote
17847 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017848 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017849 "s/'/'\\\\''/g;
17850 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017851 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017852 *)
17853 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017855 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017856 esac |
17857 sort
17858) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017859 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017861 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017862 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017863 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17864 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017865 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17866 :end' >>confcache
17867if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17868 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017869 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017870 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17871$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017872 if test ! -f "$cache_file" || test -h "$cache_file"; then
17873 cat confcache >"$cache_file"
17874 else
17875 case $cache_file in #(
17876 */* | ?:*)
17877 mv -f confcache "$cache_file"$$ &&
17878 mv -f "$cache_file"$$ "$cache_file" ;; #(
17879 *)
17880 mv -f confcache "$cache_file" ;;
17881 esac
17882 fi
17883 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017884 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017885 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17886$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017887 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017888fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017889rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017890
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017891test "x$prefix" = xNONE && prefix=$ac_default_prefix
17892# Let make expand exec_prefix.
17893test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017894
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017895DEFS=-DHAVE_CONFIG_H
17896
Skip Montanaro6dead952003-09-25 14:50:04 +000017897ac_libobjs=
17898ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017899U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017900for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17901 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017903 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017904 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17905 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017906 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17907 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017908done
17909LIBOBJS=$ac_libobjs
17910
17911LTLIBOBJS=$ac_ltlibobjs
17912
17913
Martin v. Löwis11437992002-04-12 09:54:03 +000017914
Matthias Kloseb9621712010-04-24 17:59:49 +000017915
Victor Stinnere0be4232011-10-25 13:06:09 +020017916: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017917ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017918ac_clean_files_save=$ac_clean_files
17919ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017920{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17921$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17922as_write_fail=0
17923cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017924#! $SHELL
17925# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017926# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017927# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017928# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017929
Martin v. Löwis11437992002-04-12 09:54:03 +000017930debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017931ac_cs_recheck=false
17932ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017933
Matthias Kloseb9621712010-04-24 17:59:49 +000017934SHELL=\${CONFIG_SHELL-$SHELL}
17935export SHELL
17936_ASEOF
17937cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17938## -------------------- ##
17939## M4sh Initialization. ##
17940## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942# Be more Bourne compatible
17943DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017944if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017945 emulate sh
17946 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017947 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017948 # is contrary to our usage. Disable this feature.
17949 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017950 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017951else
Matthias Kloseb9621712010-04-24 17:59:49 +000017952 case `(set -o) 2>/dev/null` in #(
17953 *posix*) :
17954 set -o posix ;; #(
17955 *) :
17956 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017957esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017958fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017959
17960
Matthias Kloseb9621712010-04-24 17:59:49 +000017961as_nl='
17962'
17963export as_nl
17964# Printing a long string crashes Solaris 7 /usr/bin/printf.
17965as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17966as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17967as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17968# Prefer a ksh shell builtin over an external printf program on Solaris,
17969# but without wasting forks for bash or zsh.
17970if test -z "$BASH_VERSION$ZSH_VERSION" \
17971 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17972 as_echo='print -r --'
17973 as_echo_n='print -rn --'
17974elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17975 as_echo='printf %s\n'
17976 as_echo_n='printf %s'
17977else
17978 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17979 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17980 as_echo_n='/usr/ucb/echo -n'
17981 else
17982 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17983 as_echo_n_body='eval
17984 arg=$1;
17985 case $arg in #(
17986 *"$as_nl"*)
17987 expr "X$arg" : "X\\(.*\\)$as_nl";
17988 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17989 esac;
17990 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17991 '
17992 export as_echo_n_body
17993 as_echo_n='sh -c $as_echo_n_body as_echo'
17994 fi
17995 export as_echo_body
17996 as_echo='sh -c $as_echo_body as_echo'
17997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017998
17999# The user is always right.
18000if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018001 PATH_SEPARATOR=:
18002 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18003 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18004 PATH_SEPARATOR=';'
18005 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018008
18009# IFS
18010# We need space, tab and new line, in precisely that order. Quoting is
18011# there to prevent editors from complaining about space-tab.
18012# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18013# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014IFS=" "" $as_nl"
18015
18016# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020018017as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000018018case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019 *[\\/]* ) as_myself=$0 ;;
18020 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000018021for as_dir in $PATH
18022do
18023 IFS=$as_save_IFS
18024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000018025 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18026 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018027IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000018028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029 ;;
18030esac
18031# We did not find ourselves, most probably we were run as `sh COMMAND'
18032# in which case we are not to be found in the path.
18033if test "x$as_myself" = x; then
18034 as_myself=$0
18035fi
18036if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018037 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18038 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039fi
18040
Matthias Kloseb9621712010-04-24 17:59:49 +000018041# Unset variables that we do not need and which cause bugs (e.g. in
18042# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18043# suppresses any "Segmentation fault" message there. '((' could
18044# trigger a bug in pdksh 5.2.14.
18045for as_var in BASH_ENV ENV MAIL MAILPATH
18046do eval test x\${$as_var+set} = xset \
18047 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048done
18049PS1='$ '
18050PS2='> '
18051PS4='+ '
18052
18053# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000018054LC_ALL=C
18055export LC_ALL
18056LANGUAGE=C
18057export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018058
Matthias Kloseb9621712010-04-24 17:59:49 +000018059# CDPATH.
18060(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18061
18062
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018063# as_fn_error STATUS ERROR [LINENO LOG_FD]
18064# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000018065# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18066# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018067# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000018068as_fn_error ()
18069{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018070 as_status=$1; test $as_status -eq 0 && as_status=1
18071 if test "$4"; then
18072 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18073 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000018074 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018075 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000018076 as_fn_exit $as_status
18077} # as_fn_error
18078
18079
18080# as_fn_set_status STATUS
18081# -----------------------
18082# Set $? to STATUS, without forking.
18083as_fn_set_status ()
18084{
18085 return $1
18086} # as_fn_set_status
18087
18088# as_fn_exit STATUS
18089# -----------------
18090# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18091as_fn_exit ()
18092{
18093 set +e
18094 as_fn_set_status $1
18095 exit $1
18096} # as_fn_exit
18097
18098# as_fn_unset VAR
18099# ---------------
18100# Portably unset VAR.
18101as_fn_unset ()
18102{
18103 { eval $1=; unset $1;}
18104}
18105as_unset=as_fn_unset
18106# as_fn_append VAR VALUE
18107# ----------------------
18108# Append the text in VALUE to the end of the definition contained in VAR. Take
18109# advantage of any shell optimizations that allow amortized linear growth over
18110# repeated appends, instead of the typical quadratic growth present in naive
18111# implementations.
18112if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18113 eval 'as_fn_append ()
18114 {
18115 eval $1+=\$2
18116 }'
18117else
18118 as_fn_append ()
18119 {
18120 eval $1=\$$1\$2
18121 }
18122fi # as_fn_append
18123
18124# as_fn_arith ARG...
18125# ------------------
18126# Perform arithmetic evaluation on the ARGs, and store the result in the
18127# global $as_val. Take advantage of shells that can avoid forks. The arguments
18128# must be portable across $(()) and expr.
18129if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18130 eval 'as_fn_arith ()
18131 {
18132 as_val=$(( $* ))
18133 }'
18134else
18135 as_fn_arith ()
18136 {
18137 as_val=`expr "$@" || test $? -eq 1`
18138 }
18139fi # as_fn_arith
18140
18141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018142if expr a : '\(a\)' >/dev/null 2>&1 &&
18143 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18144 as_expr=expr
18145else
18146 as_expr=false
18147fi
18148
18149if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18150 as_basename=basename
18151else
18152 as_basename=false
18153fi
18154
Matthias Kloseb9621712010-04-24 17:59:49 +000018155if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18156 as_dirname=dirname
18157else
18158 as_dirname=false
18159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018161as_me=`$as_basename -- "$0" ||
18162$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18163 X"$0" : 'X\(//\)$' \| \
18164 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018165$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018166 sed '/^.*\/\([^/][^/]*\)\/*$/{
18167 s//\1/
18168 q
18169 }
18170 /^X\/\(\/\/\)$/{
18171 s//\1/
18172 q
18173 }
18174 /^X\/\(\/\).*/{
18175 s//\1/
18176 q
18177 }
18178 s/.*/./; q'`
18179
Matthias Kloseb9621712010-04-24 17:59:49 +000018180# Avoid depending upon Character Ranges.
18181as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18182as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18183as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18184as_cr_digits='0123456789'
18185as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018186
18187ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018188case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018189-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018190 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018191 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018192 xy) ECHO_C='\c';;
18193 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18194 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195 esac;;
18196*)
18197 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018198esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018199
Martin v. Löwis11437992002-04-12 09:54:03 +000018200rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201if test -d conf$$.dir; then
18202 rm -f conf$$.dir/conf$$.file
18203else
18204 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018205 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018207if (echo >conf$$.file) 2>/dev/null; then
18208 if ln -s conf$$.file conf$$ 2>/dev/null; then
18209 as_ln_s='ln -s'
18210 # ... but there are two gotchas:
18211 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18212 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018213 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018214 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018215 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018216 elif ln conf$$.file conf$$ 2>/dev/null; then
18217 as_ln_s=ln
18218 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018219 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018220 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018221else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018222 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18225rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018226
Matthias Kloseb9621712010-04-24 17:59:49 +000018227
18228# as_fn_mkdir_p
18229# -------------
18230# Create "$as_dir" as a directory, including parents if necessary.
18231as_fn_mkdir_p ()
18232{
18233
18234 case $as_dir in #(
18235 -*) as_dir=./$as_dir;;
18236 esac
18237 test -d "$as_dir" || eval $as_mkdir_p || {
18238 as_dirs=
18239 while :; do
18240 case $as_dir in #(
18241 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18242 *) as_qdir=$as_dir;;
18243 esac
18244 as_dirs="'$as_qdir' $as_dirs"
18245 as_dir=`$as_dirname -- "$as_dir" ||
18246$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18247 X"$as_dir" : 'X\(//\)[^/]' \| \
18248 X"$as_dir" : 'X\(//\)$' \| \
18249 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18250$as_echo X"$as_dir" |
18251 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18252 s//\1/
18253 q
18254 }
18255 /^X\(\/\/\)[^/].*/{
18256 s//\1/
18257 q
18258 }
18259 /^X\(\/\/\)$/{
18260 s//\1/
18261 q
18262 }
18263 /^X\(\/\).*/{
18264 s//\1/
18265 q
18266 }
18267 s/.*/./; q'`
18268 test -d "$as_dir" && break
18269 done
18270 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018271 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018272
18273
18274} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018275if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018276 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018277else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018278 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018279 as_mkdir_p=false
18280fi
18281
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018282
18283# as_fn_executable_p FILE
18284# -----------------------
18285# Test if FILE is an executable regular file.
18286as_fn_executable_p ()
18287{
18288 test -f "$1" && test -x "$1"
18289} # as_fn_executable_p
18290as_test_x='test -x'
18291as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018292
18293# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018294as_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 +000018295
18296# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018297as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018298
18299
Martin v. Löwis11437992002-04-12 09:54:03 +000018300exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018301## ----------------------------------- ##
18302## Main body of $CONFIG_STATUS script. ##
18303## ----------------------------------- ##
18304_ASEOF
18305test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018306
Matthias Kloseb9621712010-04-24 17:59:49 +000018307cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18308# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018309# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018310# values after options handling.
18311ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018312This file was extended by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018313generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018314
18315 CONFIG_FILES = $CONFIG_FILES
18316 CONFIG_HEADERS = $CONFIG_HEADERS
18317 CONFIG_LINKS = $CONFIG_LINKS
18318 CONFIG_COMMANDS = $CONFIG_COMMANDS
18319 $ $0 $@
18320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018321on `(hostname || uname -n) 2>/dev/null | sed 1q`
18322"
18323
Martin v. Löwis11437992002-04-12 09:54:03 +000018324_ACEOF
18325
Matthias Kloseb9621712010-04-24 17:59:49 +000018326case $ac_config_files in *"
18327"*) set x $ac_config_files; shift; ac_config_files=$*;;
18328esac
18329
18330case $ac_config_headers in *"
18331"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18332esac
18333
18334
18335cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018336# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018337config_files="$ac_config_files"
18338config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018341
Matthias Kloseb9621712010-04-24 17:59:49 +000018342cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018343ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018344\`$as_me' instantiates files and other configuration actions
18345from templates according to the current configuration. Unless the files
18346and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018347
Matthias Kloseb9621712010-04-24 17:59:49 +000018348Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018349
18350 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018351 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018352 --config print configuration, then exit
18353 -q, --quiet, --silent
18354 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018355 -d, --debug don't remove temporary files
18356 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018357 --file=FILE[:TEMPLATE]
18358 instantiate the configuration file FILE
18359 --header=FILE[:TEMPLATE]
18360 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018361
18362Configuration files:
18363$config_files
18364
18365Configuration headers:
18366$config_headers
18367
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018368Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018371cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18372ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018373ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018374python config.status 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018375configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018376 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018377
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018378Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018379This config.status script is free software; the Free Software Foundation
18380gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018381
18382ac_pwd='$ac_pwd'
18383srcdir='$srcdir'
18384INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018385MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018386test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018387_ACEOF
18388
Matthias Kloseb9621712010-04-24 17:59:49 +000018389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18390# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018391ac_need_defaults=:
18392while test $# != 0
18393do
18394 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018395 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18397 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018398 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018399 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018400 --*=)
18401 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18402 ac_optarg=
18403 ac_shift=:
18404 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018405 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018406 ac_option=$1
18407 ac_optarg=$2
18408 ac_shift=shift
18409 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018410 esac
18411
Skip Montanaro6dead952003-09-25 14:50:04 +000018412 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018413 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018414 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18415 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018416 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018417 $as_echo "$ac_cs_version"; exit ;;
18418 --config | --confi | --conf | --con | --co | --c )
18419 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018421 debug=: ;;
18422 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018423 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018424 case $ac_optarg in
18425 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018426 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018427 esac
18428 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018429 ac_need_defaults=false;;
18430 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018431 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018432 case $ac_optarg in
18433 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18434 esac
18435 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018436 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437 --he | --h)
18438 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018439 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018440Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018441 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018442 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018443 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18444 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18445 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018446
18447 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018448 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018449Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018450
Matthias Kloseb9621712010-04-24 17:59:49 +000018451 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018453
18454 esac
18455 shift
18456done
18457
Skip Montanaro6dead952003-09-25 14:50:04 +000018458ac_configure_extra_args=
18459
18460if $ac_cs_silent; then
18461 exec 6>/dev/null
18462 ac_configure_extra_args="$ac_configure_extra_args --silent"
18463fi
18464
18465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018466cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018467if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018468 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018469 shift
18470 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18471 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018472 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018473 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018474fi
18475
Martin v. Löwis11437992002-04-12 09:54:03 +000018476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018478exec 5>>config.log
18479{
18480 echo
18481 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18482## Running $as_me. ##
18483_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018484 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018489_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018490
Matthias Kloseb9621712010-04-24 17:59:49 +000018491cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492
18493# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018494for ac_config_target in $ac_config_targets
18495do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018496 case $ac_config_target in
18497 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18498 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18499 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018500 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18501 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018502 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018503 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018504 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018505 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018506 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018507
Victor Stinnere0be4232011-10-25 13:06:09 +020018508 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018509 esac
18510done
18511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018512
Martin v. Löwis11437992002-04-12 09:54:03 +000018513# If the user did not use the arguments to specify the items to instantiate,
18514# then the envvar interface is used. Set only those that are not.
18515# We use the long form for the default assignment because of an extremely
18516# bizarre bug on SunOS 4.1.3.
18517if $ac_need_defaults; then
18518 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18519 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18520fi
18521
Skip Montanaro6dead952003-09-25 14:50:04 +000018522# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018524# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525# Hook for its removal unless debugging.
18526# Note that there is a small window in which the directory will not be cleaned:
18527# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018528$debug ||
18529{
Victor Stinnere0be4232011-10-25 13:06:09 +020018530 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018531 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018532 : "${ac_tmp:=$tmp}"
18533 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018534' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018535 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018536}
Martin v. Löwis11437992002-04-12 09:54:03 +000018537# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018538
Martin v. Löwis11437992002-04-12 09:54:03 +000018539{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018540 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018541 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018542} ||
18543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018544 tmp=./conf$$-$RANDOM
18545 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018546} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018547ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018548
Matthias Kloseb9621712010-04-24 17:59:49 +000018549# Set up the scripts for CONFIG_FILES section.
18550# No need to generate them if there are no CONFIG_FILES.
18551# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018552if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018553
Matthias Kloseb9621712010-04-24 17:59:49 +000018554
18555ac_cr=`echo X | tr X '\015'`
18556# On cygwin, bash can eat \r inside `` if the user requested igncr.
18557# But we know of no other shell where ac_cr would be empty at this
18558# point, so we can use a bashism as a fallback.
18559if test "x$ac_cr" = x; then
18560 eval ac_cr=\$\'\\r\'
18561fi
18562ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18563if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018564 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018565else
18566 ac_cs_awk_cr=$ac_cr
18567fi
18568
Victor Stinnere0be4232011-10-25 13:06:09 +020018569echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018570_ACEOF
18571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018572
Matthias Kloseb9621712010-04-24 17:59:49 +000018573{
18574 echo "cat >conf$$subs.awk <<_ACEOF" &&
18575 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18576 echo "_ACEOF"
18577} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018578 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18579ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580ac_delim='%!_!# '
18581for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018582 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018583 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584
Matthias Kloseb9621712010-04-24 17:59:49 +000018585 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18586 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018587 break
18588 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018589 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018590 else
18591 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018592 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018593done
Matthias Kloseb9621712010-04-24 17:59:49 +000018594rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018595
Matthias Kloseb9621712010-04-24 17:59:49 +000018596cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018597cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018599sed -n '
18600h
18601s/^/S["/; s/!.*/"]=/
18602p
18603g
18604s/^[^!]*!//
18605:repl
18606t repl
18607s/'"$ac_delim"'$//
18608t delim
18609:nl
18610h
18611s/\(.\{148\}\)..*/\1/
18612t more1
18613s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18614p
18615n
18616b repl
18617:more1
18618s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18619p
18620g
18621s/.\{148\}//
18622t nl
18623:delim
18624h
18625s/\(.\{148\}\)..*/\1/
18626t more2
18627s/["\\]/\\&/g; s/^/"/; s/$/"/
18628p
18629b
18630:more2
18631s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18632p
18633g
18634s/.\{148\}//
18635t delim
18636' <conf$$subs.awk | sed '
18637/^[^""]/{
18638 N
18639 s/\n//
18640}
18641' >>$CONFIG_STATUS || ac_write_fail=1
18642rm -f conf$$subs.awk
18643cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18644_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018645cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018646 for (key in S) S_is_set[key] = 1
18647 FS = ""
18648
18649}
18650{
18651 line = $ 0
18652 nfields = split(line, field, "@")
18653 substed = 0
18654 len = length(field[1])
18655 for (i = 2; i < nfields; i++) {
18656 key = field[i]
18657 keylen = length(key)
18658 if (S_is_set[key]) {
18659 value = S[key]
18660 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18661 len += length(value) + length(field[++i])
18662 substed = 1
18663 } else
18664 len += 1 + keylen
18665 }
18666
18667 print line
18668}
18669
18670_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018672cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18673if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18674 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18675else
18676 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018677fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018678 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018679_ACEOF
18680
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018681# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18682# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018683# trailing colons and then remove the whole line if VPATH becomes empty
18684# (actually we leave an empty line to preserve line numbers).
18685if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018686 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18687h
18688s///
18689s/^/:/
18690s/[ ]*$/:/
18691s/:\$(srcdir):/:/g
18692s/:\${srcdir}:/:/g
18693s/:@srcdir@:/:/g
18694s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018695s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018696x
18697s/\(=[ ]*\).*/\1/
18698G
18699s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018700s/^[^=]*=[ ]*$//
18701}'
18702fi
18703
Matthias Kloseb9621712010-04-24 17:59:49 +000018704cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018705fi # test -n "$CONFIG_FILES"
18706
Matthias Kloseb9621712010-04-24 17:59:49 +000018707# Set up the scripts for CONFIG_HEADERS section.
18708# No need to generate them if there are no CONFIG_HEADERS.
18709# This happens for instance with `./config.status Makefile'.
18710if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018711cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018712BEGIN {
18713_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018714
Matthias Kloseb9621712010-04-24 17:59:49 +000018715# Transform confdefs.h into an awk script `defines.awk', embedded as
18716# here-document in config.status, that substitutes the proper values into
18717# config.h.in to produce config.h.
18718
18719# Create a delimiter string that does not exist in confdefs.h, to ease
18720# handling of long lines.
18721ac_delim='%!_!# '
18722for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018723 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18724 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018725 break
18726 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018727 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018728 else
18729 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18730 fi
18731done
18732
18733# For the awk script, D is an array of macro values keyed by name,
18734# likewise P contains macro parameters if any. Preserve backslash
18735# newline sequences.
18736
18737ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18738sed -n '
18739s/.\{148\}/&'"$ac_delim"'/g
18740t rset
18741:rset
18742s/^[ ]*#[ ]*define[ ][ ]*/ /
18743t def
18744d
18745:def
18746s/\\$//
18747t bsnl
18748s/["\\]/\\&/g
18749s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18750D["\1"]=" \3"/p
18751s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18752d
18753:bsnl
18754s/["\\]/\\&/g
18755s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18756D["\1"]=" \3\\\\\\n"\\/p
18757t cont
18758s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18759t cont
18760d
18761:cont
18762n
18763s/.\{148\}/&'"$ac_delim"'/g
18764t clear
18765:clear
18766s/\\$//
18767t bsnlc
18768s/["\\]/\\&/g; s/^/"/; s/$/"/p
18769d
18770:bsnlc
18771s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18772b cont
18773' <confdefs.h | sed '
18774s/'"$ac_delim"'/"\\\
18775"/g' >>$CONFIG_STATUS || ac_write_fail=1
18776
18777cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18778 for (key in D) D_is_set[key] = 1
18779 FS = ""
18780}
18781/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18782 line = \$ 0
18783 split(line, arg, " ")
18784 if (arg[1] == "#") {
18785 defundef = arg[2]
18786 mac1 = arg[3]
18787 } else {
18788 defundef = substr(arg[1], 2)
18789 mac1 = arg[2]
18790 }
18791 split(mac1, mac2, "(") #)
18792 macro = mac2[1]
18793 prefix = substr(line, 1, index(line, defundef) - 1)
18794 if (D_is_set[macro]) {
18795 # Preserve the white space surrounding the "#".
18796 print prefix "define", macro P[macro] D[macro]
18797 next
18798 } else {
18799 # Replace #undef with comments. This is necessary, for example,
18800 # in the case of _POSIX_SOURCE, which is predefined and required
18801 # on some systems where configure will not decide to define it.
18802 if (defundef == "undef") {
18803 print "/*", prefix defundef, macro, "*/"
18804 next
18805 }
18806 }
18807}
18808{ print }
18809_ACAWK
18810_ACEOF
18811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018812 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018813fi # test -n "$CONFIG_HEADERS"
18814
18815
18816eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18817shift
18818for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018819do
18820 case $ac_tag in
18821 :[FHLC]) ac_mode=$ac_tag; continue;;
18822 esac
18823 case $ac_mode$ac_tag in
18824 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018825 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018826 :[FH]-) ac_tag=-:-;;
18827 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18828 esac
18829 ac_save_IFS=$IFS
18830 IFS=:
18831 set x $ac_tag
18832 IFS=$ac_save_IFS
18833 shift
18834 ac_file=$1
18835 shift
18836
18837 case $ac_mode in
18838 :L) ac_source=$1;;
18839 :[FH])
18840 ac_file_inputs=
18841 for ac_f
18842 do
18843 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018844 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018845 *) # Look for the file first in the build tree, then in the source tree
18846 # (if the path is not absolute). The absolute path cannot be DOS-style,
18847 # because $ac_f cannot contain `:'.
18848 test -f "$ac_f" ||
18849 case $ac_f in
18850 [\\/$]*) false;;
18851 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18852 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018853 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018854 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018855 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18856 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018857 done
18858
18859 # Let's still pretend it is `configure' which instantiates (i.e., don't
18860 # use $as_me), people would be surprised to read:
18861 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018862 configure_input='Generated from '`
18863 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18864 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018865 if test x"$ac_file" != x-; then
18866 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018867 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18868$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018869 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018870 # Neutralize special characters interpreted by sed in replacement strings.
18871 case $configure_input in #(
18872 *\&* | *\|* | *\\* )
18873 ac_sed_conf_input=`$as_echo "$configure_input" |
18874 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18875 *) ac_sed_conf_input=$configure_input;;
18876 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018877
18878 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018879 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18880 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018881 esac
18882 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018883 esac
18884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018885 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018886$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018887 X"$ac_file" : 'X\(//\)[^/]' \| \
18888 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018889 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018890$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018891 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18892 s//\1/
18893 q
18894 }
18895 /^X\(\/\/\)[^/].*/{
18896 s//\1/
18897 q
18898 }
18899 /^X\(\/\/\)$/{
18900 s//\1/
18901 q
18902 }
18903 /^X\(\/\).*/{
18904 s//\1/
18905 q
18906 }
18907 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018908 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018909 ac_builddir=.
18910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018911case "$ac_dir" in
18912.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18913*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018914 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018915 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018916 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018917 case $ac_top_builddir_sub in
18918 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18919 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18920 esac ;;
18921esac
18922ac_abs_top_builddir=$ac_pwd
18923ac_abs_builddir=$ac_pwd$ac_dir_suffix
18924# for backward compatibility:
18925ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018926
18927case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018928 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018929 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018930 ac_top_srcdir=$ac_top_builddir_sub
18931 ac_abs_top_srcdir=$ac_pwd ;;
18932 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018933 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018934 ac_top_srcdir=$srcdir
18935 ac_abs_top_srcdir=$srcdir ;;
18936 *) # Relative name.
18937 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18938 ac_top_srcdir=$ac_top_build_prefix$srcdir
18939 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018940esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018941ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018942
Martin v. Löwis11437992002-04-12 09:54:03 +000018943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018944 case $ac_mode in
18945 :F)
18946 #
18947 # CONFIG_FILE
18948 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018949
18950 case $INSTALL in
18951 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018952 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018953 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018954 ac_MKDIR_P=$MKDIR_P
18955 case $MKDIR_P in
18956 [\\/$]* | ?:[\\/]* ) ;;
18957 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18958 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018959_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018960
Matthias Kloseb9621712010-04-24 17:59:49 +000018961cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018962# If the template does not know about datarootdir, expand it.
18963# FIXME: This hack should be removed a few years after 2.60.
18964ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018965ac_sed_dataroot='
18966/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018967 p
18968 q
18969}
18970/@datadir@/p
18971/@docdir@/p
18972/@infodir@/p
18973/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018974/@mandir@/p'
18975case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018976*datarootdir*) ac_datarootdir_seen=yes;;
18977*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18979$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018981cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018982 ac_datarootdir_hack='
18983 s&@datadir@&$datadir&g
18984 s&@docdir@&$docdir&g
18985 s&@infodir@&$infodir&g
18986 s&@localedir@&$localedir&g
18987 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018988 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018989esac
18990_ACEOF
18991
18992# Neutralize VPATH when `$srcdir' = `.'.
18993# Shell code in configure.ac might set extrasub.
18994# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018995cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18996ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018997$extrasub
18998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018999cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000019000:t
19001/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000019002s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019003s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000019004s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019005s&@srcdir@&$ac_srcdir&;t t
19006s&@abs_srcdir@&$ac_abs_srcdir&;t t
19007s&@top_srcdir@&$ac_top_srcdir&;t t
19008s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19009s&@builddir@&$ac_builddir&;t t
19010s&@abs_builddir@&$ac_abs_builddir&;t t
19011s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19012s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010019013s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019014$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000019015"
Victor Stinnere0be4232011-10-25 13:06:09 +020019016eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
19017 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019019test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020019020 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19021 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19022 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000019023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019024which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000019025$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019026which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019027
Victor Stinnere0be4232011-10-25 13:06:09 +020019028 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000019029 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020019030 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19031 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000019032 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019033 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019034 ;;
19035 :H)
19036 #
19037 # CONFIG_HEADER
19038 #
Martin v. Löwis11437992002-04-12 09:54:03 +000019039 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019040 {
19041 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019042 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19043 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019044 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020019045 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000019046 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19047$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019048 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019049 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020019050 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019051 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019052 fi
19053 else
Matthias Kloseb9621712010-04-24 17:59:49 +000019054 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020019055 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019056 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000019057 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019058 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019060
19061 esac
19062
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000019063
19064 case $ac_file$ac_mode in
19065 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
19066
19067 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019068done # for ac_tag
19069
Guido van Rossum627b2d71993-12-24 10:39:16 +000019070
Matthias Kloseb9621712010-04-24 17:59:49 +000019071as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000019072_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019073ac_clean_files=$ac_clean_files_save
19074
Matthias Kloseb9621712010-04-24 17:59:49 +000019075test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019076 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000019077
Martin v. Löwis11437992002-04-12 09:54:03 +000019078
19079# configure is writing to config.log, and then calls config.status.
19080# config.status does its own redirection, appending to config.log.
19081# Unfortunately, on DOS this fails, as config.log is still kept open
19082# by configure, so config.status won't be able to write to it; its
19083# output is simply discarded. So we exec the FD to /dev/null,
19084# effectively closing config.log, so it can be properly (re)opened and
19085# appended to by config.status. When coming back to configure, we
19086# need to make the FD available again.
19087if test "$no_create" != yes; then
19088 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019089 ac_config_status_args=
19090 test "$silent" = yes &&
19091 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019092 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019093 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019094 exec 5>>config.log
19095 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19096 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019097 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000019098fi
19099if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19101$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019102fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019103
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019104
Christian Heimes75ed8902013-11-20 01:11:18 +010019105echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019106if test ! -f Modules/Setup.local
19107then
19108 echo "# Edit this file for local setup changes" >Modules/Setup.local
19109fi
19110
Christian Heimes75ed8902013-11-20 01:11:18 +010019111echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019112$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020019113 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020019114 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019115mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070019116
19117if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
19118 echo "" >&6
19119 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070019120 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 +000019121 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070019122 echo "" >&6
19123 echo "" >&6
19124fi