blob: 26e9aa9fe454e2d528417bae06c5d4a9a74d9a43 [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.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
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'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
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
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100634PLATLIBDIR
xdegaye254b3092019-04-29 09:27:40 +0200635LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700636EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200637ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000638SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000639LIBC
640LIBM
641HAVE_GETHOSTBYNAME
642HAVE_GETHOSTBYNAME_R
643HAVE_GETHOSTBYNAME_R_3_ARG
644HAVE_GETHOSTBYNAME_R_5_ARG
645HAVE_GETHOSTBYNAME_R_6_ARG
646LIBOBJS
647TRUE
648MACHDEP_OBJS
649DYNLOADFILE
650DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700651DTRACE_OBJS
652DTRACE_HEADERS
653DFLAGS
654DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700655TCLTK_LIBS
656TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000657LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800658PKG_CONFIG_LIBDIR
659PKG_CONFIG_PATH
660PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000661SHLIBS
662CFLAGSFORSHARED
663LINKFORSHARED
664CCSHARED
665BLDSHARED
666LDCXXSHARED
667LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700668SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000669LIBTOOL_CRUFT
670OTHER_LIBTOOL_OPT
671UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100672LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700673CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000674BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200675CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000676OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700677LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200684LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200685LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700686PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700687DEF_MAKE_RULE
688DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000689ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000690LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100691MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000692INSTALL_DATA
693INSTALL_SCRIPT
694INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200695ac_ct_READELF
696READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000697ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200698ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000700GNULD
701LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000702LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000703RUNSHARED
704INSTSONAME
705LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000706PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000707BLDLIBRARY
708DLLLIBRARY
709LDLIBRARY
710LIBRARY
711BUILDEXEEXT
712EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200713NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200714MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200715PLATFORM_TRIPLET
716MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200717ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000718MAINCC
719CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700720SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200721GREP
722CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000723OBJEXT
724EXEEXT
725ac_ct_CC
726CPPFLAGS
727LDFLAGS
728CFLAGS
729CC
730EXPORT_MACOSX_DEPLOYMENT_TARGET
731CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200817with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100829with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000830enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700831with_tcltk_includes
832with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000837with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_libm
841with_libc
842enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100843with_platlibdir
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100846with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100847with_ssl_default_suites
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200848with_experimental_isolated_subinterpreters
Matthias Kloseb9621712010-04-24 17:59:49 +0000849'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850 ac_precious_vars='build_alias
851host_alias
852target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100853MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854CC
855CFLAGS
856LDFLAGS
857LIBS
858CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800859CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700860PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800861PKG_CONFIG
862PKG_CONFIG_PATH
863PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864
Guido van Rossum627b2d71993-12-24 10:39:16 +0000865
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000867ac_init_help=
868ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000869ac_unrecognized_opts=
870ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871# The variables have the same names as the options, with
872# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000873cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876no_recursion=
877prefix=NONE
878program_prefix=NONE
879program_suffix=NONE
880program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885x_includes=NONE
886x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000887
888# Installation directory options.
889# These are left unexpanded so users can "make install exec_prefix=/foo"
890# and all the variables that are supposed to be based on exec_prefix
891# by default will actually change.
892# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894bindir='${exec_prefix}/bin'
895sbindir='${exec_prefix}/sbin'
896libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897datarootdir='${prefix}/share'
898datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899sysconfdir='${prefix}/etc'
900sharedstatedir='${prefix}/com'
901localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902includedir='${prefix}/include'
903oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
905infodir='${datarootdir}/info'
906htmldir='${docdir}'
907dvidir='${docdir}'
908pdfdir='${docdir}'
909psdir='${docdir}'
910libdir='${exec_prefix}/lib'
911localedir='${datarootdir}/locale'
912mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000913
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000917do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 # If the previous option needs an argument, assign it.
919 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 ac_prev=
922 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000923 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200926 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
927 *=) ac_optarg= ;;
928 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 # Accept the important Cygnus configure options, so we can diagnose typos.
932
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 case $ac_dashdash$ac_option in
934 --)
935 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -bindir | --bindir | --bindi | --bind | --bin | --bi)
938 ac_prev=bindir ;;
939 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
942 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947 -cache-file | --cache-file | --cache-fil | --cache-fi \
948 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
949 ac_prev=cache_file ;;
950 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
951 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 cache_file=$ac_optarg ;;
953
954 --config-cache | -C)
955 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000962 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
963 | --dataroo | --dataro | --datar)
964 ac_prev=datarootdir ;;
965 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
966 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
967 datarootdir=$ac_optarg ;;
968
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000971 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200973 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000974 ac_useropt_orig=$ac_useropt
975 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
976 case $ac_user_opts in
977 *"
978"enable_$ac_useropt"
979"*) ;;
980 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
981 ac_unrecognized_sep=', ';;
982 esac
983 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984
985 -docdir | --docdir | --docdi | --doc | --do)
986 ac_prev=docdir ;;
987 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
988 docdir=$ac_optarg ;;
989
990 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
991 ac_prev=dvidir ;;
992 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
993 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200999 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001000 ac_useropt_orig=$ac_useropt
1001 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1002 case $ac_user_opts in
1003 *"
1004"enable_$ac_useropt"
1005"*) ;;
1006 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1007 ac_unrecognized_sep=', ';;
1008 esac
1009 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1012 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1013 | --exec | --exe | --ex)
1014 ac_prev=exec_prefix ;;
1015 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1016 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1017 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001021 # Obsolete; use --with-gas.
1022 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 -help | --help | --hel | --he | -h)
1025 ac_init_help=long ;;
1026 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1027 ac_init_help=recursive ;;
1028 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1029 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
1031 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001036 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1037 ac_prev=htmldir ;;
1038 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1039 | --ht=*)
1040 htmldir=$ac_optarg ;;
1041
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042 -includedir | --includedir | --includedi | --included | --include \
1043 | --includ | --inclu | --incl | --inc)
1044 ac_prev=includedir ;;
1045 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1046 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -infodir | --infodir | --infodi | --infod | --info | --inf)
1050 ac_prev=infodir ;;
1051 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libdir | --libdir | --libdi | --libd)
1055 ac_prev=libdir ;;
1056 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1060 | --libexe | --libex | --libe)
1061 ac_prev=libexecdir ;;
1062 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1063 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 -localedir | --localedir | --localedi | --localed | --locale)
1067 ac_prev=localedir ;;
1068 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1069 localedir=$ac_optarg ;;
1070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073 ac_prev=localstatedir ;;
1074 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001075 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1079 ac_prev=mandir ;;
1080 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 # Obsolete; use --without-fp.
1085 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 no_create=yes ;;
1090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001091 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1092 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1093 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1096 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1097 | --oldin | --oldi | --old | --ol | --o)
1098 ac_prev=oldincludedir ;;
1099 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1100 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1101 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001103
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1105 ac_prev=prefix ;;
1106 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1110 | --program-pre | --program-pr | --program-p)
1111 ac_prev=program_prefix ;;
1112 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1113 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1117 | --program-suf | --program-su | --program-s)
1118 ac_prev=program_suffix ;;
1119 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1120 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122
1123 -program-transform-name | --program-transform-name \
1124 | --program-transform-nam | --program-transform-na \
1125 | --program-transform-n | --program-transform- \
1126 | --program-transform | --program-transfor \
1127 | --program-transfo | --program-transf \
1128 | --program-trans | --program-tran \
1129 | --progr-tra | --program-tr | --program-t)
1130 ac_prev=program_transform_name ;;
1131 -program-transform-name=* | --program-transform-name=* \
1132 | --program-transform-nam=* | --program-transform-na=* \
1133 | --program-transform-n=* | --program-transform-=* \
1134 | --program-transform=* | --program-transfor=* \
1135 | --program-transfo=* | --program-transf=* \
1136 | --program-trans=* | --program-tran=* \
1137 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1141 ac_prev=pdfdir ;;
1142 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1143 pdfdir=$ac_optarg ;;
1144
1145 -psdir | --psdir | --psdi | --psd | --ps)
1146 ac_prev=psdir ;;
1147 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1148 psdir=$ac_optarg ;;
1149
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1151 | -silent | --silent | --silen | --sile | --sil)
1152 silent=yes ;;
1153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1155 ac_prev=sbindir ;;
1156 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1157 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159
1160 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1161 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1162 | --sharedst | --shareds | --shared | --share | --shar \
1163 | --sha | --sh)
1164 ac_prev=sharedstatedir ;;
1165 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1166 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1167 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1168 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 -site | --site | --sit)
1172 ac_prev=site ;;
1173 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1177 ac_prev=srcdir ;;
1178 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1182 | --syscon | --sysco | --sysc | --sys | --sy)
1183 ac_prev=sysconfdir ;;
1184 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1185 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1194 verbose=yes ;;
1195
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 -version | --version | --versio | --versi | --vers | -V)
1197 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 ac_useropt_orig=$ac_useropt
1205 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1206 case $ac_user_opts in
1207 *"
1208"with_$ac_useropt"
1209"*) ;;
1210 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1211 ac_unrecognized_sep=', ';;
1212 esac
1213 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
1215 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001219 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 ac_useropt_orig=$ac_useropt
1221 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1222 case $ac_user_opts in
1223 *"
1224"with_$ac_useropt"
1225"*) ;;
1226 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1227 ac_unrecognized_sep=', ';;
1228 esac
1229 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001231 --x)
1232 # Obsolete; use --with-x.
1233 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
1235 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1236 | --x-incl | --x-inc | --x-in | --x-i)
1237 ac_prev=x_includes ;;
1238 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1239 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1243 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1244 ac_prev=x_libraries ;;
1245 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1246 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001249 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1250Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ;;
1252
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 *=*)
1254 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1255 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 case $ac_envvar in #(
1257 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001258 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 export $ac_envvar ;;
1262
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001263 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001268 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269 ;;
1270
1271 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272done
1273
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001276 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277fi
1278
Matthias Kloseb9621712010-04-24 17:59:49 +00001279if test -n "$ac_unrecognized_opts"; then
1280 case $enable_option_checking in
1281 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001283 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1284 esac
1285fi
1286
1287# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1289 datadir sysconfdir sharedstatedir localstatedir includedir \
1290 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001291 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001294 # Remove trailing slashes.
1295 case $ac_val in
1296 */ )
1297 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1298 eval $ac_var=\$ac_val;;
1299 esac
1300 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001301 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 [\\/$]* | ?:[\\/]* ) continue;;
1303 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001306done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308# There might be people who depend on the old broken behavior: `$host'
1309# used to hold the argument of --host etc.
1310# FIXME: To remove some day.
1311build=$build_alias
1312host=$host_alias
1313target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# FIXME: To remove some day.
1316if test "x$host_alias" != x; then
1317 if test "x$build_alias" = x; then
1318 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001319 elif test "x$build_alias" != "x$host_alias"; then
1320 cross_compiling=yes
1321 fi
1322fi
1323
1324ac_tool_prefix=
1325test -n "$host_alias" && ac_tool_prefix=$host_alias-
1326
1327test "$silent" = yes && exec 6>/dev/null
1328
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330ac_pwd=`pwd` && test -n "$ac_pwd" &&
1331ac_ls_di=`ls -di .` &&
1332ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336
1337
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338# Find the source files, if location was not specified.
1339if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001342 ac_confdir=`$as_dirname -- "$as_myself" ||
1343$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1344 X"$as_myself" : 'X\(//\)[^/]' \| \
1345 X"$as_myself" : 'X\(//\)$' \| \
1346 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1347$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)[^/].*/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\/\)$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\).*/{
1361 s//\1/
1362 q
1363 }
1364 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001365 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367 srcdir=..
1368 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001369else
1370 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372if test ! -r "$srcdir/$ac_unique_file"; then
1373 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1377ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001378 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379 pwd)`
1380# When building in place, set srcdir=.
1381if test "$ac_abs_confdir" = "$ac_pwd"; then
1382 srcdir=.
1383fi
1384# Remove unnecessary trailing slashes from srcdir.
1385# Double slashes in file names in object file debugging info
1386# mess up M-x gdb in Emacs.
1387case $srcdir in
1388*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1389esac
1390for ac_var in $ac_precious_vars; do
1391 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_env_${ac_var}_value=\$${ac_var}
1393 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1394 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1395done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001396
Martin v. Löwis11437992002-04-12 09:54:03 +00001397#
1398# Report the --help message.
1399#
1400if test "$ac_init_help" = "long"; then
1401 # Omit some internal or obsolete options to make the list less imposing.
1402 # This message is too long to be a string in the A/UX 3.1 sh.
1403 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001404\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Usage: $0 [OPTION]... [VAR=VALUE]...
1407
1408To assign environment variables (e.g., CC, CFLAGS...), specify them as
1409VAR=VALUE. See below for descriptions of some of the useful variables.
1410
1411Defaults for the options are specified in brackets.
1412
1413Configuration:
1414 -h, --help display this help and exit
1415 --help=short display options specific to this package
1416 --help=recursive display the short help of all the included packages
1417 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001418 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 --cache-file=FILE cache test results in FILE [disabled]
1420 -C, --config-cache alias for \`--cache-file=config.cache'
1421 -n, --no-create do not create output files
1422 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1423
Martin v. Löwis11437992002-04-12 09:54:03 +00001424Installation directories:
1425 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
1430By default, \`make install' will install all the files in
1431\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1432an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1433for instance \`--prefix=\$HOME'.
1434
1435For better control, use the options below.
1436
1437Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001438 --bindir=DIR user executables [EPREFIX/bin]
1439 --sbindir=DIR system admin executables [EPREFIX/sbin]
1440 --libexecdir=DIR program executables [EPREFIX/libexec]
1441 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1442 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1443 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1444 --libdir=DIR object code libraries [EPREFIX/lib]
1445 --includedir=DIR C header files [PREFIX/include]
1446 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1447 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1448 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1449 --infodir=DIR info documentation [DATAROOTDIR/info]
1450 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1451 --mandir=DIR man documentation [DATAROOTDIR/man]
1452 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1453 --htmldir=DIR html documentation [DOCDIR]
1454 --dvidir=DIR dvi documentation [DOCDIR]
1455 --pdfdir=DIR pdf documentation [DOCDIR]
1456 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001457_ACEOF
1458
1459 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001460
1461System types:
1462 --build=BUILD configure for building on BUILD [guessed]
1463 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
1465fi
1466
1467if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001469 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001470 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 cat <<\_ACEOF
1472
1473Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1476 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001477 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001478 create a universal binary build. SDKDIR specifies
1479 which macOS SDK should be used to perform the build,
1480 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001482 create a Python.framework rather than a traditional
1483 Unix install. optional INSTALLDIR specifies the
1484 installation path. see Mac/README.rst (default is
1485 no)
1486 --enable-shared enable building a shared Python library (default is
1487 no)
1488 --enable-profiling enable C-level code profiling with gprof (default is
1489 no)
1490 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1491 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001492 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001493 support loadable extensions in _sqlite module, see
1494 Doc/library/sqlite3.rst (default is no)
1495 --enable-ipv6 enable ipv6 (with ipv4) support, see
1496 Doc/library/socket.rst (default is yes if supported)
1497 --enable-big-digits[=15|30]
1498 use big digits (30 or 15 bits) for Python longs
1499 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501Optional Packages:
1502 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1503 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001504 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001505 specify the kind of universal binary that should be
1506 created. this option is only valid when
1507 --enable-universalsdk is set; options are:
1508 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1509 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001510 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001511 specify the name for the python framework on macOS
1512 only valid when --enable-framework is set. see
1513 Mac/README.rst (default is 'Python')
1514 --with-cxx-main[=COMPILER]
1515 compile main() and link Python executable with C++
1516 compiler specified in COMPILER (default is $CXX)
1517 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1518 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001519 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001520 (default is no)
1521 --with-assertions build with C assertions enabled (default is no)
1522 --with-lto enable Link-Time-Optimization in any build (default
1523 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001524 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001525 select hash algorithm for use in Python/pyhash.c
1526 (default is SipHash24)
Charles-François Natalid30b0222014-05-08 23:08:51 +01001527 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001528 enable AddressSanitizer memory error detector,
1529 'asan' (default is no)
1530 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1531 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001532 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001533 enable UndefinedBehaviorSanitizer undefined
1534 behaviour detector, 'ubsan' (default is no)
1535 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001536 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001537 library, see Doc/library/pyexpat.rst (default is no)
1538 --with-system-ffi build _ctypes module using an installed ffi library,
1539 see Doc/library/ctypes.rst (default is
1540 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001541 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001542 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001543 --with-decimal-contextvar
1544 build _decimal module using a coroutine-local rather
1545 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001546 --with-tcltk-includes='-I...'
1547 override search for Tcl and Tk include files
1548 --with-tcltk-libs='-L...'
1549 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001550 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001551 override order to check db backends for dbm; a valid
1552 value is a colon separated string with the backend
1553 names `ndbm', `gdbm' and `bdb'.
1554 --with-doc-strings enable documentation strings (default is yes)
1555 --with-pymalloc enable specialized mallocs (default is yes)
1556 --with-c-locale-coercion
1557 enable C locale coercion to a UTF-8 based locale
1558 (default is yes)
1559 --with-valgrind enable Valgrind support (default is no)
1560 --with-dtrace enable DTrace support (default is no)
1561 --with-libm=STRING override libm math library to STRING (default is
1562 system-dependent)
1563 --with-libc=STRING override libc C library to STRING (default is
1564 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001565 --with-platlibdir=DIRNAME
1566 Python library directory name (default is "lib")
Anthony Shaw2de064e2020-01-14 17:40:10 +11001567 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001568 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001569 --with-ensurepip[=install|upgrade|no]
1570 "install" or "upgrade" using bundled pip (default is
1571 upgrade)
1572 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001573 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001574 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001575 Python's preferred selection (default), openssl:
1576 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001577 custom string, PROTOCOL_SSLv2 ignores the setting,
1578 see Doc/library/ssl.rst
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001579 --with-experimental-isolated-subinterpreters
1580 better isolate subinterpreters, experimental build
1581 mode (default is no)
Martin v. Löwis11437992002-04-12 09:54:03 +00001582
1583Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001584 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 CC C compiler command
1586 CFLAGS C compiler flags
1587 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1588 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001593 PROFILE_TASK
1594 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001595 PKG_CONFIG path to pkg-config utility
1596 PKG_CONFIG_PATH
1597 directories to add to pkg-config's search path
1598 PKG_CONFIG_LIBDIR
1599 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
1601Use these variables to override the choices made by `configure' or to help
1602it to find libraries and programs with nonstandard names/locations.
1603
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001604Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001605_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001607fi
1608
1609if test "$ac_init_help" = "recursive"; then
1610 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001612 test -d "$ac_dir" ||
1613 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1614 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 ac_builddir=.
1616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617case "$ac_dir" in
1618.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1619*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001622 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623 case $ac_top_builddir_sub in
1624 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1625 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1626 esac ;;
1627esac
1628ac_abs_top_builddir=$ac_pwd
1629ac_abs_builddir=$ac_pwd$ac_dir_suffix
1630# for backward compatibility:
1631ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001632
1633case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001634 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 ac_top_srcdir=$ac_top_builddir_sub
1637 ac_abs_top_srcdir=$ac_pwd ;;
1638 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640 ac_top_srcdir=$srcdir
1641 ac_abs_top_srcdir=$srcdir ;;
1642 *) # Relative name.
1643 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1644 ac_top_srcdir=$ac_top_build_prefix$srcdir
1645 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001646esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001647ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 cd "$ac_dir" || { ac_status=$?; continue; }
1650 # Check for guested configure.
1651 if test -f "$ac_srcdir/configure.gnu"; then
1652 echo &&
1653 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1654 elif test -f "$ac_srcdir/configure"; then
1655 echo &&
1656 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659 fi || ac_status=$?
1660 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 done
1662fi
1663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001664test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001665if $ac_init_version; then
1666 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001667python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001668generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001669
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001670Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001671This configure script is free software; the Free Software Foundation
1672gives unlimited permission to copy, distribute and modify it.
1673_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001674 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001676
1677## ------------------------ ##
1678## Autoconf initialization. ##
1679## ------------------------ ##
1680
1681# ac_fn_c_try_compile LINENO
1682# --------------------------
1683# Try to compile conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_compile ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1687 rm -f conftest.$ac_objext
1688 if { { ac_try="$ac_compile"
1689case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694$as_echo "$ac_try_echo"; } >&5
1695 (eval "$ac_compile") 2>conftest.err
1696 ac_status=$?
1697 if test -s conftest.err; then
1698 grep -v '^ *+' conftest.err >conftest.er1
1699 cat conftest.er1 >&5
1700 mv -f conftest.er1 conftest.err
1701 fi
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703 test $ac_status = 0; } && {
1704 test -z "$ac_c_werror_flag" ||
1705 test ! -s conftest.err
1706 } && test -s conftest.$ac_objext; then :
1707 ac_retval=0
1708else
1709 $as_echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=1
1713fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001715 as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_compile
1718
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001719# ac_fn_c_try_cpp LINENO
1720# ----------------------
1721# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1722ac_fn_c_try_cpp ()
1723{
1724 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1725 if { { ac_try="$ac_cpp conftest.$ac_ext"
1726case "(($ac_try" in
1727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728 *) ac_try_echo=$ac_try;;
1729esac
1730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1731$as_echo "$ac_try_echo"; } >&5
1732 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1733 ac_status=$?
1734 if test -s conftest.err; then
1735 grep -v '^ *+' conftest.err >conftest.er1
1736 cat conftest.er1 >&5
1737 mv -f conftest.er1 conftest.err
1738 fi
1739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1740 test $ac_status = 0; } > conftest.i && {
1741 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1742 test ! -s conftest.err
1743 }; then :
1744 ac_retval=0
1745else
1746 $as_echo "$as_me: failed program was:" >&5
1747sed 's/^/| /' conftest.$ac_ext >&5
1748
1749 ac_retval=1
1750fi
1751 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1752 as_fn_set_status $ac_retval
1753
1754} # ac_fn_c_try_cpp
1755
Matthias Kloseb9621712010-04-24 17:59:49 +00001756# ac_fn_c_try_link LINENO
1757# -----------------------
1758# Try to link conftest.$ac_ext, and return whether this succeeded.
1759ac_fn_c_try_link ()
1760{
1761 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1762 rm -f conftest.$ac_objext conftest$ac_exeext
1763 if { { ac_try="$ac_link"
1764case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767esac
1768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1769$as_echo "$ac_try_echo"; } >&5
1770 (eval "$ac_link") 2>conftest.err
1771 ac_status=$?
1772 if test -s conftest.err; then
1773 grep -v '^ *+' conftest.err >conftest.er1
1774 cat conftest.er1 >&5
1775 mv -f conftest.er1 conftest.err
1776 fi
1777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1778 test $ac_status = 0; } && {
1779 test -z "$ac_c_werror_flag" ||
1780 test ! -s conftest.err
1781 } && test -s conftest$ac_exeext && {
1782 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001783 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001784 }; then :
1785 ac_retval=0
1786else
1787 $as_echo "$as_me: failed program was:" >&5
1788sed 's/^/| /' conftest.$ac_ext >&5
1789
1790 ac_retval=1
1791fi
1792 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1793 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1794 # interfere with the next link command; also delete a directory that is
1795 # left behind by Apple's compiler. We do this before executing the actions.
1796 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001798 as_fn_set_status $ac_retval
1799
1800} # ac_fn_c_try_link
1801
Matthias Kloseb9621712010-04-24 17:59:49 +00001802# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1803# -------------------------------------------------------
1804# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1805# the include files in INCLUDES and setting the cache variable VAR
1806# accordingly.
1807ac_fn_c_check_header_mongrel ()
1808{
1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001810 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001813if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 $as_echo_n "(cached) " >&6
1815fi
1816eval ac_res=\$$3
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1818$as_echo "$ac_res" >&6; }
1819else
1820 # Is the header compilable?
1821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1822$as_echo_n "checking $2 usability... " >&6; }
1823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1824/* end confdefs.h. */
1825$4
1826#include <$2>
1827_ACEOF
1828if ac_fn_c_try_compile "$LINENO"; then :
1829 ac_header_compiler=yes
1830else
1831 ac_header_compiler=no
1832fi
1833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1835$as_echo "$ac_header_compiler" >&6; }
1836
1837# Is the header present?
1838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1839$as_echo_n "checking $2 presence... " >&6; }
1840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1841/* end confdefs.h. */
1842#include <$2>
1843_ACEOF
1844if ac_fn_c_try_cpp "$LINENO"; then :
1845 ac_header_preproc=yes
1846else
1847 ac_header_preproc=no
1848fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001849rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1851$as_echo "$ac_header_preproc" >&6; }
1852
1853# So? What about this header?
1854case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1855 yes:no: )
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1857$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1859$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1860 ;;
1861 no:yes:* )
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1863$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1865$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1867$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1869$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1871$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001872( $as_echo "## --------------------------------------- ##
1873## Report this to https://bugs.python.org/ ##
1874## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001875 ) | sed "s/^/$as_me: WARNING: /" >&2
1876 ;;
1877esac
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1879$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001880if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001881 $as_echo_n "(cached) " >&6
1882else
1883 eval "$3=\$ac_header_compiler"
1884fi
1885eval ac_res=\$$3
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1887$as_echo "$ac_res" >&6; }
1888fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001889 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001890
1891} # ac_fn_c_check_header_mongrel
1892
1893# ac_fn_c_try_run LINENO
1894# ----------------------
1895# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1896# that executables *can* be run.
1897ac_fn_c_try_run ()
1898{
1899 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1900 if { { ac_try="$ac_link"
1901case "(($ac_try" in
1902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1903 *) ac_try_echo=$ac_try;;
1904esac
1905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1906$as_echo "$ac_try_echo"; } >&5
1907 (eval "$ac_link") 2>&5
1908 ac_status=$?
1909 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1910 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1911 { { case "(($ac_try" in
1912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1913 *) ac_try_echo=$ac_try;;
1914esac
1915eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1916$as_echo "$ac_try_echo"; } >&5
1917 (eval "$ac_try") 2>&5
1918 ac_status=$?
1919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1920 test $ac_status = 0; }; }; then :
1921 ac_retval=0
1922else
1923 $as_echo "$as_me: program exited with status $ac_status" >&5
1924 $as_echo "$as_me: failed program was:" >&5
1925sed 's/^/| /' conftest.$ac_ext >&5
1926
1927 ac_retval=$ac_status
1928fi
1929 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001931 as_fn_set_status $ac_retval
1932
1933} # ac_fn_c_try_run
1934
1935# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1936# -------------------------------------------------------
1937# Tests whether HEADER exists and can be compiled using the include files in
1938# INCLUDES, setting the cache variable VAR accordingly.
1939ac_fn_c_check_header_compile ()
1940{
1941 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1943$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001944if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001945 $as_echo_n "(cached) " >&6
1946else
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$4
1950#include <$2>
1951_ACEOF
1952if ac_fn_c_try_compile "$LINENO"; then :
1953 eval "$3=yes"
1954else
1955 eval "$3=no"
1956fi
1957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1958fi
1959eval ac_res=\$$3
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1961$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001962 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001963
1964} # ac_fn_c_check_header_compile
1965
Matthias Kloseb9621712010-04-24 17:59:49 +00001966# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1967# -------------------------------------------
1968# Tests whether TYPE exists after having included INCLUDES, setting cache
1969# variable VAR accordingly.
1970ac_fn_c_check_type ()
1971{
1972 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1974$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001975if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001976 $as_echo_n "(cached) " >&6
1977else
1978 eval "$3=no"
1979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1980/* end confdefs.h. */
1981$4
1982int
1983main ()
1984{
1985if (sizeof ($2))
1986 return 0;
1987 ;
1988 return 0;
1989}
1990_ACEOF
1991if ac_fn_c_try_compile "$LINENO"; then :
1992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998if (sizeof (($2)))
1999 return 0;
2000 ;
2001 return 0;
2002}
2003_ACEOF
2004if ac_fn_c_try_compile "$LINENO"; then :
2005
2006else
2007 eval "$3=yes"
2008fi
2009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2010fi
2011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002016 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018} # ac_fn_c_check_type
2019
Matthias Kloseb9621712010-04-24 17:59:49 +00002020# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2021# --------------------------------------------
2022# Tries to find the compile-time value of EXPR in a program that includes
2023# INCLUDES, setting VAR accordingly. Returns whether the value could be
2024# computed
2025ac_fn_c_compute_int ()
2026{
2027 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2028 if test "$cross_compiling" = yes; then
2029 # Depending upon the size, compute the lo and hi bounds.
2030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002037test_array [0] = 0;
2038return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045 ac_lo=0 ac_mid=0
2046 while :; do
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002054test_array [0] = 0;
2055return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_hi=$ac_mid; break
2063else
2064 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2065 if test $ac_lo -le $ac_mid; then
2066 ac_lo= ac_hi=
2067 break
2068 fi
2069 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 done
2073else
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002081test_array [0] = 0;
2082return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_hi=-1 ac_mid=-1
2090 while :; do
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002098test_array [0] = 0;
2099return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_lo=$ac_mid; break
2107else
2108 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2109 if test $ac_mid -le $ac_hi; then
2110 ac_lo= ac_hi=
2111 break
2112 fi
2113 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2114fi
2115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116 done
2117else
2118 ac_lo= ac_hi=
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123# Binary search between lo and hi bounds.
2124while test "x$ac_lo" != "x$ac_hi"; do
2125 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129int
2130main ()
2131{
2132static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002133test_array [0] = 0;
2134return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002135
2136 ;
2137 return 0;
2138}
2139_ACEOF
2140if ac_fn_c_try_compile "$LINENO"; then :
2141 ac_hi=$ac_mid
2142else
2143 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146done
2147case $ac_lo in #((
2148?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2149'') ac_retval=1 ;;
2150esac
2151 else
2152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2153/* end confdefs.h. */
2154$4
2155static long int longval () { return $2; }
2156static unsigned long int ulongval () { return $2; }
2157#include <stdio.h>
2158#include <stdlib.h>
2159int
2160main ()
2161{
2162
2163 FILE *f = fopen ("conftest.val", "w");
2164 if (! f)
2165 return 1;
2166 if (($2) < 0)
2167 {
2168 long int i = longval ();
2169 if (i != ($2))
2170 return 1;
2171 fprintf (f, "%ld", i);
2172 }
2173 else
2174 {
2175 unsigned long int i = ulongval ();
2176 if (i != ($2))
2177 return 1;
2178 fprintf (f, "%lu", i);
2179 }
2180 /* Do not output a trailing newline, as this causes \r\n confusion
2181 on some platforms. */
2182 return ferror (f) || fclose (f) != 0;
2183
2184 ;
2185 return 0;
2186}
2187_ACEOF
2188if ac_fn_c_try_run "$LINENO"; then :
2189 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2190else
2191 ac_retval=1
2192fi
2193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2194 conftest.$ac_objext conftest.beam conftest.$ac_ext
2195rm -f conftest.val
2196
2197 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002198 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002199 as_fn_set_status $ac_retval
2200
2201} # ac_fn_c_compute_int
2202
2203# ac_fn_c_check_func LINENO FUNC VAR
2204# ----------------------------------
2205# Tests whether FUNC exists, setting the cache variable VAR accordingly
2206ac_fn_c_check_func ()
2207{
2208 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2210$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002211if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002212 $as_echo_n "(cached) " >&6
2213else
2214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215/* end confdefs.h. */
2216/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2217 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2218#define $2 innocuous_$2
2219
2220/* System header to define __stub macros and hopefully few prototypes,
2221 which can conflict with char $2 (); below.
2222 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2223 <limits.h> exists even on freestanding compilers. */
2224
2225#ifdef __STDC__
2226# include <limits.h>
2227#else
2228# include <assert.h>
2229#endif
2230
2231#undef $2
2232
2233/* Override any GCC internal prototype to avoid an error.
2234 Use char because int might match the return type of a GCC
2235 builtin and then its argument prototype would still apply. */
2236#ifdef __cplusplus
2237extern "C"
2238#endif
2239char $2 ();
2240/* The GNU C library defines this for functions which it implements
2241 to always fail with ENOSYS. Some functions are actually named
2242 something starting with __ and the normal name is an alias. */
2243#if defined __stub_$2 || defined __stub___$2
2244choke me
2245#endif
2246
2247int
2248main ()
2249{
2250return $2 ();
2251 ;
2252 return 0;
2253}
2254_ACEOF
2255if ac_fn_c_try_link "$LINENO"; then :
2256 eval "$3=yes"
2257else
2258 eval "$3=no"
2259fi
2260rm -f core conftest.err conftest.$ac_objext \
2261 conftest$ac_exeext conftest.$ac_ext
2262fi
2263eval ac_res=\$$3
2264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2265$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002266 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002267
2268} # ac_fn_c_check_func
2269
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002270# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2271# ---------------------------------------------
2272# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2273# accordingly.
2274ac_fn_c_check_decl ()
2275{
2276 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2277 as_decl_name=`echo $2|sed 's/ *(.*//'`
2278 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2280$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2281if eval \${$3+:} false; then :
2282 $as_echo_n "(cached) " >&6
2283else
2284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h. */
2286$4
2287int
2288main ()
2289{
2290#ifndef $as_decl_name
2291#ifdef __cplusplus
2292 (void) $as_decl_use;
2293#else
2294 (void) $as_decl_name;
2295#endif
2296#endif
2297
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302if ac_fn_c_try_compile "$LINENO"; then :
2303 eval "$3=yes"
2304else
2305 eval "$3=no"
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308fi
2309eval ac_res=\$$3
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2311$as_echo "$ac_res" >&6; }
2312 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2313
2314} # ac_fn_c_check_decl
2315
Matthias Kloseb9621712010-04-24 17:59:49 +00002316# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2317# ----------------------------------------------------
2318# Tries to find if the field MEMBER exists in type AGGR, after including
2319# INCLUDES, setting cache variable VAR accordingly.
2320ac_fn_c_check_member ()
2321{
2322 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2324$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002325if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002326 $as_echo_n "(cached) " >&6
2327else
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h. */
2330$5
2331int
2332main ()
2333{
2334static $2 ac_aggr;
2335if (ac_aggr.$3)
2336return 0;
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341if ac_fn_c_try_compile "$LINENO"; then :
2342 eval "$4=yes"
2343else
2344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2345/* end confdefs.h. */
2346$5
2347int
2348main ()
2349{
2350static $2 ac_aggr;
2351if (sizeof ac_aggr.$3)
2352return 0;
2353 ;
2354 return 0;
2355}
2356_ACEOF
2357if ac_fn_c_try_compile "$LINENO"; then :
2358 eval "$4=yes"
2359else
2360 eval "$4=no"
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363fi
2364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2365fi
2366eval ac_res=\$$4
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2368$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002369 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002370
2371} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002373This file contains any messages produced by compilers while
2374running configure, to aid debugging if configure makes a mistake.
2375
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002376It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002377generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379 $ $0 $@
2380
2381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002383{
2384cat <<_ASUNAME
2385## --------- ##
2386## Platform. ##
2387## --------- ##
2388
2389hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2390uname -m = `(uname -m) 2>/dev/null || echo unknown`
2391uname -r = `(uname -r) 2>/dev/null || echo unknown`
2392uname -s = `(uname -s) 2>/dev/null || echo unknown`
2393uname -v = `(uname -v) 2>/dev/null || echo unknown`
2394
2395/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2396/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2397
2398/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2399/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2400/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002401/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002402/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2403/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2404/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2405
2406_ASUNAME
2407
2408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2409for as_dir in $PATH
2410do
2411 IFS=$as_save_IFS
2412 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 $as_echo "PATH: $as_dir"
2414 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002416
2417} >&5
2418
2419cat >&5 <<_ACEOF
2420
2421
2422## ----------- ##
2423## Core tests. ##
2424## ----------- ##
2425
2426_ACEOF
2427
2428
2429# Keep a trace of the command line.
2430# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002431# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002432# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002433# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002434ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002435ac_configure_args0=
2436ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002437ac_must_keep_next=false
2438for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002439do
Skip Montanaro6dead952003-09-25 14:50:04 +00002440 for ac_arg
2441 do
2442 case $ac_arg in
2443 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2444 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2445 | -silent | --silent | --silen | --sile | --sil)
2446 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002448 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 esac
2450 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002451 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002453 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002454 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002455 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002456 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002457 case $ac_arg in
2458 *=* | --config-cache | -C | -disable-* | --disable-* \
2459 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2460 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2461 | -with-* | --with-* | -without-* | --without-* | --x)
2462 case "$ac_configure_args0 " in
2463 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2464 esac
2465 ;;
2466 -* ) ac_must_keep_next=true ;;
2467 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002468 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002470 ;;
2471 esac
2472 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002473done
Matthias Kloseb9621712010-04-24 17:59:49 +00002474{ ac_configure_args0=; unset ac_configure_args0;}
2475{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002476
2477# When interrupted or exit'd, cleanup temporary files, and complete
2478# config.log. We remove comments because anyway the quotes in there
2479# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480# WARNING: Use '\'' to represent an apostrophe within the trap.
2481# 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 +00002482trap 'exit_status=$?
2483 # Save into config.log some information that might help in debugging.
2484 {
2485 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002486
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002488## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 echo
2491 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492(
2493 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2494 eval ac_val=\$$ac_var
2495 case $ac_val in #(
2496 *${as_nl}*)
2497 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2499$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
2501 case $ac_var in #(
2502 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2504 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 esac ;;
2506 esac
2507 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2510 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 "s/'\''/'\''\\\\'\'''\''/g;
2513 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2514 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002515 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002517 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 esac |
2519 sort
2520)
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002522
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002524## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 echo
2527 for ac_var in $ac_subst_vars
2528 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 eval ac_val=\$$ac_var
2530 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002534 done | sort
2535 echo
2536
2537 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002538 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002540## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 echo
2542 for ac_var in $ac_subst_files
2543 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 eval ac_val=\$$ac_var
2545 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002549 done | sort
2550 echo
2551 fi
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002554 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002555## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002556## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 echo
2560 fi
2561 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002562 $as_echo "$as_me: caught signal $ac_signal"
2563 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 rm -f core *.core core.conftest.* &&
2566 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002569for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002570 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002571done
2572ac_signal=0
2573
2574# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002576
Matthias Kloseb9621712010-04-24 17:59:49 +00002577$as_echo "/* confdefs.h */" > confdefs.h
2578
Martin v. Löwis11437992002-04-12 09:54:03 +00002579# Predefined preprocessor variables.
2580
2581cat >>confdefs.h <<_ACEOF
2582#define PACKAGE_NAME "$PACKAGE_NAME"
2583_ACEOF
2584
Martin v. Löwis11437992002-04-12 09:54:03 +00002585cat >>confdefs.h <<_ACEOF
2586#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2587_ACEOF
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589cat >>confdefs.h <<_ACEOF
2590#define PACKAGE_VERSION "$PACKAGE_VERSION"
2591_ACEOF
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593cat >>confdefs.h <<_ACEOF
2594#define PACKAGE_STRING "$PACKAGE_STRING"
2595_ACEOF
2596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597cat >>confdefs.h <<_ACEOF
2598#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2599_ACEOF
2600
Matthias Kloseb9621712010-04-24 17:59:49 +00002601cat >>confdefs.h <<_ACEOF
2602#define PACKAGE_URL "$PACKAGE_URL"
2603_ACEOF
2604
Martin v. Löwis11437992002-04-12 09:54:03 +00002605
2606# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002607# Prefer an explicitly selected file to automatically selected ones.
2608ac_site_file1=NONE
2609ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002611 # We do not want a PATH search for config.site.
2612 case $CONFIG_SITE in #((
2613 -*) ac_site_file1=./$CONFIG_SITE;;
2614 */*) ac_site_file1=$CONFIG_SITE;;
2615 *) ac_site_file1=./$CONFIG_SITE;;
2616 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 ac_site_file1=$prefix/share/config.site
2619 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620else
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 ac_site_file1=$ac_default_prefix/share/config.site
2622 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002624for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625do
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 test "x$ac_site_file" = xNONE && continue
2627 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2628 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2629$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002631 . "$ac_site_file" \
2632 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2634as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002635See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002636 fi
2637done
2638
2639if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002640 # Some versions of bash will fail to source /dev/null (special files
2641 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2642 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2644$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2647 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 esac
2649 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002650else
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2652$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 >$cache_file
2654fi
2655
2656# Check that the precious variables saved in the cache have kept the same
2657# value.
2658ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002659for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2661 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2663 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 case $ac_old_set,$ac_new_set in
2665 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2667$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 +00002668 ac_cache_corrupted=: ;;
2669 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2671$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 ac_cache_corrupted=: ;;
2673 ,);;
2674 *)
2675 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 # differences in whitespace do not lead to failure.
2677 ac_old_val_w=`echo x $ac_old_val`
2678 ac_new_val_w=`echo x $ac_new_val`
2679 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2681$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2682 ac_cache_corrupted=:
2683 else
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2685$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2686 eval $ac_var=\$ac_old_val
2687 fi
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2689$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2691$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 fi;;
2693 esac
2694 # Pass precious variables to config.status.
2695 if test "$ac_new_set" = set; then
2696 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 *) ac_arg=$ac_var=$ac_new_val ;;
2699 esac
2700 case " $ac_configure_args " in
2701 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 esac
2704 fi
2705done
2706if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002707 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2710$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002711 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002713## -------------------- ##
2714## Main body of script. ##
2715## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002716
Guido van Rossum7f43da71994-08-01 12:15:30 +00002717ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002718ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2721ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722
Guido van Rossum627b2d71993-12-24 10:39:16 +00002723
Michael W. Hudson54241132001-12-07 15:38:26 +00002724
Trent Nelson4d4ec652012-10-16 08:51:24 -04002725
Christian Heimesff5be6e2018-01-20 13:19:21 +01002726
2727
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002728if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002729 # If we're building out-of-tree, we need to make sure the following
2730 # resources get picked up before their $srcdir counterparts.
2731 # Objects/ -> typeslots.inc
2732 # Include/ -> Python-ast.h, graminit.h
2733 # Python/ -> importlib.h
2734 # (A side effect of this is that these resources will automatically be
2735 # regenerated when building out-of-tree, regardless of whether or not
2736 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2737 # off.)
2738 BASECPPFLAGS="-IObjects -IInclude -IPython"
2739else
2740 BASECPPFLAGS=""
2741fi
2742
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743
2744
2745
2746
Victor Stinner9ed34a82017-05-02 22:35:58 +02002747if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002748then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002749# Extract the first word of "git", so it can be a program name with args.
2750set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2752$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754 $as_echo_n "(cached) " >&6
2755else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756 if test -n "$HAS_GIT"; then
2757 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758else
2759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2760for as_dir in $PATH
2761do
2762 IFS=$as_save_IFS
2763 test -z "$as_dir" && as_dir=.
2764 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002765 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002766 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2768 break 2
2769 fi
2770done
2771 done
2772IFS=$as_save_IFS
2773
Ned Deily5c4b0d02017-03-04 00:19:55 -05002774 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002775fi
2776fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002777HAS_GIT=$ac_cv_prog_HAS_GIT
2778if test -n "$HAS_GIT"; then
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2780$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002781else
2782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2783$as_echo "no" >&6; }
2784fi
2785
2786
2787else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002788HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002789fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002790if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791then
Xiang Zhang4c855572018-08-20 22:36:19 +08002792 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2793 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2794 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002795else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002796 GITVERSION=""
2797 GITTAG=""
2798 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002799fi
2800
2801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002803
2804
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002805ac_aux_dir=
2806for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2807 if test -f "$ac_dir/install-sh"; then
2808 ac_aux_dir=$ac_dir
2809 ac_install_sh="$ac_aux_dir/install-sh -c"
2810 break
2811 elif test -f "$ac_dir/install.sh"; then
2812 ac_aux_dir=$ac_dir
2813 ac_install_sh="$ac_aux_dir/install.sh -c"
2814 break
2815 elif test -f "$ac_dir/shtool"; then
2816 ac_aux_dir=$ac_dir
2817 ac_install_sh="$ac_aux_dir/shtool install -c"
2818 break
2819 fi
2820done
2821if test -z "$ac_aux_dir"; then
2822 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2823fi
2824
2825# These three variables are undocumented and unsupported,
2826# and are intended to be withdrawn in a future Autoconf release.
2827# They can cause serious problems if a builder's source tree is in a directory
2828# whose full name contains unusual characters.
2829ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2830ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2831ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2832
2833
2834# Make sure we can run config.sub.
2835$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2836 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2837
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2839$as_echo_n "checking build system type... " >&6; }
2840if ${ac_cv_build+:} false; then :
2841 $as_echo_n "(cached) " >&6
2842else
2843 ac_build_alias=$build_alias
2844test "x$ac_build_alias" = x &&
2845 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2846test "x$ac_build_alias" = x &&
2847 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2848ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2849 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2850
2851fi
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2853$as_echo "$ac_cv_build" >&6; }
2854case $ac_cv_build in
2855*-*-*) ;;
2856*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2857esac
2858build=$ac_cv_build
2859ac_save_IFS=$IFS; IFS='-'
2860set x $ac_cv_build
2861shift
2862build_cpu=$1
2863build_vendor=$2
2864shift; shift
2865# Remember, the first character of IFS is used to create $*,
2866# except with old shells:
2867build_os=$*
2868IFS=$ac_save_IFS
2869case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2870
2871
2872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2873$as_echo_n "checking host system type... " >&6; }
2874if ${ac_cv_host+:} false; then :
2875 $as_echo_n "(cached) " >&6
2876else
2877 if test "x$host_alias" = x; then
2878 ac_cv_host=$ac_cv_build
2879else
2880 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2881 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2882fi
2883
2884fi
2885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2886$as_echo "$ac_cv_host" >&6; }
2887case $ac_cv_host in
2888*-*-*) ;;
2889*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2890esac
2891host=$ac_cv_host
2892ac_save_IFS=$IFS; IFS='-'
2893set x $ac_cv_host
2894shift
2895host_cpu=$1
2896host_vendor=$2
2897shift; shift
2898# Remember, the first character of IFS is used to create $*,
2899# except with old shells:
2900host_os=$*
2901IFS=$ac_save_IFS
2902case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2903
2904
2905
doko@python.orga10e4a92013-01-25 18:45:12 +01002906
2907
Ned Deilyfcbc2462014-08-22 13:32:49 -07002908# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2909rm -f pybuilddir.txt
2910
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911for ac_prog in python$PACKAGE_VERSION python3 python
2912do
2913 # Extract the first word of "$ac_prog", so it can be a program name with args.
2914set dummy $ac_prog; ac_word=$2
2915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2916$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002917if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918 $as_echo_n "(cached) " >&6
2919else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002920 if test -n "$PYTHON_FOR_REGEN"; then
2921 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922else
2923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2924for as_dir in $PATH
2925do
2926 IFS=$as_save_IFS
2927 test -z "$as_dir" && as_dir=.
2928 for ac_exec_ext in '' $ac_executable_extensions; do
2929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002930 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2932 break 2
2933 fi
2934done
2935 done
2936IFS=$as_save_IFS
2937
2938fi
2939fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002940PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2941if test -n "$PYTHON_FOR_REGEN"; then
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2943$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002944else
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2946$as_echo "no" >&6; }
2947fi
2948
2949
Victor Stinnera5c62a82017-05-03 18:21:48 +02002950 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002951done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002952test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002953
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002954
2955
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002956if test "$cross_compiling" = yes; then
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2958$as_echo_n "checking for python interpreter for cross build... " >&6; }
2959 if test -z "$PYTHON_FOR_BUILD"; then
2960 for interp in python$PACKAGE_VERSION python3 python; do
2961 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002962 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 +02002963 break
2964 fi
2965 interp=
2966 done
2967 if test x$interp = x; then
2968 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2969 fi
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2971$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002972 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 +02002973 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002974elif test "$cross_compiling" = maybe; then
2975 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002976else
2977 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2978fi
2979
2980
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
Benjamin Petersond23f8222009-04-05 19:13:16 +00002982if test "$prefix" != "/"; then
2983 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2984fi
2985
2986
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
2988
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002989# We don't use PACKAGE_ variables, and they cause conflicts
2990# with other autoconf-based packages that include Python.h
2991grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2992rm confdefs.h
2993mv confdefs.h.new confdefs.h
2994
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002995
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002996VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002997
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002998# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002999
3000SOVERSION=1.0
3001
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002# The later defininition of _XOPEN_SOURCE disables certain features
3003# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
3007
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003008# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3009# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3010# them.
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003013
3014
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003015# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3016# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3017# them.
3018
Matthias Kloseb9621712010-04-24 17:59:49 +00003019$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003020
3021
Martin v. Löwisd6320502004-08-12 13:45:08 +00003022# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003023# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3024# them.
3025
Matthias Kloseb9621712010-04-24 17:59:49 +00003026$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003027
3028
3029
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003030define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003031
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003032# Arguments passed to configure.
3033
3034CONFIG_ARGS="$ac_configure_args"
3035
Matthias Kloseb9621712010-04-24 17:59:49 +00003036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3037$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003039if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041 case $enableval in
3042 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003043 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003044 # information
3045 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003046 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003048 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3049 if test ! -d "${enableval}"
3050 then
3051 enableval=/
3052 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003054 ;;
3055 esac
3056 case $enableval in
3057 no)
3058 UNIVERSALSDK=
3059 enable_universalsdk=
3060 ;;
3061 *)
3062 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063 if test ! -d "${UNIVERSALSDK}"
3064 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003065 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003067 ;;
3068 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003069
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003070
Thomas Wouters477c8d52006-05-27 19:21:47 +00003071else
3072
3073 UNIVERSALSDK=
3074 enable_universalsdk=
3075
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003078if test -n "${UNIVERSALSDK}"
3079then
Matthias Kloseb9621712010-04-24 17:59:49 +00003080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3081$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003082else
Matthias Kloseb9621712010-04-24 17:59:49 +00003083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3084$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003087
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003088
Ned Deily87adb6e2013-10-18 21:09:56 -07003089ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003090
Ned Deilycbfb9a52012-06-23 16:02:19 -07003091# For backward compatibility reasons we prefer to select '32-bit' if available,
3092# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003094if test "`uname -s`" = "Darwin"
3095then
3096 if test -n "${UNIVERSALSDK}"
3097 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003098 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003099 then
3100 UNIVERSAL_ARCHS="intel"
3101 fi
3102 fi
3103fi
3104
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003105
Matthias Kloseb9621712010-04-24 17:59:49 +00003106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3107$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003108
3109# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003110if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003111 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003112 UNIVERSAL_ARCHS="$withval"
3113
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114fi
3115
Ned Deily87adb6e2013-10-18 21:09:56 -07003116if test -n "${UNIVERSALSDK}"
3117then
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3119$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3120else
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3122$as_echo "no" >&6; }
3123fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003124
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003125
3126# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003127if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003128 withval=$with_framework_name;
3129 PYTHONFRAMEWORK=${withval}
3130 PYTHONFRAMEWORKDIR=${withval}.framework
3131 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3132
3133else
3134
3135 PYTHONFRAMEWORK=Python
3136 PYTHONFRAMEWORKDIR=Python.framework
3137 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3138
3139fi
3140
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003142if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003144 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003145 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003146 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003147 esac
3148 case $enableval in
3149 no)
3150 PYTHONFRAMEWORK=
3151 PYTHONFRAMEWORKDIR=no-framework
3152 PYTHONFRAMEWORKPREFIX=
3153 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003154 FRAMEWORKINSTALLFIRST=
3155 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003156 FRAMEWORKALTINSTALLFIRST=
3157 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003158 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 if test "x${prefix}" = "xNONE"; then
3160 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3161 else
3162 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3163 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003164 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003165 ;;
3166 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003167 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003168 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003169 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003170 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003171 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3172 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003173 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003175
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003176 if test "x${prefix}" = "xNONE" ; then
3177 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003178
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003179 else
3180 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3181 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003182
3183 case "${enableval}" in
3184 /System*)
3185 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3186 if test "${prefix}" = "NONE" ; then
3187 # See below
3188 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3189 fi
3190 ;;
3191
3192 /Library*)
3193 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3194 ;;
3195
3196 */Library/Frameworks)
3197 MDIR="`dirname "${enableval}"`"
3198 MDIR="`dirname "${MDIR}"`"
3199 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3200
3201 if test "${prefix}" = "NONE"; then
3202 # User hasn't specified the
3203 # --prefix option, but wants to install
3204 # the framework in a non-default location,
3205 # ensure that the compatibility links get
3206 # installed relative to that prefix as well
3207 # instead of in /usr/local.
3208 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3209 fi
3210 ;;
3211
3212 *)
3213 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3214 ;;
3215 esac
3216
Jack Jansen127e56e2001-09-11 14:41:54 +00003217 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003219 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3226
3227 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3228
Jack Jansene578a632001-08-15 01:27:14 +00003229 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003230
Guido van Rossum563e7081996-09-10 18:20:48 +00003231else
Martin v. Löwis11437992002-04-12 09:54:03 +00003232
Jack Jansene578a632001-08-15 01:27:14 +00003233 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003234 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003235 PYTHONFRAMEWORKPREFIX=
3236 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003237 FRAMEWORKINSTALLFIRST=
3238 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003239 FRAMEWORKALTINSTALLFIRST=
3240 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003241 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003242 if test "x${prefix}" = "xNONE" ; then
3243 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3244 else
3245 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3246 fi
Jack Jansene578a632001-08-15 01:27:14 +00003247 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003250fi
3251
Thomas Wouters477c8d52006-05-27 19:21:47 +00003252
3253
Michael W. Hudson54241132001-12-07 15:38:26 +00003254
3255
3256
3257
Jack Jansene578a632001-08-15 01:27:14 +00003258
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003259
3260
3261
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003262
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003263
Ned Deilyb8f944f2013-11-21 22:42:25 -08003264
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003265
3266cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003267#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003268_ACEOF
3269
3270
Jack Jansene578a632001-08-15 01:27:14 +00003271##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003272## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003273## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003274##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275# Set name for machine-dependent library files
3276
Matthias Kloseb9621712010-04-24 17:59:49 +00003277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3278$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279if test -z "$MACHDEP"
3280then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 # avoid using uname for cross builds
3282 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003283 # ac_sys_system and ac_sys_release are used for setting
3284 # a lot of different things including 'define_xopen_source'
3285 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003287 *-*-linux-android*)
3288 ac_sys_system=Linux-android
3289 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 *-*-linux*)
3291 ac_sys_system=Linux
3292 ;;
3293 *-*-cygwin*)
3294 ac_sys_system=Cygwin
3295 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003296 *-*-vxworks*)
3297 ac_sys_system=VxWorks
3298 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003299 *)
3300 # for now, limit cross builds to known configurations
3301 MACHDEP="unknown"
3302 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3303 esac
3304 ac_sys_release=
3305 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003306 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003307 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003308 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003309 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003310 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003311 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003312 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003313 fi
3314 ac_md_system=`echo $ac_sys_system |
3315 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3316 ac_md_release=`echo $ac_sys_release |
3317 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3318 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003319
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003320 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003321 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003322 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003323 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003324 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003325 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003326 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003327fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3329$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003330
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003331
3332if test "$cross_compiling" = yes; then
3333 case "$host" in
3334 *-*-linux*)
3335 case "$host_cpu" in
3336 arm*)
3337 _host_cpu=arm
3338 ;;
3339 *)
3340 _host_cpu=$host_cpu
3341 esac
3342 ;;
3343 *-*-cygwin*)
3344 _host_cpu=
3345 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003346 *-*-vxworks*)
3347 _host_cpu=$host_cpu
3348 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003349 *)
3350 # for now, limit cross builds to known configurations
3351 MACHDEP="unknown"
3352 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3353 esac
3354 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3355fi
3356
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003357# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3358# disable features if it is defined, without any means to access these
3359# features as extensions. For these systems, we skip the definition of
3360# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3361# some feature, make sure there is no alternative way to access this
3362# feature. Also, when using wildcards, make sure you have verified the
3363# need for not defining _XOPEN_SOURCE on all systems matching the
3364# wildcard, and that the wildcard does not include future systems
3365# (which may remove their limitations).
3366case $ac_sys_system/$ac_sys_release in
3367 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3368 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003369 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003370 # In addition, Stefan Krah confirms that issue #1244610 exists through
3371 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003372 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003373 define_xopen_source=no
3374 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3375 # also defined. This can be overridden by defining _BSD_SOURCE
3376 # As this has a different meaning on Linux, only define it on OpenBSD
3377
Matthias Kloseb9621712010-04-24 17:59:49 +00003378$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003379
3380 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003381 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003382 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3383 # also defined. This can be overridden by defining _BSD_SOURCE
3384 # As this has a different meaning on Linux, only define it on OpenBSD
3385
Matthias Kloseb9621712010-04-24 17:59:49 +00003386$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003387
3388 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003389 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3390 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3391 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003392 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 +00003393 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003394 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3395 # request to enable features supported by the standard as a request
3396 # to disable features not supported by the standard. The best way
3397 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3398 # entirely and define __EXTENSIONS__ instead.
3399 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003400 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003401 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3402 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003403 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003404 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003405 define_xopen_source=no;;
3406 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003407 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003408 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003409 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003410 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3411 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3412 # identifies itself as Darwin/7.*
3413 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3414 # disables platform specific features beyond repair.
3415 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3416 # has no effect, don't bother defining them
3417 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003418 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003419 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003420 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003421 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3422 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3423 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003424 AIX/4)
3425 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003426 AIX/5)
3427 if test `uname -r` -eq 1; then
3428 define_xopen_source=no
3429 fi
3430 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003431 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3432 # defining NI_NUMERICHOST.
3433 QNX/6.3.2)
3434 define_xopen_source=no
3435 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003436 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3437 # in network headers still using system V types.
3438 VxWorks/*)
3439 define_xopen_source=no
3440 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003441
Ian Nortona9edf442020-02-14 03:09:11 +00003442 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3443 # chroot() and other functions
3444 hp*|HP*)
3445 define_xopen_source=no
3446 ;;
3447
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003448esac
3449
3450if test $define_xopen_source = yes
3451then
Victor Stinner14d098d2011-09-07 22:29:43 +02003452 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003453
Victor Stinner14d098d2011-09-07 22:29:43 +02003454$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003455
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003456
3457 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3458 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3459 # several APIs are not declared. Since this is also needed in some
3460 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003461
Matthias Kloseb9621712010-04-24 17:59:49 +00003462$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003463
3464
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003465
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003466$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003467
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003468fi
3469
Christian Heimes647cd872013-12-07 23:39:33 +01003470# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3471case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003472 hp*|HP*)
3473 define_stdc_a1=yes;;
3474 *)
3475 define_stdc_a1=no;;
3476esac
3477
3478if test $define_stdc_a1 = yes
3479then
Christian Heimes647cd872013-12-07 23:39:33 +01003480
3481$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3482
Christian Heimesb02bcae2013-12-08 15:21:08 +01003483fi
Christian Heimes647cd872013-12-07 23:39:33 +01003484
Jack Jansen6b08a402004-06-03 12:41:45 +00003485# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3486# it may influence the way we can build extensions, so distutils
3487# needs to check it
3488
Thomas Wouters477c8d52006-05-27 19:21:47 +00003489
Jack Jansen6b08a402004-06-03 12:41:45 +00003490CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003491EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003492
Guido van Rossum627b2d71993-12-24 10:39:16 +00003493# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003494
3495# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3496# for debug/optimization stuff. BASECFLAGS is for flags that are required
3497# just to get things to compile and link. Users are free to override OPT
3498# when running configure or make. The build should not break if they do.
3499# BASECFLAGS should generally not be messed with, however.
3500
Guido van Rossum8b131c51995-03-09 14:10:13 +00003501# If the user switches compilers, we can't believe the cache
3502if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3503then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003504 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003505(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003506fi
3507
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003508# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3509# when the compiler supports them, but we don't always want -O2, and
3510# we set -g later.
3511if test -z "$CFLAGS"; then
3512 CFLAGS=
3513fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003514
3515if test "$ac_sys_system" = "Darwin"
3516then
3517 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003518 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003519 # information
3520 if test -z "${CC}"
3521 then
3522 found_gcc=
3523 found_clang=
3524 as_save_IFS=$IFS; IFS=:
3525 for as_dir in $PATH
3526 do
3527 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003528 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003529 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003530 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003531 fi
3532 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003533 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003534 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003535 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003536 fi
3537 fi
3538 done
3539 IFS=$as_save_IFS
3540
3541 if test -n "$found_gcc" -a -n "$found_clang"
3542 then
3543 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3544 then
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3546$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3547 CC="$found_clang"
3548 CXX="$found_clang++"
3549 fi
3550
3551
3552 elif test -z "$found_gcc" -a -n "$found_clang"
3553 then
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3555$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3556 CC="$found_clang"
3557 CXX="$found_clang++"
3558
3559 elif test -z "$found_gcc" -a -z "$found_clang"
3560 then
3561 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3562 if test -n "${found_clang}"
3563 then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3565$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3566 CC="${found_clang}"
3567 CXX="`/usr/bin/xcrun -find clang++`"
3568
3569 # else: use default behaviour
3570 fi
3571 fi
3572 fi
3573fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003574ac_ext=c
3575ac_cpp='$CPP $CPPFLAGS'
3576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3578ac_compiler_gnu=$ac_cv_c_compiler_gnu
3579if test -n "$ac_tool_prefix"; then
3580 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3581set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3583$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003584if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003586else
3587 if test -n "$CC"; then
3588 ac_cv_prog_CC="$CC" # Let the user override the test.
3589else
Martin v. Löwis11437992002-04-12 09:54:03 +00003590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591for as_dir in $PATH
3592do
3593 IFS=$as_save_IFS
3594 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 $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 +00003599 break 2
3600 fi
3601done
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003604
Jack Jansendd19cf82001-12-06 22:36:17 +00003605fi
3606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003608if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3610$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003611else
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003614fi
3615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003616
Martin v. Löwis11437992002-04-12 09:54:03 +00003617fi
3618if test -z "$ac_cv_prog_CC"; then
3619 ac_ct_CC=$CC
3620 # Extract the first word of "gcc", so it can be a program name with args.
3621set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3623$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003624if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003626else
3627 if test -n "$ac_ct_CC"; then
3628 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3629else
3630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3631for as_dir in $PATH
3632do
3633 IFS=$as_save_IFS
3634 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 $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 +00003639 break 2
3640 fi
3641done
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003644
3645fi
3646fi
3647ac_ct_CC=$ac_cv_prog_ac_ct_CC
3648if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3650$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003651else
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3653$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003654fi
3655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656 if test "x$ac_ct_CC" = x; then
3657 CC=""
3658 else
3659 case $cross_compiling:$ac_tool_warned in
3660yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003661{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3662$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663ac_tool_warned=yes ;;
3664esac
3665 CC=$ac_ct_CC
3666 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
3668 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003669fi
3670
Jack Jansendd19cf82001-12-06 22:36:17 +00003671if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 if test -n "$ac_tool_prefix"; then
3673 # 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 +00003674set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3676$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003677if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003679else
3680 if test -n "$CC"; then
3681 ac_cv_prog_CC="$CC" # Let the user override the test.
3682else
Martin v. Löwis11437992002-04-12 09:54:03 +00003683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3684for as_dir in $PATH
3685do
3686 IFS=$as_save_IFS
3687 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $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 +00003692 break 2
3693 fi
3694done
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003697
3698fi
3699fi
3700CC=$ac_cv_prog_CC
3701if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3703$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003704else
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3706$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003707fi
3708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003709
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003711fi
3712if test -z "$CC"; then
3713 # Extract the first word of "cc", so it can be a program name with args.
3714set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3716$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003717if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003719else
3720 if test -n "$CC"; then
3721 ac_cv_prog_CC="$CC" # Let the user override the test.
3722else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003723 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3725for as_dir in $PATH
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3732 ac_prog_rejected=yes
3733 continue
3734 fi
3735 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $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 +00003737 break 2
3738 fi
3739done
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003742
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743if test $ac_prog_rejected = yes; then
3744 # We found a bogon in the path, so make sure we never use it.
3745 set dummy $ac_cv_prog_CC
3746 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748 # We chose a different compiler from the bogus one.
3749 # However, it has the same basename, so the bogon will be chosen
3750 # first if we set CC to just the basename; use the full file name.
3751 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003752 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753 fi
3754fi
3755fi
3756fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003757CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3760$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761else
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3763$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764fi
3765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766
Martin v. Löwis11437992002-04-12 09:54:03 +00003767fi
3768if test -z "$CC"; then
3769 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 do
3772 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3773set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3775$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003776if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003778else
3779 if test -n "$CC"; then
3780 ac_cv_prog_CC="$CC" # Let the user override the test.
3781else
Martin v. Löwis11437992002-04-12 09:54:03 +00003782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3783for as_dir in $PATH
3784do
3785 IFS=$as_save_IFS
3786 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 $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 +00003791 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003792 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793done
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003796
3797fi
3798fi
3799CC=$ac_cv_prog_CC
3800if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3802$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003803else
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3805$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003806fi
3807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 test -n "$CC" && break
3810 done
3811fi
3812if test -z "$CC"; then
3813 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003815do
3816 # Extract the first word of "$ac_prog", so it can be a program name with args.
3817set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3819$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003820if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003822else
3823 if test -n "$ac_ct_CC"; then
3824 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3825else
3826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3827for as_dir in $PATH
3828do
3829 IFS=$as_save_IFS
3830 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003833 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 $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 +00003835 break 2
3836 fi
3837done
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841fi
3842fi
3843ac_ct_CC=$ac_cv_prog_ac_ct_CC
3844if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3846$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003847else
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3849$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 test -n "$ac_ct_CC" && break
3854done
Michael W. Hudson54241132001-12-07 15:38:26 +00003855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856 if test "x$ac_ct_CC" = x; then
3857 CC=""
3858 else
3859 case $cross_compiling:$ac_tool_warned in
3860yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863ac_tool_warned=yes ;;
3864esac
3865 CC=$ac_ct_CC
3866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003867fi
3868
3869fi
3870
3871
Matthias Kloseb9621712010-04-24 17:59:49 +00003872test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003874as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003875See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
3877# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003878$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3879set X $ac_compile
3880ac_compiler=$2
3881for ac_option in --version -v -V -qversion; do
3882 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883case "(($ac_try" in
3884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3885 *) ac_try_echo=$ac_try;;
3886esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3888$as_echo "$ac_try_echo"; } >&5
3889 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003890 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003891 if test -s conftest.err; then
3892 sed '10a\
3893... rest of stderr output deleted ...
3894 10q' conftest.err >conftest.er1
3895 cat conftest.er1 >&5
3896 fi
3897 rm -f conftest.er1 conftest.err
3898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899 test $ac_status = 0; }
3900done
Martin v. Löwis11437992002-04-12 09:54:03 +00003901
Matthias Kloseb9621712010-04-24 17:59:49 +00003902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003903/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003904
Martin v. Löwis11437992002-04-12 09:54:03 +00003905int
3906main ()
3907{
3908
3909 ;
3910 return 0;
3911}
3912_ACEOF
3913ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003914ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003915# Try to create an executable without -o first, disregard a.out.
3916# It will help us diagnose broken compilers, and finding out an intuition
3917# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3919$as_echo_n "checking whether the C compiler works... " >&6; }
3920ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3921
3922# The possible output files:
3923ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925ac_rmfiles=
3926for ac_file in $ac_files
3927do
3928 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3931 esac
3932done
3933rm -f $ac_rmfiles
3934
Matthias Kloseb9621712010-04-24 17:59:49 +00003935if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936case "(($ac_try" in
3937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3938 *) ac_try_echo=$ac_try;;
3939esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3941$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3945 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3947# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3948# in a Makefile. We should not override ac_cv_exeext if it was cached,
3949# so that the user can short-circuit this test for compilers unknown to
3950# Autoconf.
3951for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003952do
3953 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956 ;;
3957 [ab].out )
3958 # We found the default executable, but exeext='' is most
3959 # certainly right.
3960 break;;
3961 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 then :; else
3964 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3965 fi
3966 # We set ac_cv_exeext here because the later test for it is not
3967 # safe: cross compilers may not add the suffix if given an `-o'
3968 # argument, so we may need to know it at that point already.
3969 # Even if this section looks crufty: it has the advantage of
3970 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971 break;;
3972 * )
3973 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003974 esac
3975done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976test "$ac_cv_exeext" = no && ac_cv_exeext=
3977
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003978else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 ac_file=''
3980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003981if test -z "$ac_file"; then :
3982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3983$as_echo "no" >&6; }
3984$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003985sed 's/^/| /' conftest.$ac_ext >&5
3986
Matthias Kloseb9621712010-04-24 17:59:49 +00003987{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3988$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003989as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003990See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003991else
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3993$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3996$as_echo_n "checking for C compiler default output file name... " >&6; }
3997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3998$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000
Matthias Kloseb9621712010-04-24 17:59:49 +00004001rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004002ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4004$as_echo_n "checking for suffix of executables... " >&6; }
4005if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006case "(($ac_try" in
4007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4008 *) ac_try_echo=$ac_try;;
4009esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004010eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4011$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004013 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004014 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4015 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4017# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4018# work properly (i.e., refer to `conftest.exe'), while it won't with
4019# `rm'.
4020for ac_file in conftest.exe conftest conftest.*; do
4021 test -f "$ac_file" || continue
4022 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004024 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4025 break;;
4026 * ) break;;
4027 esac
4028done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004029else
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004032as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004033See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004035rm -f conftest conftest$ac_cv_exeext
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4037$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004038
4039rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004040EXEEXT=$ac_cv_exeext
4041ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4043/* end confdefs.h. */
4044#include <stdio.h>
4045int
4046main ()
4047{
4048FILE *f = fopen ("conftest.out", "w");
4049 return ferror (f) || fclose (f) != 0;
4050
4051 ;
4052 return 0;
4053}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004055ac_clean_files="$ac_clean_files conftest.out"
4056# Check that the compiler produces executables we can run. If not, either
4057# the compiler is broken, or we cross compile.
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4059$as_echo_n "checking whether we are cross compiling... " >&6; }
4060if test "$cross_compiling" != yes; then
4061 { { ac_try="$ac_link"
4062case "(($ac_try" in
4063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4064 *) ac_try_echo=$ac_try;;
4065esac
4066eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4067$as_echo "$ac_try_echo"; } >&5
4068 (eval "$ac_link") 2>&5
4069 ac_status=$?
4070 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4071 test $ac_status = 0; }
4072 if { ac_try='./conftest$ac_cv_exeext'
4073 { { case "(($ac_try" in
4074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075 *) ac_try_echo=$ac_try;;
4076esac
4077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4078$as_echo "$ac_try_echo"; } >&5
4079 (eval "$ac_try") 2>&5
4080 ac_status=$?
4081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4082 test $ac_status = 0; }; }; then
4083 cross_compiling=no
4084 else
4085 if test "$cross_compiling" = maybe; then
4086 cross_compiling=yes
4087 else
4088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004090as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004091If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004092See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 fi
4094 fi
4095fi
4096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4097$as_echo "$cross_compiling" >&6; }
4098
4099rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4100ac_clean_files=$ac_clean_files_save
4101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4102$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004103if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 $as_echo_n "(cached) " >&6
4105else
4106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004107/* end confdefs.h. */
4108
4109int
4110main ()
4111{
4112
4113 ;
4114 return 0;
4115}
4116_ACEOF
4117rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004118if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004119case "(($ac_try" in
4120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4121 *) ac_try_echo=$ac_try;;
4122esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004123eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4124$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4128 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129 for ac_file in conftest.o conftest.obj conftest.*; do
4130 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004133 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4134 break;;
4135 esac
4136done
4137else
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004139sed 's/^/| /' conftest.$ac_ext >&5
4140
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004143as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004144See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004145fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004146rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4149$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004150OBJEXT=$ac_cv_objext
4151ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4153$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004154if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004155 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004156else
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004159
Martin v. Löwis11437992002-04-12 09:54:03 +00004160int
4161main ()
4162{
4163#ifndef __GNUC__
4164 choke me
4165#endif
4166
4167 ;
4168 return 0;
4169}
4170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 ac_compiler_gnu=yes
4173else
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004177ac_cv_c_compiler_gnu=$ac_compiler_gnu
4178
4179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4181$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4182if test $ac_compiler_gnu = yes; then
4183 GCC=yes
4184else
4185 GCC=
4186fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004187ac_test_CFLAGS=${CFLAGS+set}
4188ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4190$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004191if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004193else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194 ac_save_c_werror_flag=$ac_c_werror_flag
4195 ac_c_werror_flag=yes
4196 ac_cv_prog_cc_g=no
4197 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004200
Martin v. Löwis11437992002-04-12 09:54:03 +00004201int
4202main ()
4203{
4204
4205 ;
4206 return 0;
4207}
4208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004209if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004210 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004211else
Matthias Kloseb9621712010-04-24 17:59:49 +00004212 CFLAGS=""
4213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214/* end confdefs.h. */
4215
4216int
4217main ()
4218{
4219
4220 ;
4221 return 0;
4222}
4223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004224if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225
Matthias Kloseb9621712010-04-24 17:59:49 +00004226else
4227 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230/* end confdefs.h. */
4231
4232int
4233main ()
4234{
4235
4236 ;
4237 return 0;
4238}
4239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004240if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4248 ac_c_werror_flag=$ac_save_c_werror_flag
4249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4251$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004252if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004254elif test $ac_cv_prog_cc_g = yes; then
4255 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004256 CFLAGS="-g -O2"
4257 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259 fi
4260else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261 if test "$GCC" = yes; then
4262 CFLAGS="-O2"
4263 else
4264 CFLAGS=
4265 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4268$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004269if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004270 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004271else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004273ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* end confdefs.h. */
4276#include <stdarg.h>
4277#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004278struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004279/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4280struct buf { int x; };
4281FILE * (*rcsopen) (struct buf *, struct stat *, int);
4282static char *e (p, i)
4283 char **p;
4284 int i;
4285{
4286 return p[i];
4287}
4288static char *f (char * (*g) (char **, int), char **p, ...)
4289{
4290 char *s;
4291 va_list v;
4292 va_start (v,p);
4293 s = g (p, va_arg (v,int));
4294 va_end (v);
4295 return s;
4296}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004297
4298/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4299 function prototypes and stuff, but not '\xHH' hex character constants.
4300 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004302 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4303 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004305int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4308 inside strings and character constants. */
4309#define FOO(x) 'x'
4310int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4311
Skip Montanaro6dead952003-09-25 14:50:04 +00004312int test (int i, double x);
4313struct s1 {int (*f) (int a);};
4314struct s2 {int (*f) (double a);};
4315int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4316int argc;
4317char **argv;
4318int
4319main ()
4320{
4321return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4322 ;
4323 return 0;
4324}
4325_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4327 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004328do
4329 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333rm -f core conftest.err conftest.$ac_objext
4334 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004335done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004337CC=$ac_save_CC
4338
4339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340# AC_CACHE_VAL
4341case "x$ac_cv_prog_cc_c89" in
4342 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4344$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4347$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004348 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4351$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004352esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004353if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004354
Matthias Kloseb9621712010-04-24 17:59:49 +00004355fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004356
Martin v. Löwis11437992002-04-12 09:54:03 +00004357ac_ext=c
4358ac_cpp='$CPP $CPPFLAGS'
4359ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4360ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4361ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004363ac_ext=c
4364ac_cpp='$CPP $CPPFLAGS'
4365ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4366ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4367ac_compiler_gnu=$ac_cv_c_compiler_gnu
4368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4369$as_echo_n "checking how to run the C preprocessor... " >&6; }
4370# On Suns, sometimes $CPP names a directory.
4371if test -n "$CPP" && test -d "$CPP"; then
4372 CPP=
4373fi
4374if test -z "$CPP"; then
4375 if ${ac_cv_prog_CPP+:} false; then :
4376 $as_echo_n "(cached) " >&6
4377else
4378 # Double quotes because CPP needs to be expanded
4379 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4380 do
4381 ac_preproc_ok=false
4382for ac_c_preproc_warn_flag in '' yes
4383do
4384 # Use a header file that comes with gcc, so configuring glibc
4385 # with a fresh cross-compiler works.
4386 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4387 # <limits.h> exists even on freestanding compilers.
4388 # On the NeXT, cc -E runs the code through the compiler's parser,
4389 # not just through cpp. "Syntax error" is here to catch this case.
4390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4391/* end confdefs.h. */
4392#ifdef __STDC__
4393# include <limits.h>
4394#else
4395# include <assert.h>
4396#endif
4397 Syntax error
4398_ACEOF
4399if ac_fn_c_try_cpp "$LINENO"; then :
4400
4401else
4402 # Broken: fails on valid input.
4403continue
4404fi
4405rm -f conftest.err conftest.i conftest.$ac_ext
4406
4407 # OK, works on sane cases. Now check whether nonexistent headers
4408 # can be detected and how.
4409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4410/* end confdefs.h. */
4411#include <ac_nonexistent.h>
4412_ACEOF
4413if ac_fn_c_try_cpp "$LINENO"; then :
4414 # Broken: success on invalid input.
4415continue
4416else
4417 # Passes both tests.
4418ac_preproc_ok=:
4419break
4420fi
4421rm -f conftest.err conftest.i conftest.$ac_ext
4422
4423done
4424# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4425rm -f conftest.i conftest.err conftest.$ac_ext
4426if $ac_preproc_ok; then :
4427 break
4428fi
4429
4430 done
4431 ac_cv_prog_CPP=$CPP
4432
4433fi
4434 CPP=$ac_cv_prog_CPP
4435else
4436 ac_cv_prog_CPP=$CPP
4437fi
4438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4439$as_echo "$CPP" >&6; }
4440ac_preproc_ok=false
4441for ac_c_preproc_warn_flag in '' yes
4442do
4443 # Use a header file that comes with gcc, so configuring glibc
4444 # with a fresh cross-compiler works.
4445 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4446 # <limits.h> exists even on freestanding compilers.
4447 # On the NeXT, cc -E runs the code through the compiler's parser,
4448 # not just through cpp. "Syntax error" is here to catch this case.
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450/* end confdefs.h. */
4451#ifdef __STDC__
4452# include <limits.h>
4453#else
4454# include <assert.h>
4455#endif
4456 Syntax error
4457_ACEOF
4458if ac_fn_c_try_cpp "$LINENO"; then :
4459
4460else
4461 # Broken: fails on valid input.
4462continue
4463fi
4464rm -f conftest.err conftest.i conftest.$ac_ext
4465
4466 # OK, works on sane cases. Now check whether nonexistent headers
4467 # can be detected and how.
4468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4469/* end confdefs.h. */
4470#include <ac_nonexistent.h>
4471_ACEOF
4472if ac_fn_c_try_cpp "$LINENO"; then :
4473 # Broken: success on invalid input.
4474continue
4475else
4476 # Passes both tests.
4477ac_preproc_ok=:
4478break
4479fi
4480rm -f conftest.err conftest.i conftest.$ac_ext
4481
4482done
4483# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4484rm -f conftest.i conftest.err conftest.$ac_ext
4485if $ac_preproc_ok; then :
4486
4487else
4488 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4489$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4490as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4491See \`config.log' for more details" "$LINENO" 5; }
4492fi
4493
4494ac_ext=c
4495ac_cpp='$CPP $CPPFLAGS'
4496ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4497ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4498ac_compiler_gnu=$ac_cv_c_compiler_gnu
4499
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4501$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4502if ${ac_cv_path_GREP+:} false; then :
4503 $as_echo_n "(cached) " >&6
4504else
4505 if test -z "$GREP"; then
4506 ac_path_GREP_found=false
4507 # Loop through the user's path and test for each of PROGNAME-LIST
4508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4510do
4511 IFS=$as_save_IFS
4512 test -z "$as_dir" && as_dir=.
4513 for ac_prog in grep ggrep; do
4514 for ac_exec_ext in '' $ac_executable_extensions; do
4515 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4516 as_fn_executable_p "$ac_path_GREP" || continue
4517# Check for GNU ac_path_GREP and select it if it is found.
4518 # Check for GNU $ac_path_GREP
4519case `"$ac_path_GREP" --version 2>&1` in
4520*GNU*)
4521 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4522*)
4523 ac_count=0
4524 $as_echo_n 0123456789 >"conftest.in"
4525 while :
4526 do
4527 cat "conftest.in" "conftest.in" >"conftest.tmp"
4528 mv "conftest.tmp" "conftest.in"
4529 cp "conftest.in" "conftest.nl"
4530 $as_echo 'GREP' >> "conftest.nl"
4531 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4532 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4533 as_fn_arith $ac_count + 1 && ac_count=$as_val
4534 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4535 # Best one so far, save it but keep looking for a better one
4536 ac_cv_path_GREP="$ac_path_GREP"
4537 ac_path_GREP_max=$ac_count
4538 fi
4539 # 10*(2^10) chars as input seems more than enough
4540 test $ac_count -gt 10 && break
4541 done
4542 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4543esac
4544
4545 $ac_path_GREP_found && break 3
4546 done
4547 done
4548 done
4549IFS=$as_save_IFS
4550 if test -z "$ac_cv_path_GREP"; then
4551 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4552 fi
4553else
4554 ac_cv_path_GREP=$GREP
4555fi
4556
4557fi
4558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4559$as_echo "$ac_cv_path_GREP" >&6; }
4560 GREP="$ac_cv_path_GREP"
4561
4562
Łukasz Langaa785c872016-09-09 17:37:37 -07004563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4564$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4565if ${ac_cv_path_SED+:} false; then :
4566 $as_echo_n "(cached) " >&6
4567else
4568 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4569 for ac_i in 1 2 3 4 5 6 7; do
4570 ac_script="$ac_script$as_nl$ac_script"
4571 done
4572 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4573 { ac_script=; unset ac_script;}
4574 if test -z "$SED"; then
4575 ac_path_SED_found=false
4576 # Loop through the user's path and test for each of PROGNAME-LIST
4577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578for as_dir in $PATH
4579do
4580 IFS=$as_save_IFS
4581 test -z "$as_dir" && as_dir=.
4582 for ac_prog in sed gsed; do
4583 for ac_exec_ext in '' $ac_executable_extensions; do
4584 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4585 as_fn_executable_p "$ac_path_SED" || continue
4586# Check for GNU ac_path_SED and select it if it is found.
4587 # Check for GNU $ac_path_SED
4588case `"$ac_path_SED" --version 2>&1` in
4589*GNU*)
4590 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4591*)
4592 ac_count=0
4593 $as_echo_n 0123456789 >"conftest.in"
4594 while :
4595 do
4596 cat "conftest.in" "conftest.in" >"conftest.tmp"
4597 mv "conftest.tmp" "conftest.in"
4598 cp "conftest.in" "conftest.nl"
4599 $as_echo '' >> "conftest.nl"
4600 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4601 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4602 as_fn_arith $ac_count + 1 && ac_count=$as_val
4603 if test $ac_count -gt ${ac_path_SED_max-0}; then
4604 # Best one so far, save it but keep looking for a better one
4605 ac_cv_path_SED="$ac_path_SED"
4606 ac_path_SED_max=$ac_count
4607 fi
4608 # 10*(2^10) chars as input seems more than enough
4609 test $ac_count -gt 10 && break
4610 done
4611 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4612esac
4613
4614 $ac_path_SED_found && break 3
4615 done
4616 done
4617 done
4618IFS=$as_save_IFS
4619 if test -z "$ac_cv_path_SED"; then
4620 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4621 fi
4622else
4623 ac_cv_path_SED=$SED
4624fi
4625
4626fi
4627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4628$as_echo "$ac_cv_path_SED" >&6; }
4629 SED="$ac_cv_path_SED"
4630 rm -f conftest.sed
4631
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004632
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004633
4634
Matthias Kloseb9621712010-04-24 17:59:49 +00004635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4636$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004638# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004639if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004640 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004641
4642 case $withval in
4643 no) with_cxx_main=no
4644 MAINCC='$(CC)';;
4645 yes) with_cxx_main=yes
4646 MAINCC='$(CXX)';;
4647 *) with_cxx_main=yes
4648 MAINCC=$withval
4649 if test -z "$CXX"
4650 then
4651 CXX=$withval
4652 fi;;
4653 esac
4654else
4655
4656 with_cxx_main=no
4657 MAINCC='$(CC)'
4658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004659fi
4660
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4662$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
4664preset_cxx="$CXX"
4665if test -z "$CXX"
4666then
4667 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004668 gcc) if test -n "$ac_tool_prefix"; then
4669 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4670set dummy ${ac_tool_prefix}g++; ac_word=$2
4671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672$as_echo_n "checking for $ac_word... " >&6; }
4673if ${ac_cv_path_CXX+:} false; then :
4674 $as_echo_n "(cached) " >&6
4675else
4676 case $CXX in
4677 [\\/]* | ?:[\\/]*)
4678 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4679 ;;
4680 *)
4681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682for as_dir in notfound
4683do
4684 IFS=$as_save_IFS
4685 test -z "$as_dir" && as_dir=.
4686 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4690 break 2
4691 fi
4692done
4693 done
4694IFS=$as_save_IFS
4695
4696 ;;
4697esac
4698fi
4699CXX=$ac_cv_path_CXX
4700if test -n "$CXX"; then
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4702$as_echo "$CXX" >&6; }
4703else
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4705$as_echo "no" >&6; }
4706fi
4707
4708
4709fi
4710if test -z "$ac_cv_path_CXX"; then
4711 ac_pt_CXX=$CXX
4712 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004713set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004716if ${ac_cv_path_ac_pt_CXX+:} false; then :
4717 $as_echo_n "(cached) " >&6
4718else
4719 case $ac_pt_CXX in
4720 [\\/]* | ?:[\\/]*)
4721 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4722 ;;
4723 *)
4724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725for as_dir in notfound
4726do
4727 IFS=$as_save_IFS
4728 test -z "$as_dir" && as_dir=.
4729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004731 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733 break 2
4734 fi
4735done
4736 done
4737IFS=$as_save_IFS
4738
4739 ;;
4740esac
4741fi
4742ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4743if test -n "$ac_pt_CXX"; then
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4745$as_echo "$ac_pt_CXX" >&6; }
4746else
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4748$as_echo "no" >&6; }
4749fi
4750
4751 if test "x$ac_pt_CXX" = x; then
4752 CXX="g++"
4753 else
4754 case $cross_compiling:$ac_tool_warned in
4755yes:)
4756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4758ac_tool_warned=yes ;;
4759esac
4760 CXX=$ac_pt_CXX
4761 fi
4762else
4763 CXX="$ac_cv_path_CXX"
4764fi
4765 ;;
4766 cc) if test -n "$ac_tool_prefix"; then
4767 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4768set dummy ${ac_tool_prefix}c++; ac_word=$2
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4770$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004771if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004772 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004773else
4774 case $CXX in
4775 [\\/]* | ?:[\\/]*)
4776 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4777 ;;
4778 *)
4779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780for as_dir in notfound
4781do
4782 IFS=$as_save_IFS
4783 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788 break 2
4789 fi
4790done
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004792IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 ;;
4795esac
4796fi
4797CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004798if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4800$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004801else
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4803$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004805
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004806
4807fi
4808if test -z "$ac_cv_path_CXX"; then
4809 ac_pt_CXX=$CXX
4810 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4813$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004815 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004817 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004819 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 +00004820 ;;
4821 *)
4822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4823for as_dir in notfound
4824do
4825 IFS=$as_save_IFS
4826 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831 break 2
4832 fi
4833done
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004835IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837 ;;
4838esac
4839fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4841if test -n "$ac_pt_CXX"; then
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4843$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004844else
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4846$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004848
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004849 if test "x$ac_pt_CXX" = x; then
4850 CXX="c++"
4851 else
4852 case $cross_compiling:$ac_tool_warned in
4853yes:)
4854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4856ac_tool_warned=yes ;;
4857esac
4858 CXX=$ac_pt_CXX
4859 fi
4860else
4861 CXX="$ac_cv_path_CXX"
4862fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004864 clang|*/clang) if test -n "$ac_tool_prefix"; then
4865 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4866set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4868$as_echo_n "checking for $ac_word... " >&6; }
4869if ${ac_cv_path_CXX+:} false; then :
4870 $as_echo_n "(cached) " >&6
4871else
4872 case $CXX in
4873 [\\/]* | ?:[\\/]*)
4874 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4875 ;;
4876 *)
4877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878for as_dir in notfound
4879do
4880 IFS=$as_save_IFS
4881 test -z "$as_dir" && as_dir=.
4882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004884 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886 break 2
4887 fi
4888done
4889 done
4890IFS=$as_save_IFS
4891
Ned Deilycbfb9a52012-06-23 16:02:19 -07004892 ;;
4893esac
4894fi
4895CXX=$ac_cv_path_CXX
4896if test -n "$CXX"; then
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4898$as_echo "$CXX" >&6; }
4899else
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901$as_echo "no" >&6; }
4902fi
4903
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004904
4905fi
4906if test -z "$ac_cv_path_CXX"; then
4907 ac_pt_CXX=$CXX
4908 # Extract the first word of "clang++", so it can be a program name with args.
4909set dummy clang++; ac_word=$2
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4911$as_echo_n "checking for $ac_word... " >&6; }
4912if ${ac_cv_path_ac_pt_CXX+:} false; then :
4913 $as_echo_n "(cached) " >&6
4914else
4915 case $ac_pt_CXX in
4916 [\\/]* | ?:[\\/]*)
4917 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4918 ;;
4919 *)
4920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921for as_dir in notfound
4922do
4923 IFS=$as_save_IFS
4924 test -z "$as_dir" && as_dir=.
4925 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004927 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4929 break 2
4930 fi
4931done
4932 done
4933IFS=$as_save_IFS
4934
4935 ;;
4936esac
4937fi
4938ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4939if test -n "$ac_pt_CXX"; then
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4941$as_echo "$ac_pt_CXX" >&6; }
4942else
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944$as_echo "no" >&6; }
4945fi
4946
4947 if test "x$ac_pt_CXX" = x; then
4948 CXX="clang++"
4949 else
4950 case $cross_compiling:$ac_tool_warned in
4951yes:)
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4953$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4954ac_tool_warned=yes ;;
4955esac
4956 CXX=$ac_pt_CXX
4957 fi
4958else
4959 CXX="$ac_cv_path_CXX"
4960fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004961 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004962 icc|*/icc) if test -n "$ac_tool_prefix"; then
4963 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4964set dummy ${ac_tool_prefix}icpc; ac_word=$2
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4966$as_echo_n "checking for $ac_word... " >&6; }
4967if ${ac_cv_path_CXX+:} false; then :
4968 $as_echo_n "(cached) " >&6
4969else
4970 case $CXX in
4971 [\\/]* | ?:[\\/]*)
4972 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4973 ;;
4974 *)
4975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4976for as_dir in notfound
4977do
4978 IFS=$as_save_IFS
4979 test -z "$as_dir" && as_dir=.
4980 for ac_exec_ext in '' $ac_executable_extensions; do
4981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4982 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4984 break 2
4985 fi
4986done
4987 done
4988IFS=$as_save_IFS
4989
4990 ;;
4991esac
4992fi
4993CXX=$ac_cv_path_CXX
4994if test -n "$CXX"; then
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4996$as_echo "$CXX" >&6; }
4997else
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999$as_echo "no" >&6; }
5000fi
5001
5002
5003fi
5004if test -z "$ac_cv_path_CXX"; then
5005 ac_pt_CXX=$CXX
5006 # Extract the first word of "icpc", so it can be a program name with args.
5007set dummy icpc; ac_word=$2
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
5010if ${ac_cv_path_ac_pt_CXX+:} false; then :
5011 $as_echo_n "(cached) " >&6
5012else
5013 case $ac_pt_CXX in
5014 [\\/]* | ?:[\\/]*)
5015 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5016 ;;
5017 *)
5018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019for as_dir in notfound
5020do
5021 IFS=$as_save_IFS
5022 test -z "$as_dir" && as_dir=.
5023 for ac_exec_ext in '' $ac_executable_extensions; do
5024 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5025 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5027 break 2
5028 fi
5029done
5030 done
5031IFS=$as_save_IFS
5032
5033 ;;
5034esac
5035fi
5036ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5037if test -n "$ac_pt_CXX"; then
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5039$as_echo "$ac_pt_CXX" >&6; }
5040else
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
5043fi
5044
5045 if test "x$ac_pt_CXX" = x; then
5046 CXX="icpc"
5047 else
5048 case $cross_compiling:$ac_tool_warned in
5049yes:)
5050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5052ac_tool_warned=yes ;;
5053esac
5054 CXX=$ac_pt_CXX
5055 fi
5056else
5057 CXX="$ac_cv_path_CXX"
5058fi
5059 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060 esac
5061 if test "$CXX" = "notfound"
5062 then
5063 CXX=""
5064 fi
5065fi
5066if test -z "$CXX"
5067then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005068 if test -n "$ac_tool_prefix"; then
5069 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5070 do
5071 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5074$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005075if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005077else
5078 if test -n "$CXX"; then
5079 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5080else
5081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5082for as_dir in $PATH
5083do
5084 IFS=$as_save_IFS
5085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005088 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090 break 2
5091 fi
5092done
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095
5096fi
5097fi
5098CXX=$ac_cv_prog_CXX
5099if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5101$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102else
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5104$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005105fi
5106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005107
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005108 test -n "$CXX" && break
5109 done
5110fi
5111if test -z "$CXX"; then
5112 ac_ct_CXX=$CXX
5113 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5114do
5115 # Extract the first word of "$ac_prog", so it can be a program name with args.
5116set dummy $ac_prog; ac_word=$2
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5118$as_echo_n "checking for $ac_word... " >&6; }
5119if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5120 $as_echo_n "(cached) " >&6
5121else
5122 if test -n "$ac_ct_CXX"; then
5123 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5124else
5125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5126for as_dir in $PATH
5127do
5128 IFS=$as_save_IFS
5129 test -z "$as_dir" && as_dir=.
5130 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005132 ac_cv_prog_ac_ct_CXX="$ac_prog"
5133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5134 break 2
5135 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005136done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005137 done
5138IFS=$as_save_IFS
5139
5140fi
5141fi
5142ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5143if test -n "$ac_ct_CXX"; then
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5145$as_echo "$ac_ct_CXX" >&6; }
5146else
5147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5148$as_echo "no" >&6; }
5149fi
5150
5151
5152 test -n "$ac_ct_CXX" && break
5153done
5154
5155 if test "x$ac_ct_CXX" = x; then
5156 CXX="notfound"
5157 else
5158 case $cross_compiling:$ac_tool_warned in
5159yes:)
5160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5162ac_tool_warned=yes ;;
5163esac
5164 CXX=$ac_ct_CXX
5165 fi
5166fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167
5168 if test "$CXX" = "notfound"
5169 then
5170 CXX=""
5171 fi
5172fi
5173if test "$preset_cxx" != "$CXX"
5174then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005175 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005176
5177 By default, distutils will build C++ extension modules with \"$CXX\".
5178 If this is not intended, then set CXX on the configure command line.
5179 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005180$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005181
5182 By default, distutils will build C++ extension modules with \"$CXX\".
5183 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005184 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185fi
5186
5187
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005188MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5189
5190
5191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5192$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5193cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005194#undef bfin
5195#undef cris
5196#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005197#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005198#undef hppa
5199#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005200#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005201#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005202#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005203#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005205#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005206 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005207#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208# if defined(__x86_64__) && defined(__LP64__)
5209 x86_64-linux-gnu
5210# elif defined(__x86_64__) && defined(__ILP32__)
5211 x86_64-linux-gnux32
5212# elif defined(__i386__)
5213 i386-linux-gnu
5214# elif defined(__aarch64__) && defined(__AARCH64EL__)
5215# if defined(__ILP32__)
5216 aarch64_ilp32-linux-gnu
5217# else
5218 aarch64-linux-gnu
5219# endif
5220# elif defined(__aarch64__) && defined(__AARCH64EB__)
5221# if defined(__ILP32__)
5222 aarch64_be_ilp32-linux-gnu
5223# else
5224 aarch64_be-linux-gnu
5225# endif
5226# elif defined(__alpha__)
5227 alpha-linux-gnu
5228# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5229# if defined(__ARMEL__)
5230 arm-linux-gnueabihf
5231# else
5232 armeb-linux-gnueabihf
5233# endif
5234# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5235# if defined(__ARMEL__)
5236 arm-linux-gnueabi
5237# else
5238 armeb-linux-gnueabi
5239# endif
5240# elif defined(__hppa__)
5241 hppa-linux-gnu
5242# elif defined(__ia64__)
5243 ia64-linux-gnu
5244# elif defined(__m68k__) && !defined(__mcoldfire__)
5245 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005246# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5247# if _MIPS_SIM == _ABIO32
5248 mipsisa32r6el-linux-gnu
5249# elif _MIPS_SIM == _ABIN32
5250 mipsisa64r6el-linux-gnuabin32
5251# elif _MIPS_SIM == _ABI64
5252 mipsisa64r6el-linux-gnuabi64
5253# else
5254# error unknown platform triplet
5255# endif
5256# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5257# if _MIPS_SIM == _ABIO32
5258 mipsisa32r6-linux-gnu
5259# elif _MIPS_SIM == _ABIN32
5260 mipsisa64r6-linux-gnuabin32
5261# elif _MIPS_SIM == _ABI64
5262 mipsisa64r6-linux-gnuabi64
5263# else
5264# error unknown platform triplet
5265# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005266# elif defined(__mips_hard_float) && defined(_MIPSEL)
5267# if _MIPS_SIM == _ABIO32
5268 mipsel-linux-gnu
5269# elif _MIPS_SIM == _ABIN32
5270 mips64el-linux-gnuabin32
5271# elif _MIPS_SIM == _ABI64
5272 mips64el-linux-gnuabi64
5273# else
5274# error unknown platform triplet
5275# endif
5276# elif defined(__mips_hard_float)
5277# if _MIPS_SIM == _ABIO32
5278 mips-linux-gnu
5279# elif _MIPS_SIM == _ABIN32
5280 mips64-linux-gnuabin32
5281# elif _MIPS_SIM == _ABI64
5282 mips64-linux-gnuabi64
5283# else
5284# error unknown platform triplet
5285# endif
5286# elif defined(__or1k__)
5287 or1k-linux-gnu
5288# elif defined(__powerpc__) && defined(__SPE__)
5289 powerpc-linux-gnuspe
5290# elif defined(__powerpc64__)
5291# if defined(__LITTLE_ENDIAN__)
5292 powerpc64le-linux-gnu
5293# else
5294 powerpc64-linux-gnu
5295# endif
5296# elif defined(__powerpc__)
5297 powerpc-linux-gnu
5298# elif defined(__s390x__)
5299 s390x-linux-gnu
5300# elif defined(__s390__)
5301 s390-linux-gnu
5302# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5303 sh4-linux-gnu
5304# elif defined(__sparc__) && defined(__arch64__)
5305 sparc64-linux-gnu
5306# elif defined(__sparc__)
5307 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005308# elif defined(__riscv)
5309# if __riscv_xlen == 32
5310 riscv32-linux-gnu
5311# elif __riscv_xlen == 64
5312 riscv64-linux-gnu
5313# else
5314# error unknown platform triplet
5315# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005316# else
5317# error unknown platform triplet
5318# endif
5319#elif defined(__FreeBSD_kernel__)
5320# if defined(__LP64__)
5321 x86_64-kfreebsd-gnu
5322# elif defined(__i386__)
5323 i386-kfreebsd-gnu
5324# else
5325# error unknown platform triplet
5326# endif
5327#elif defined(__gnu_hurd__)
5328 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005329#elif defined(__APPLE__)
5330 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005331#elif defined(__VXWORKS__)
5332 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005333#else
5334# error unknown platform triplet
5335#endif
5336
5337EOF
5338
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005339if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005340 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5342$as_echo "$PLATFORM_TRIPLET" >&6; }
5343else
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5345$as_echo "none" >&6; }
5346fi
5347rm -f conftest.c conftest.out
5348
5349if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5350 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5351 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5352 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005353elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5354 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005355fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005356
doko@ubuntu.com55532312016-06-14 08:55:19 +02005357if test x$MULTIARCH != x; then
5358 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5359fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005360
5361
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5363$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5364save_LDFLAGS="$LDFLAGS"
5365LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005366
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5368/* end confdefs.h. */
5369
5370int
5371main ()
5372{
5373
5374 ;
5375 return 0;
5376}
5377_ACEOF
5378if ac_fn_c_try_link "$LINENO"; then :
5379 NO_AS_NEEDED="-Wl,--no-as-needed"
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5381$as_echo "yes" >&6; }
5382else
5383 NO_AS_NEEDED=""
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5385$as_echo "no" >&6; }
5386fi
5387rm -f core conftest.err conftest.$ac_objext \
5388 conftest$ac_exeext conftest.$ac_ext
5389LDFLAGS="$save_LDFLAGS"
5390
5391
5392
5393# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394
Matthias Kloseb9621712010-04-24 17:59:49 +00005395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5396$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005397if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399else
5400 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5401 then ac_cv_path_EGREP="$GREP -E"
5402 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 # Loop through the user's path and test for each of PROGNAME-LIST
5406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5408do
5409 IFS=$as_save_IFS
5410 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 for ac_prog in egrep; do
5412 for ac_exec_ext in '' $ac_executable_extensions; do
5413 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005414 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005415# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416 # Check for GNU $ac_path_EGREP
5417case `"$ac_path_EGREP" --version 2>&1` in
5418*GNU*)
5419 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5420*)
5421 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 while :
5424 do
5425 cat "conftest.in" "conftest.in" >"conftest.tmp"
5426 mv "conftest.tmp" "conftest.in"
5427 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5430 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5433 # Best one so far, save it but keep looking for a better one
5434 ac_cv_path_EGREP="$ac_path_EGREP"
5435 ac_path_EGREP_max=$ac_count
5436 fi
5437 # 10*(2^10) chars as input seems more than enough
5438 test $ac_count -gt 10 && break
5439 done
5440 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5441esac
5442
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 $ac_path_EGREP_found && break 3
5444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005449 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 +00005450 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451else
5452 ac_cv_path_EGREP=$EGREP
5453fi
5454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455 fi
5456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5458$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005460
5461
Matthias Kloseb9621712010-04-24 17:59:49 +00005462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5463$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005464if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 $as_echo_n "(cached) " >&6
5466else
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005468/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005469#include <stdlib.h>
5470#include <stdarg.h>
5471#include <string.h>
5472#include <float.h>
5473
5474int
5475main ()
5476{
5477
5478 ;
5479 return 0;
5480}
5481_ACEOF
5482if ac_fn_c_try_compile "$LINENO"; then :
5483 ac_cv_header_stdc=yes
5484else
5485 ac_cv_header_stdc=no
5486fi
5487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5488
5489if test $ac_cv_header_stdc = yes; then
5490 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5492/* end confdefs.h. */
5493#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005494
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005495_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005499else
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005501fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005502rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503
Matthias Kloseb9621712010-04-24 17:59:49 +00005504fi
5505
5506if test $ac_cv_header_stdc = yes; then
5507 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5509/* end confdefs.h. */
5510#include <stdlib.h>
5511
5512_ACEOF
5513if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5514 $EGREP "free" >/dev/null 2>&1; then :
5515
5516else
5517 ac_cv_header_stdc=no
5518fi
5519rm -f conftest*
5520
5521fi
5522
5523if test $ac_cv_header_stdc = yes; then
5524 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5525 if test "$cross_compiling" = yes; then :
5526 :
5527else
5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5529/* end confdefs.h. */
5530#include <ctype.h>
5531#include <stdlib.h>
5532#if ((' ' & 0x0FF) == 0x020)
5533# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5534# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5535#else
5536# define ISLOWER(c) \
5537 (('a' <= (c) && (c) <= 'i') \
5538 || ('j' <= (c) && (c) <= 'r') \
5539 || ('s' <= (c) && (c) <= 'z'))
5540# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5541#endif
5542
5543#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5544int
5545main ()
5546{
5547 int i;
5548 for (i = 0; i < 256; i++)
5549 if (XOR (islower (i), ISLOWER (i))
5550 || toupper (i) != TOUPPER (i))
5551 return 2;
5552 return 0;
5553}
5554_ACEOF
5555if ac_fn_c_try_run "$LINENO"; then :
5556
5557else
5558 ac_cv_header_stdc=no
5559fi
5560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5561 conftest.$ac_objext conftest.beam conftest.$ac_ext
5562fi
5563
5564fi
5565fi
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5567$as_echo "$ac_cv_header_stdc" >&6; }
5568if test $ac_cv_header_stdc = yes; then
5569
5570$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5571
5572fi
5573
5574# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5575for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5576 inttypes.h stdint.h unistd.h
5577do :
5578 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5579ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5580"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005581if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005582 cat >>confdefs.h <<_ACEOF
5583#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5584_ACEOF
5585
5586fi
5587
5588done
5589
5590
5591
5592 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 +02005593if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005594 MINIX=yes
5595else
5596 MINIX=
5597fi
5598
5599
5600 if test "$MINIX" = yes; then
5601
5602$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5603
5604
5605$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5606
5607
5608$as_echo "#define _MINIX 1" >>confdefs.h
5609
5610 fi
5611
5612
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5614$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005615if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005616 $as_echo_n "(cached) " >&6
5617else
5618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5619/* end confdefs.h. */
5620
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005621# define __EXTENSIONS__ 1
5622 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005623int
5624main ()
5625{
5626
5627 ;
5628 return 0;
5629}
5630_ACEOF
5631if ac_fn_c_try_compile "$LINENO"; then :
5632 ac_cv_safe_to_define___extensions__=yes
5633else
5634 ac_cv_safe_to_define___extensions__=no
5635fi
5636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5637fi
5638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5639$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5640 test $ac_cv_safe_to_define___extensions__ = yes &&
5641 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5642
5643 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5644
5645 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5646
5647 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5648
5649 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5650
5651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652
Xavier de Gaye95750b12016-07-09 11:05:42 +02005653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5654$as_echo_n "checking for the Android API level... " >&6; }
5655cat >> conftest.c <<EOF
5656#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005657android_api = __ANDROID_API__
5658arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659#else
5660#error not Android
5661#endif
5662EOF
5663
5664if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005665 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5666 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5668$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005669 if test -z "$ANDROID_API_LEVEL"; then
5670 echo 'Fatal: you must define __ANDROID_API__'
5671 exit 1
5672 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005673
5674cat >>confdefs.h <<_ACEOF
5675#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5676_ACEOF
5677
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005678
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5680$as_echo_n "checking for the Android arm ABI... " >&6; }
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5682$as_echo "$_arm_arch" >&6; }
5683 if test "$_arm_arch" = 7; then
5684 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5685 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5686 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005687else
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5689$as_echo "not Android" >&6; }
5690fi
5691rm -f conftest.c conftest.out
5692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693# Check for unsupported systems
5694case $ac_sys_system/$ac_sys_release in
5695atheos*|Linux*/1*)
5696 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5697 echo See README for details.
5698 exit 1;;
5699esac
5700
5701
Matthias Kloseb9621712010-04-24 17:59:49 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5703$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704
5705# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005706if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 withval=$with_suffix;
5708 case $withval in
5709 no) EXEEXT=;;
5710 yes) EXEEXT=.exe;;
5711 *) EXEEXT=$withval;;
5712 esac
5713fi
5714
Matthias Kloseb9621712010-04-24 17:59:49 +00005715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5716$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
5718# Test whether we're running on a non-case-sensitive system, in which
5719# case we give a warning if no ext is given
5720
Matthias Kloseb9621712010-04-24 17:59:49 +00005721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5722$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723if test ! -d CaseSensitiveTestDir; then
5724mkdir CaseSensitiveTestDir
5725fi
5726
5727if test -d casesensitivetestdir
5728then
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5730$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731 BUILDEXEEXT=.exe
5732else
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735 BUILDEXEEXT=$EXEEXT
5736fi
5737rmdir CaseSensitiveTestDir
5738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739case $ac_sys_system in
5740hp*|HP*)
5741 case $CC in
5742 cc|*/cc) CC="$CC -Ae";;
5743 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744esac
5745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
Matthias Kloseb9621712010-04-24 17:59:49 +00005747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5748$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749if test -z "$LIBRARY"
5750then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005751 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5754$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755
5756# LDLIBRARY is the name of the library to link against (as opposed to the
5757# name of the library into which to insert object files). BLDLIBRARY is also
5758# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5759# is blank as the main program is not linked directly against LDLIBRARY.
5760# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5761# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5762# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5763# DLLLIBRARY is the shared (i.e., DLL) library.
5764#
5765# RUNSHARED is used to run shared python without installed libraries
5766#
5767# INSTSONAME is the name of the shared library that will be use to install
5768# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005769#
5770# LDVERSION is the shared library version number, normally the Python version
5771# with the ABI build flags appended.
5772
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773
5774
5775
5776
5777
5778
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780LDLIBRARY="$LIBRARY"
5781BLDLIBRARY='$(LDLIBRARY)'
5782INSTSONAME='$(LDLIBRARY)'
5783DLLLIBRARY=''
5784LDLIBRARYDIR=''
5785RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005786LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787
5788# LINKCC is the command that links the python executable -- default is $(CC).
5789# If CXX is set, and if it is needed to link a main function that was
5790# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5791# python might then depend on the C++ runtime
5792# This is altered for AIX in order to build the export list before
5793# linking.
5794
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5796$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797if test -z "$LINKCC"
5798then
5799 LINKCC='$(PURIFY) $(MAINCC)'
5800 case $ac_sys_system in
5801 AIX*)
5802 exp_extra="\"\""
5803 if test $ac_sys_release -ge 5 -o \
5804 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5805 exp_extra="."
5806 fi
5807 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808 QNX*)
5809 # qcc must be used because the other compilers do not
5810 # support -N.
5811 LINKCC=qcc;;
5812 esac
5813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5815$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816
5817# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5818# make sure we default having it set to "no": this is used by
5819# distutils.unixccompiler to know if it should add --enable-new-dtags
5820# to linker command lines, and failing to detect GNU ld simply results
5821# in the same bahaviour as before.
5822
Matthias Kloseb9621712010-04-24 17:59:49 +00005823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5824$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825ac_prog=ld
5826if test "$GCC" = yes; then
5827 ac_prog=`$CC -print-prog-name=ld`
5828fi
5829case `"$ac_prog" -V 2>&1 < /dev/null` in
5830 *GNU*)
5831 GNULD=yes;;
5832 *)
5833 GNULD=no;;
5834esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5836$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837
Matthias Kloseb9621712010-04-24 17:59:49 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5839$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005841if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842 enableval=$enable_shared;
5843fi
5844
5845
5846if test -z "$enable_shared"
5847then
5848 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005849 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850 enable_shared="yes";;
5851 *)
5852 enable_shared="no";;
5853 esac
5854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5856$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5859$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005861if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005862 enableval=$enable_profiling;
5863fi
5864
5865if test "x$enable_profiling" = xyes; then
5866 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005867 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869/* end confdefs.h. */
5870int main() { return 0; }
5871_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005872if ac_fn_c_try_link "$LINENO"; then :
5873
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005875 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005877rm -f core conftest.err conftest.$ac_objext \
5878 conftest$ac_exeext conftest.$ac_ext
5879 CC="$ac_save_cc"
5880else
5881 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5884$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885
doko@ubuntu.comba015832012-06-30 16:52:05 +02005886if test "x$enable_profiling" = xyes; then
5887 BASECFLAGS="-pg $BASECFLAGS"
5888 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889fi
5890
Matthias Kloseb9621712010-04-24 17:59:49 +00005891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5892$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893
5894# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5895# library that we build, but we do not want to link against it (we
5896# will find it with a -framework option). For this reason there is an
5897# extra variable BLDLIBRARY against which Python and the extension
5898# modules are linked, BLDLIBRARY. This is normally the same as
5899# LDLIBRARY, but empty for MacOSX framework builds.
5900if test "$enable_framework"
5901then
5902 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005903 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 BLDLIBRARY=''
5905else
5906 BLDLIBRARY='$(LDLIBRARY)'
5907fi
5908
5909# Other platforms follow
5910if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005911 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912
Matthias Kloseb9621712010-04-24 17:59:49 +00005913$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914
5915 case $ac_sys_system in
5916 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).dll.a'
5918 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 ;;
5920 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 LDLIBRARY='libpython$(LDVERSION).so'
5922 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005923 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005925 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005926 then
5927 PY3LIBRARY=libpython3.so
5928 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005930 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005931 LDLIBRARY='libpython$(LDVERSION).so'
5932 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005933 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005935 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005936 then
5937 PY3LIBRARY=libpython3.so
5938 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ;;
5940 hp*|HP*)
5941 case `uname -m` in
5942 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005943 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
5945 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ;;
5948 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005950 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005953 LDLIBRARY='libpython$(LDVERSION).dylib'
5954 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005955 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005957 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005959 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005960 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961
5962 esac
5963else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005964 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 case $ac_sys_system in
5966 CYGWIN*)
5967 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 ;;
5970 esac
5971fi
5972
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005973if test "$cross_compiling" = yes; then
5974 RUNSHARED=
5975fi
5976
Matthias Kloseb9621712010-04-24 17:59:49 +00005977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5978$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005981if test -n "$ac_tool_prefix"; then
5982 for ac_prog in ar aal
5983 do
5984 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5985set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005988if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990else
5991 if test -n "$AR"; then
5992 ac_cv_prog_AR="$AR" # Let the user override the test.
5993else
5994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997 IFS=$as_save_IFS
5998 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006001 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003 break 2
6004 fi
6005done
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007IFS=$as_save_IFS
6008
6009fi
6010fi
6011AR=$ac_cv_prog_AR
6012if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6014$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015else
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018fi
6019
6020
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006021 test -n "$AR" && break
6022 done
6023fi
6024if test -z "$AR"; then
6025 ac_ct_AR=$AR
6026 for ac_prog in ar aal
6027do
6028 # Extract the first word of "$ac_prog", so it can be a program name with args.
6029set dummy $ac_prog; ac_word=$2
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
6032if ${ac_cv_prog_ac_ct_AR+:} false; then :
6033 $as_echo_n "(cached) " >&6
6034else
6035 if test -n "$ac_ct_AR"; then
6036 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6037else
6038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6039for as_dir in $PATH
6040do
6041 IFS=$as_save_IFS
6042 test -z "$as_dir" && as_dir=.
6043 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006045 ac_cv_prog_ac_ct_AR="$ac_prog"
6046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6047 break 2
6048 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006050 done
6051IFS=$as_save_IFS
6052
6053fi
6054fi
6055ac_ct_AR=$ac_cv_prog_ac_ct_AR
6056if test -n "$ac_ct_AR"; then
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6058$as_echo "$ac_ct_AR" >&6; }
6059else
6060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6061$as_echo "no" >&6; }
6062fi
6063
6064
6065 test -n "$ac_ct_AR" && break
6066done
6067
6068 if test "x$ac_ct_AR" = x; then
6069 AR="ar"
6070 else
6071 case $cross_compiling:$ac_tool_warned in
6072yes:)
6073{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6074$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6075ac_tool_warned=yes ;;
6076esac
6077 AR=$ac_ct_AR
6078 fi
6079fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080
6081
6082# tweak ARFLAGS only if the user didn't set it on the command line
6083
6084if test -z "$ARFLAGS"
6085then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006086 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087fi
6088
doko@ubuntu.com58844492012-06-30 18:25:32 +02006089if test -n "$ac_tool_prefix"; then
6090 for ac_prog in readelf
6091 do
6092 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6093set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6095$as_echo_n "checking for $ac_word... " >&6; }
6096if ${ac_cv_prog_READELF+:} false; then :
6097 $as_echo_n "(cached) " >&6
6098else
6099 if test -n "$READELF"; then
6100 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6101else
6102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6103for as_dir in $PATH
6104do
6105 IFS=$as_save_IFS
6106 test -z "$as_dir" && as_dir=.
6107 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006109 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6111 break 2
6112 fi
6113done
6114 done
6115IFS=$as_save_IFS
6116
6117fi
6118fi
6119READELF=$ac_cv_prog_READELF
6120if test -n "$READELF"; then
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6122$as_echo "$READELF" >&6; }
6123else
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6125$as_echo "no" >&6; }
6126fi
6127
6128
6129 test -n "$READELF" && break
6130 done
6131fi
6132if test -z "$READELF"; then
6133 ac_ct_READELF=$READELF
6134 for ac_prog in readelf
6135do
6136 # Extract the first word of "$ac_prog", so it can be a program name with args.
6137set dummy $ac_prog; ac_word=$2
6138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6139$as_echo_n "checking for $ac_word... " >&6; }
6140if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6141 $as_echo_n "(cached) " >&6
6142else
6143 if test -n "$ac_ct_READELF"; then
6144 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6145else
6146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6147for as_dir in $PATH
6148do
6149 IFS=$as_save_IFS
6150 test -z "$as_dir" && as_dir=.
6151 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006152 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006153 ac_cv_prog_ac_ct_READELF="$ac_prog"
6154 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6155 break 2
6156 fi
6157done
6158 done
6159IFS=$as_save_IFS
6160
6161fi
6162fi
6163ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6164if test -n "$ac_ct_READELF"; then
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6166$as_echo "$ac_ct_READELF" >&6; }
6167else
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6169$as_echo "no" >&6; }
6170fi
6171
6172
6173 test -n "$ac_ct_READELF" && break
6174done
6175
6176 if test "x$ac_ct_READELF" = x; then
6177 READELF=":"
6178 else
6179 case $cross_compiling:$ac_tool_warned in
6180yes:)
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6183ac_tool_warned=yes ;;
6184esac
6185 READELF=$ac_ct_READELF
6186 fi
6187fi
6188
6189if test "$cross_compiling" = yes; then
6190 case "$READELF" in
6191 readelf|:)
6192 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6193 ;;
6194 esac
6195fi
6196
6197
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006200hp*|HP*)
6201 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202 if test -z "$INSTALL"
6203 then
6204 INSTALL="${srcdir}/install-sh -c"
6205 fi
6206esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207# Find a good install program. We prefer a C program (faster),
6208# so one script is as good as another. But avoid the broken or
6209# incompatible versions:
6210# SysV /etc/install, /usr/sbin/install
6211# SunOS /usr/etc/install
6212# IRIX /sbin/install
6213# AIX /bin/install
6214# AmigaOS /C/install, which installs bootblocks on floppy discs
6215# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6216# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6217# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6218# OS/2's system install, which has a completely different semantic
6219# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006220# Reject install programs that cannot install multiple files.
6221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6222$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006224if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006225 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226else
6227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6228for as_dir in $PATH
6229do
6230 IFS=$as_save_IFS
6231 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006232 # Account for people who put trailing slashes in PATH elements.
6233case $as_dir/ in #((
6234 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006236 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237 /usr/ucb/* ) ;;
6238 *)
6239 # OSF1 and SCO ODT 3.0 have their own names for install.
6240 # Don't use installbsd from OSF since it installs stuff as root
6241 # by default.
6242 for ac_prog in ginstall scoinst install; do
6243 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006244 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006245 if test $ac_prog = install &&
6246 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6247 # AIX install. It has an incompatible calling convention.
6248 :
6249 elif test $ac_prog = install &&
6250 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6251 # program-specific install script used by HP pwplus--don't use.
6252 :
6253 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006254 rm -rf conftest.one conftest.two conftest.dir
6255 echo one > conftest.one
6256 echo two > conftest.two
6257 mkdir conftest.dir
6258 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6259 test -s conftest.one && test -s conftest.two &&
6260 test -s conftest.dir/conftest.one &&
6261 test -s conftest.dir/conftest.two
6262 then
6263 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6264 break 3
6265 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266 fi
6267 fi
6268 done
6269 done
6270 ;;
6271esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006272
6273 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274IFS=$as_save_IFS
6275
Matthias Kloseb9621712010-04-24 17:59:49 +00006276rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277
6278fi
6279 if test "${ac_cv_path_install+set}" = set; then
6280 INSTALL=$ac_cv_path_install
6281 else
6282 # As a last resort, use the slow shell script. Don't cache a
6283 # value for INSTALL within a source directory, because that will
6284 # break other packages using the cache if that directory is
6285 # removed, or if the value is a relative name.
6286 INSTALL=$ac_install_sh
6287 fi
6288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6290$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291
6292# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6293# It thinks the first close brace ends the variable substitution.
6294test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6295
6296test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6297
6298test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6299
Matthias Klose93a0ef12012-03-15 18:08:34 +01006300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6301$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6302if test -z "$MKDIR_P"; then
6303 if ${ac_cv_path_mkdir+:} false; then :
6304 $as_echo_n "(cached) " >&6
6305else
6306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6307for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6308do
6309 IFS=$as_save_IFS
6310 test -z "$as_dir" && as_dir=.
6311 for ac_prog in mkdir gmkdir; do
6312 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006313 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006314 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6315 'mkdir (GNU coreutils) '* | \
6316 'mkdir (coreutils) '* | \
6317 'mkdir (fileutils) '4.1*)
6318 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6319 break 3;;
6320 esac
6321 done
6322 done
6323 done
6324IFS=$as_save_IFS
6325
6326fi
6327
6328 test -d ./--version && rmdir ./--version
6329 if test "${ac_cv_path_mkdir+set}" = set; then
6330 MKDIR_P="$ac_cv_path_mkdir -p"
6331 else
6332 # As a last resort, use the slow shell script. Don't cache a
6333 # value for MKDIR_P within a source directory, because that will
6334 # break other packages using the cache if that directory is
6335 # removed, or if the value is a relative name.
6336 MKDIR_P="$ac_install_sh -d"
6337 fi
6338fi
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6340$as_echo "$MKDIR_P" >&6; }
6341
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342
6343# Not every filesystem supports hard links
6344
6345if test -z "$LN" ; then
6346 case $ac_sys_system in
6347 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348 *) LN=ln;;
6349 esac
6350fi
6351
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006352# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006353
6354ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006355
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006356# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6358$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359
6360# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006361if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362 withval=$with_pydebug;
6363if test "$withval" != no
6364then
6365
Matthias Kloseb9621712010-04-24 17:59:49 +00006366$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367
Matthias Kloseb9621712010-04-24 17:59:49 +00006368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6369$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006370 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006371 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006372else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6373$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374fi
6375else
Matthias Kloseb9621712010-04-24 17:59:49 +00006376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6377$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378fi
6379
6380
Victor Stinnerf4e47032019-04-25 00:56:28 +02006381# Check for --with-trace-refs
6382# --with-trace-refs
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6384$as_echo_n "checking for --with-trace-refs... " >&6; }
6385
6386# Check whether --with-trace-refs was given.
6387if test "${with_trace_refs+set}" = set; then :
6388 withval=$with_trace_refs;
6389else
6390 with_trace_refs=no
6391fi
6392
6393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6394$as_echo "$with_trace_refs" >&6; }
6395
6396if test "$with_trace_refs" = "yes"
6397then
6398
6399$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6400
6401fi
6402
6403# Check for --with-assertions.
6404# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006405assertions='false'
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6407$as_echo_n "checking for --with-assertions... " >&6; }
6408
6409# Check whether --with-assertions was given.
6410if test "${with_assertions+set}" = set; then :
6411 withval=$with_assertions;
6412if test "$withval" != no
6413then
6414 assertions='true'
6415fi
6416fi
6417
6418if test "$assertions" = 'true'; then
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6420$as_echo "yes" >&6; }
6421elif test "$Py_DEBUG" = 'true'; then
6422 assertions='true'
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6424$as_echo "implied by --with-pydebug" >&6; }
6425else
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6427$as_echo "no" >&6; }
6428fi
6429
Brett Cannon63d98bc2016-09-06 17:12:40 -07006430# Enable optimization flags
6431
6432
6433Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6435$as_echo_n "checking for --enable-optimizations... " >&6; }
6436# Check whether --enable-optimizations was given.
6437if test "${enable_optimizations+set}" = set; then :
6438 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006439if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006440then
6441 Py_OPT='true'
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6443$as_echo "yes" >&6; };
6444else
6445 Py_OPT='false'
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6447$as_echo "no" >&6; };
6448fi
6449else
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006455 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6456 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006457 # 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 +00006458 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006459 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006460 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006461 DEF_MAKE_RULE="build_all"
6462else
6463 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006464 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006465 DEF_MAKE_RULE="all"
6466fi
6467
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006468
6469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6470$as_echo_n "checking PROFILE_TASK... " >&6; }
6471if test -z "$PROFILE_TASK"
6472then
6473 PROFILE_TASK='-m test --pgo'
6474fi
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6476$as_echo "$PROFILE_TASK" >&6; }
6477
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006478# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6479# normal names in the default $PATH (ie: Ubuntu). They exist under the
6480# non-suffixed name in their versioned llvm directory.
6481
6482llvm_bin_dir=''
6483llvm_path="${PATH}"
6484if test "${CC}" = "clang"
6485then
6486 clang_bin=`which clang`
6487 # Some systems install clang elsewhere as a symlink to the real path
6488 # which is where the related llvm tools are located.
6489 if test -L "${clang_bin}"
6490 then
6491 clang_dir=`dirname "${clang_bin}"`
6492 clang_bin=`readlink "${clang_bin}"`
6493 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6494 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6495 fi
6496fi
6497
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006498# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6500$as_echo_n "checking for --with-lto... " >&6; }
6501
6502# Check whether --with-lto was given.
6503if test "${with_lto+set}" = set; then :
6504 withval=$with_lto;
6505if test "$withval" != no
6506then
6507 Py_LTO='true'
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6509$as_echo "yes" >&6; };
6510else
6511 Py_LTO='false'
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6513$as_echo "no" >&6; };
6514fi
6515else
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6517$as_echo "no" >&6; }
6518fi
6519
6520if test "$Py_LTO" = 'true' ; then
6521 case $CC in
6522 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006523
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006524 if test -n "$ac_tool_prefix"; then
6525 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6526set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6528$as_echo_n "checking for $ac_word... " >&6; }
6529if ${ac_cv_path_LLVM_AR+:} false; then :
6530 $as_echo_n "(cached) " >&6
6531else
6532 case $LLVM_AR in
6533 [\\/]* | ?:[\\/]*)
6534 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6535 ;;
6536 *)
6537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6538for as_dir in ${llvm_path}
6539do
6540 IFS=$as_save_IFS
6541 test -z "$as_dir" && as_dir=.
6542 for ac_exec_ext in '' $ac_executable_extensions; do
6543 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6544 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6546 break 2
6547 fi
6548done
6549 done
6550IFS=$as_save_IFS
6551
6552 ;;
6553esac
6554fi
6555LLVM_AR=$ac_cv_path_LLVM_AR
6556if test -n "$LLVM_AR"; then
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6558$as_echo "$LLVM_AR" >&6; }
6559else
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6561$as_echo "no" >&6; }
6562fi
6563
6564
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006565fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006566if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006567 ac_pt_LLVM_AR=$LLVM_AR
6568 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006569set dummy llvm-ar; ac_word=$2
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571$as_echo_n "checking for $ac_word... " >&6; }
6572if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6573 $as_echo_n "(cached) " >&6
6574else
6575 case $ac_pt_LLVM_AR in
6576 [\\/]* | ?:[\\/]*)
6577 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6578 ;;
6579 *)
6580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6581for as_dir in ${llvm_path}
6582do
6583 IFS=$as_save_IFS
6584 test -z "$as_dir" && as_dir=.
6585 for ac_exec_ext in '' $ac_executable_extensions; do
6586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6587 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6589 break 2
6590 fi
6591done
6592 done
6593IFS=$as_save_IFS
6594
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006595 ;;
6596esac
6597fi
6598ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6599if test -n "$ac_pt_LLVM_AR"; then
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6601$as_echo "$ac_pt_LLVM_AR" >&6; }
6602else
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006607 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006608 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006609 else
6610 case $cross_compiling:$ac_tool_warned in
6611yes:)
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6613$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6614ac_tool_warned=yes ;;
6615esac
6616 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006617 fi
6618else
6619 LLVM_AR="$ac_cv_path_LLVM_AR"
6620fi
6621
6622
6623 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6624 then
6625 LLVM_AR_FOUND="found"
6626 else
6627 LLVM_AR_FOUND="not-found"
6628 fi
6629 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6630 then
6631 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6632 if test -n "${found_llvm_ar}"
6633 then
6634 LLVM_AR='/usr/bin/xcrun llvm-ar'
6635 LLVM_AR_FOUND=found
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6637$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6638 fi
6639 fi
6640 if test $LLVM_AR_FOUND = not-found
6641 then
6642 LLVM_PROFR_ERR=yes
6643 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6644 else
6645 LLVM_AR_ERR=no
6646 fi
6647 AR="${LLVM_AR}"
6648 case $ac_sys_system in
6649 Darwin*)
6650 # Any changes made here should be reflected in the GCC+Darwin case below
6651 LTOFLAGS="-flto -Wl,-export_dynamic"
6652 ;;
6653 *)
6654 LTOFLAGS="-flto"
6655 ;;
6656 esac
6657 ;;
6658 *gcc*)
6659 case $ac_sys_system in
6660 Darwin*)
6661 LTOFLAGS="-flto -Wl,-export_dynamic"
6662 ;;
6663 *)
6664 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6665 ;;
6666 esac
6667 ;;
6668 esac
6669
6670 if test "$ac_cv_prog_cc_g" = "yes"
6671 then
6672 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6673 # to get debug symbols.
6674 LTOFLAGS="$LTOFLAGS -g"
6675 fi
6676
stratakisf92c7aa2018-12-04 15:54:01 +01006677 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006678 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006679fi
6680
6681# Enable PGO flags.
6682
6683
6684
6685
6686
6687
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006688if test -n "$ac_tool_prefix"; then
6689 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6690set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6692$as_echo_n "checking for $ac_word... " >&6; }
6693if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6694 $as_echo_n "(cached) " >&6
6695else
6696 case $LLVM_PROFDATA in
6697 [\\/]* | ?:[\\/]*)
6698 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6699 ;;
6700 *)
6701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6702for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006703do
6704 IFS=$as_save_IFS
6705 test -z "$as_dir" && as_dir=.
6706 for ac_exec_ext in '' $ac_executable_extensions; do
6707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006708 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6710 break 2
6711 fi
6712done
6713 done
6714IFS=$as_save_IFS
6715
Gregory P. Smith799520c2016-09-07 16:10:00 -07006716 ;;
6717esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006718fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006719LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6720if test -n "$LLVM_PROFDATA"; then
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6722$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006723else
6724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6725$as_echo "no" >&6; }
6726fi
6727
6728
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006729fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006730if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006731 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6732 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006733set dummy llvm-profdata; ac_word=$2
6734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6735$as_echo_n "checking for $ac_word... " >&6; }
6736if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6737 $as_echo_n "(cached) " >&6
6738else
6739 case $ac_pt_LLVM_PROFDATA in
6740 [\\/]* | ?:[\\/]*)
6741 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6742 ;;
6743 *)
6744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6745for as_dir in ${llvm_path}
6746do
6747 IFS=$as_save_IFS
6748 test -z "$as_dir" && as_dir=.
6749 for ac_exec_ext in '' $ac_executable_extensions; do
6750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6751 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6753 break 2
6754 fi
6755done
6756 done
6757IFS=$as_save_IFS
6758
Gregory P. Smith799520c2016-09-07 16:10:00 -07006759 ;;
6760esac
6761fi
6762ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6763if test -n "$ac_pt_LLVM_PROFDATA"; then
6764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6765$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6766else
6767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6768$as_echo "no" >&6; }
6769fi
6770
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006771 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006772 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006773 else
6774 case $cross_compiling:$ac_tool_warned in
6775yes:)
6776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6778ac_tool_warned=yes ;;
6779esac
6780 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006781 fi
6782else
6783 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6784fi
6785
6786
6787if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6788then
6789 LLVM_PROF_FOUND="found"
6790else
6791 LLVM_PROF_FOUND="not-found"
6792fi
6793if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6794then
6795 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6796 if test -n "${found_llvm_profdata}"
6797 then
6798 # llvm-profdata isn't directly in $PATH in some cases.
6799 # https://apple.stackexchange.com/questions/197053/
6800 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6801 LLVM_PROF_FOUND=found
6802 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6803$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6804 fi
6805fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006806LLVM_PROF_ERR=no
6807case $CC in
6808 *clang*)
6809 # Any changes made here should be reflected in the GCC+Darwin case below
6810 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6811 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006812 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006813 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6814 if test $LLVM_PROF_FOUND = not-found
6815 then
6816 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006817 if test "${REQUIRE_PGO}" = "yes"
6818 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006819 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 -07006820 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006821 fi
6822 ;;
6823 *gcc*)
6824 case $ac_sys_system in
6825 Darwin*)
6826 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6827 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006828 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006829 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006830 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006831 then
6832 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006833 if test "${REQUIRE_PGO}" = "yes"
6834 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006835 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 -07006836 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006837 fi
6838 ;;
6839 *)
6840 PGO_PROF_GEN_FLAG="-fprofile-generate"
6841 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6842 LLVM_PROF_MERGER="true"
6843 LLVM_PROF_FILE=""
6844 ;;
6845 esac
6846 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006847 *icc*)
6848 PGO_PROF_GEN_FLAG="-prof-gen"
6849 PGO_PROF_USE_FLAG="-prof-use"
6850 LLVM_PROF_MERGER="true"
6851 LLVM_PROF_FILE=""
6852 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006853esac
6854
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6856# merged with this chunk of code?
6857
6858# Optimizer/debugger flags
6859# ------------------------
6860# (The following bit of code is complicated enough - please keep things
6861# indented properly. Just pretend you're editing Python code. ;-)
6862
6863# There are two parallel sets of case statements below, one that checks to
6864# see if OPT was set and one that does BASECFLAGS setting based upon
6865# compiler and platform. BASECFLAGS tweaks need to be made even if the
6866# user set OPT.
6867
Victor Stinner23a683a2019-04-12 21:27:37 +02006868case $CC in
6869 *clang*)
6870 cc_is_clang=1
6871 ;;
6872 *)
6873 if $CC --version 2>&1 | grep -q clang
6874 then
6875 cc_is_clang=1
6876 else
6877 cc_is_clang=
6878 fi
6879esac
6880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006881# tweak OPT based on compiler and platform, only if the user didn't set
6882# it on the command line
6883
Victor Stinner9ed34a82017-05-02 22:35:58 +02006884
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006885if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006886then
6887 case $GCC in
6888 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6890 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6891 WRAP="-fwrapv"
6892 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006893
Victor Stinner35f3d242017-04-21 12:35:24 +02006894 if test -n "${cc_is_clang}"
6895 then
6896 # Clang also needs -fwrapv
6897 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006898 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6899 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006900 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006901 fi
6902
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903 case $ac_cv_prog_cc_g in
6904 yes)
6905 if test "$Py_DEBUG" = 'true' ; then
6906 # Optimization messes up debuggers, so turn it off for
6907 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006908 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006909 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006910 else
Victor Stinner28205b22017-04-21 11:24:34 +02006911 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006912 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006913 else
Victor Stinner28205b22017-04-21 11:24:34 +02006914 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915 fi
6916 ;;
6917 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006918 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919 ;;
6920 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922 case $ac_sys_system in
6923 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6924 ;;
6925 esac
6926 ;;
6927
6928 *)
6929 OPT="-O"
6930 ;;
6931 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932fi
6933
6934
6935
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006936
stratakiscf10a752018-12-19 18:19:01 +01006937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938# The -arch flags for universal builds on OSX
6939UNIVERSAL_ARCH_FLAGS=
6940
6941
6942# tweak BASECFLAGS based on compiler and platform
6943case $GCC in
6944yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006945 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006946
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6948$as_echo_n "checking for -Wextra... " >&6; }
6949 ac_save_cc="$CC"
6950 CC="$CC -Wextra -Werror"
6951 if ${ac_cv_extra_warnings+:} false; then :
6952 $as_echo_n "(cached) " >&6
6953else
6954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6955/* end confdefs.h. */
6956
6957
6958int
6959main ()
6960{
6961
6962 ;
6963 return 0;
6964}
6965
6966_ACEOF
6967if ac_fn_c_try_compile "$LINENO"; then :
6968
6969 ac_cv_extra_warnings=yes
6970
6971else
6972
6973 ac_cv_extra_warnings=no
6974
6975fi
6976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6977fi
6978
6979 CC="$ac_save_cc"
6980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6981$as_echo "$ac_cv_extra_warnings" >&6; }
6982
6983 if test $ac_cv_extra_warnings = yes
6984 then
6985 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6986 fi
6987
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988 # Python doesn't violate C99 aliasing rules, but older versions of
6989 # GCC produce warnings for legal Python code. Enable
6990 # -fno-strict-aliasing on versions of GCC that support but produce
6991 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6993$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994 ac_save_cc="$CC"
6995 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006996 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006997 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006998 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006999else
Matthias Kloseb9621712010-04-24 17:59:49 +00007000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007001/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007002
Matthias Kloseb159a552010-04-25 21:00:44 +00007003
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007004int
7005main ()
7006{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007007
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007008 ;
7009 return 0;
7010}
Matthias Kloseb159a552010-04-25 21:00:44 +00007011
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007013if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007014
7015 CC="$ac_save_cc -fstrict-aliasing"
7016 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007018/* end confdefs.h. */
7019
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007020 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021int
7022main ()
7023{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007024double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025 ;
7026 return 0;
7027}
Matthias Kloseb159a552010-04-25 21:00:44 +00007028
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007030if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007031
7032 ac_cv_no_strict_aliasing=no
7033
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007034else
Matthias Kloseb159a552010-04-25 21:00:44 +00007035
7036 ac_cv_no_strict_aliasing=yes
7037
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007038fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007040
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007041else
Matthias Kloseb159a552010-04-25 21:00:44 +00007042
7043 ac_cv_no_strict_aliasing=no
7044
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007045fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007047fi
7048
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007049 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007050 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7052$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007053 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007054 then
7055 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7056 fi
7057
Zachary Ware5af85642015-12-21 12:09:17 -06007058 # ICC doesn't recognize the option, but only emits a warning
7059 ## XXX does it emit an unused result warning and can it be disabled?
7060 case "$CC" in
7061 *icc*)
7062 ac_cv_disable_unused_result_warning=no
7063 ;;
7064 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7066$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7067 ac_save_cc="$CC"
7068 CC="$CC -Wunused-result -Werror"
7069 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007070 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007071 $as_echo_n "(cached) " >&6
7072else
7073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7074/* end confdefs.h. */
7075
7076
7077int
7078main ()
7079{
7080
7081 ;
7082 return 0;
7083}
7084
7085_ACEOF
7086if ac_fn_c_try_compile "$LINENO"; then :
7087
7088 ac_cv_disable_unused_result_warning=yes
7089
7090else
7091
7092 ac_cv_disable_unused_result_warning=no
7093
7094fi
7095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7096fi
7097
7098 CFLAGS="$save_CFLAGS"
7099 CC="$ac_save_cc"
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7101$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007102 ;;
7103 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007104
7105 if test $ac_cv_disable_unused_result_warning = yes
7106 then
7107 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007108 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7109 fi
7110
7111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7112$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7113 ac_save_cc="$CC"
7114 CC="$CC -Wunused-parameter -Werror"
7115 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7116 $as_echo_n "(cached) " >&6
7117else
7118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7119/* end confdefs.h. */
7120
7121
7122int
7123main ()
7124{
7125
7126 ;
7127 return 0;
7128}
7129
7130_ACEOF
7131if ac_fn_c_try_compile "$LINENO"; then :
7132
7133 ac_cv_disable_unused_parameter_warning=yes
7134
7135else
7136
7137 ac_cv_disable_unused_parameter_warning=no
7138
7139fi
7140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7141fi
7142
7143 CC="$ac_save_cc"
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7145$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7146
7147 if test $ac_cv_disable_unused_parameter_warning = yes
7148 then
7149 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7150 fi
7151
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7153$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7154 ac_save_cc="$CC"
7155 CC="$CC -Wmissing-field-initializers -Werror"
7156 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7157 $as_echo_n "(cached) " >&6
7158else
7159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7160/* end confdefs.h. */
7161
7162
7163int
7164main ()
7165{
7166
7167 ;
7168 return 0;
7169}
7170
7171_ACEOF
7172if ac_fn_c_try_compile "$LINENO"; then :
7173
7174 ac_cv_disable_missing_field_initializers=yes
7175
7176else
7177
7178 ac_cv_disable_missing_field_initializers=no
7179
7180fi
7181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7182fi
7183
7184 CC="$ac_save_cc"
7185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7186$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7187
7188 if test $ac_cv_disable_missing_field_initializers = yes
7189 then
7190 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007191 fi
7192
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7194$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7195 ac_save_cc="$CC"
7196 CC="$CC -Wsign-compare"
7197 save_CFLAGS="$CFLAGS"
7198 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7199 $as_echo_n "(cached) " >&6
7200else
7201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7202/* end confdefs.h. */
7203
7204
7205int
7206main ()
7207{
7208
7209 ;
7210 return 0;
7211}
7212
7213_ACEOF
7214if ac_fn_c_try_compile "$LINENO"; then :
7215
7216 ac_cv_enable_sign_compare_warning=yes
7217
7218else
7219
7220 ac_cv_enable_sign_compare_warning=no
7221
7222fi
7223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7224fi
7225
7226 CFLAGS="$save_CFLAGS"
7227 CC="$ac_save_cc"
7228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7229$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7230
7231 if test $ac_cv_enable_sign_compare_warning = yes
7232 then
7233 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7234 fi
7235
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7237$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7238 ac_save_cc="$CC"
7239 CC="$CC -Wunreachable-code"
7240 save_CFLAGS="$CFLAGS"
7241 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7242 $as_echo_n "(cached) " >&6
7243else
7244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245/* end confdefs.h. */
7246
7247
7248int
7249main ()
7250{
7251
7252 ;
7253 return 0;
7254}
7255
7256_ACEOF
7257if ac_fn_c_try_compile "$LINENO"; then :
7258
7259 ac_cv_enable_unreachable_code_warning=yes
7260
7261else
7262
7263 ac_cv_enable_unreachable_code_warning=no
7264
7265fi
7266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7267fi
7268
7269 CFLAGS="$save_CFLAGS"
7270 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007271
7272 # Don't enable unreachable code warning in debug mode, since it usually
7273 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007274 # Issue #24324: Unfortunately, the unreachable code warning does not work
7275 # correctly on gcc and has been silently removed from the compiler.
7276 # It is supported on clang but on OS X systems gcc may be an alias
7277 # for clang. Try to determine if the compiler is not really gcc and,
7278 # if so, only then enable the warning.
7279 if test $ac_cv_enable_unreachable_code_warning = yes && \
7280 test "$Py_DEBUG" != "true" && \
7281 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007282 then
7283 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007284 else
7285 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007286 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7288$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007289
INADA Naokie3364842018-06-05 20:40:53 +09007290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7291$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7292 ac_save_cc="$CC"
7293 CC="$CC -Werror -Wstrict-prototypes"
7294 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7295 $as_echo_n "(cached) " >&6
7296else
7297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7298/* end confdefs.h. */
7299
7300
7301int
7302main ()
7303{
7304
7305 ;
7306 return 0;
7307}
7308
7309_ACEOF
7310if ac_fn_c_try_compile "$LINENO"; then :
7311
7312 ac_cv_enable_strict_prototypes_warning=yes
7313
7314else
7315
7316 ac_cv_enable_strict_prototypes_warning=no
7317
7318fi
7319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7320fi
7321
7322 CC="$ac_save_cc"
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7324$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7325
7326 if test $ac_cv_enable_strict_prototypes_warning = yes
7327 then
7328 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7329 fi
7330
Victor Stinner193ee0a2017-02-06 14:24:00 +01007331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7332$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7333 ac_save_cc="$CC"
7334 CC="$CC -Werror=implicit-function-declaration"
7335 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7336 $as_echo_n "(cached) " >&6
7337else
7338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7339/* end confdefs.h. */
7340
7341
7342int
7343main ()
7344{
7345
7346 ;
7347 return 0;
7348}
7349
7350_ACEOF
7351if ac_fn_c_try_compile "$LINENO"; then :
7352
7353 ac_cv_enable_implicit_function_declaration_error=yes
7354
7355else
7356
7357 ac_cv_enable_implicit_function_declaration_error=no
7358
7359fi
7360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7361fi
7362
7363 CC="$ac_save_cc"
7364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7365$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7366
7367 if test $ac_cv_enable_implicit_function_declaration_error = yes
7368 then
7369 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7370 fi
7371
Vinay Sajip0b60f642019-10-15 08:26:12 +01007372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7373$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7374 ac_save_cc="$CC"
7375 CC="$CC -fvisibility=hidden"
7376 if ${ac_cv_enable_visibility+:} false; then :
7377 $as_echo_n "(cached) " >&6
7378else
7379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7380/* end confdefs.h. */
7381
7382
7383int
7384main ()
7385{
7386
7387 ;
7388 return 0;
7389}
7390
7391_ACEOF
7392if ac_fn_c_try_compile "$LINENO"; then :
7393
7394 ac_cv_enable_visibility=yes
7395
7396else
7397
7398 ac_cv_enable_visibility=no
7399
7400fi
7401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7402fi
7403
7404 CC="$ac_save_cc"
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7406$as_echo "$ac_cv_enable_visibility" >&6; }
7407
7408 if test $ac_cv_enable_visibility = yes
7409 then
7410 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7411 fi
7412
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7414 # support. Without this, treatment of subnormals doesn't follow
7415 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007416 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417 alpha*)
7418 BASECFLAGS="$BASECFLAGS -mieee"
7419 ;;
7420 esac
7421
7422 case $ac_sys_system in
7423 SCO_SV*)
7424 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7425 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007426
Ned Deily87adb6e2013-10-18 21:09:56 -07007427 Darwin*)
7428 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7429 # used to be here, but non-Apple gcc doesn't accept them.
7430 if test "${CC}" = gcc
7431 then
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007433$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007434 case "${UNIVERSALSDK}" in
7435 */MacOSX10.4u.sdk)
7436 # Build using 10.4 SDK, force usage of gcc when the
7437 # compiler is gcc, otherwise the user will get very
7438 # confusing error messages when building on OSX 10.6
7439 CC=gcc-4.0
7440 CPP=cpp-4.0
7441 ;;
7442 esac
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007444$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007445 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446
Ned Deily87adb6e2013-10-18 21:09:56 -07007447 if test "${enable_universalsdk}"
7448 then
7449 case "$UNIVERSAL_ARCHS" in
7450 32-bit)
7451 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7452 LIPO_32BIT_FLAGS=""
7453 ARCH_RUN_32BIT=""
7454 ;;
7455 64-bit)
7456 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7457 LIPO_32BIT_FLAGS=""
7458 ARCH_RUN_32BIT="true"
7459 ;;
7460 all)
7461 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7462 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7463 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7464 ;;
7465 intel)
7466 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7467 LIPO_32BIT_FLAGS="-extract i386"
7468 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7469 ;;
7470 intel-32)
7471 UNIVERSAL_ARCH_FLAGS="-arch i386"
7472 LIPO_32BIT_FLAGS=""
7473 ARCH_RUN_32BIT=""
7474 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007475 intel-64)
7476 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7477 LIPO_32BIT_FLAGS=""
7478 ARCH_RUN_32BIT="true"
7479 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007480 3-way)
7481 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7482 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7483 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7484 ;;
7485 *)
7486 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7487 ;;
7488 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489
Ned Deily87adb6e2013-10-18 21:09:56 -07007490 if test "${UNIVERSALSDK}" != "/"
7491 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007492 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7493 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007494 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007495 else
7496 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7497 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007498 fi
7499 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500
Ned Deily87adb6e2013-10-18 21:09:56 -07007501 # Calculate an appropriate deployment target for this build:
7502 # The deployment target value is used explicitly to enable certain
7503 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007504 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007505 # component of the string returned by distutils.get_platform().
7506 #
7507 # Use the value from:
7508 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7509 # 2. the operating system version of the build machine if >= 10.6
7510 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7511 # below to pick either 10.3, 10.4, or 10.5 as the target.
7512 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007513
Ned Deily87adb6e2013-10-18 21:09:56 -07007514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7515$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007516 cur_target_major=`sw_vers -productVersion | \
7517 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7518 cur_target_minor=`sw_vers -productVersion | \
7519 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7520 cur_target="${cur_target_major}.${cur_target_minor}"
7521 if test ${cur_target_major} -eq 10 && \
7522 test ${cur_target_minor} -ge 3 && \
7523 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007524 then
Ned Deily36820b62014-06-25 13:44:22 -07007525 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007526 cur_target=10.3
7527 if test ${enable_universalsdk}
7528 then
7529 case "$UNIVERSAL_ARCHS" in
7530 all|3-way|intel|64-bit)
7531 # These configurations were first supported in 10.5
7532 cur_target='10.5'
7533 ;;
7534 esac
7535 else
7536 if test `/usr/bin/arch` = "i386"
7537 then
7538 # 10.4 was the first release to support Intel archs
7539 cur_target="10.4"
7540 fi
7541 fi
7542 fi
7543 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007544
Ned Deily87adb6e2013-10-18 21:09:56 -07007545 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7546 # environment with a value that is the same as what we'll use
7547 # in the Makefile to ensure that we'll get the same compiler
7548 # environment during configure and build time.
7549 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7550 export MACOSX_DEPLOYMENT_TARGET
7551 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7553$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007554
Ned Deily87adb6e2013-10-18 21:09:56 -07007555 # end of Darwin* tests
7556 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557 esac
7558 ;;
7559
7560*)
7561 case $ac_sys_system in
7562 OpenUNIX*|UnixWare*)
7563 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7564 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565 SCO_SV*)
7566 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7567 ;;
7568 esac
7569 ;;
7570esac
7571
Zachary Ware5af85642015-12-21 12:09:17 -06007572# ICC needs -fp-model strict or floats behave badly
7573case "$CC" in
7574*icc*)
7575 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7576 ;;
7577esac
7578
T. Woutersddbfa2c2017-05-23 01:30:49 +02007579if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580 :
7581else
7582 OPT="-DNDEBUG $OPT"
7583fi
7584
7585if test "$ac_arch_flags"
7586then
7587 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7588fi
7589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590# On some compilers, pthreads are available without further options
7591# (e.g. MacOS X). On some of these systems, the compiler will not
7592# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7593# So we have to see first whether pthreads are available without
7594# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7596$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007597if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599else
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601 ac_cv_pthread_is_default=no
7602else
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604/* end confdefs.h. */
7605
Stefan Krah7dba5942012-11-22 22:49:11 +01007606#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607#include <pthread.h>
7608
7609void* routine(void* p){return NULL;}
7610
7611int main(){
7612 pthread_t p;
7613 if(pthread_create(&p,NULL,routine,NULL)!=0)
7614 return 1;
7615 (void)pthread_detach(p);
7616 return 0;
7617}
7618
7619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007620if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621
7622 ac_cv_pthread_is_default=yes
7623 ac_cv_kthread=no
7624 ac_cv_pthread=no
7625
7626else
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7630 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631fi
7632
7633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634fi
7635
Matthias Kloseb9621712010-04-24 17:59:49 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7637$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638
7639
7640if test $ac_cv_pthread_is_default = yes
7641then
7642 ac_cv_kpthread=no
7643else
7644# -Kpthread, if available, provides the right #defines
7645# and linker options to make pthread_create available
7646# Some compilers won't report that they do not support -Kpthread,
7647# so we need to run a program to see whether it really made the
7648# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7650$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007651if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653else
7654 ac_save_cc="$CC"
7655CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007656if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657 ac_cv_kpthread=no
7658else
Matthias Kloseb9621712010-04-24 17:59:49 +00007659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660/* end confdefs.h. */
7661
Stefan Krah7dba5942012-11-22 22:49:11 +01007662#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663#include <pthread.h>
7664
7665void* routine(void* p){return NULL;}
7666
7667int main(){
7668 pthread_t p;
7669 if(pthread_create(&p,NULL,routine,NULL)!=0)
7670 return 1;
7671 (void)pthread_detach(p);
7672 return 0;
7673}
7674
7675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007676if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007677 ac_cv_kpthread=yes
7678else
Matthias Kloseb9621712010-04-24 17:59:49 +00007679 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7682 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683fi
7684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685CC="$ac_save_cc"
7686fi
7687
Matthias Kloseb9621712010-04-24 17:59:49 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7689$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690fi
7691
7692if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7693then
7694# -Kthread, if available, provides the right #defines
7695# and linker options to make pthread_create available
7696# Some compilers won't report that they do not support -Kthread,
7697# so we need to run a program to see whether it really made the
7698# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7700$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007701if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007702 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703else
7704 ac_save_cc="$CC"
7705CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007706if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707 ac_cv_kthread=no
7708else
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710/* end confdefs.h. */
7711
Stefan Krah7dba5942012-11-22 22:49:11 +01007712#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713#include <pthread.h>
7714
7715void* routine(void* p){return NULL;}
7716
7717int main(){
7718 pthread_t p;
7719 if(pthread_create(&p,NULL,routine,NULL)!=0)
7720 return 1;
7721 (void)pthread_detach(p);
7722 return 0;
7723}
7724
7725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007726if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727 ac_cv_kthread=yes
7728else
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733fi
7734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735CC="$ac_save_cc"
7736fi
7737
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7739$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007740fi
7741
7742if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7743then
7744# -pthread, if available, provides the right #defines
7745# and linker options to make pthread_create available
7746# Some compilers won't report that they do not support -pthread,
7747# so we need to run a program to see whether it really made the
7748# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7750$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007751if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007753else
7754 ac_save_cc="$CC"
7755CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007756if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757 ac_cv_pthread=no
7758else
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007760/* end confdefs.h. */
7761
Stefan Krah7dba5942012-11-22 22:49:11 +01007762#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763#include <pthread.h>
7764
7765void* routine(void* p){return NULL;}
7766
7767int main(){
7768 pthread_t p;
7769 if(pthread_create(&p,NULL,routine,NULL)!=0)
7770 return 1;
7771 (void)pthread_detach(p);
7772 return 0;
7773}
7774
7775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007776if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007777 ac_cv_pthread=yes
7778else
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783fi
7784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007785CC="$ac_save_cc"
7786fi
7787
Matthias Kloseb9621712010-04-24 17:59:49 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7789$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790fi
7791
7792# If we have set a CC compiler flag for thread support then
7793# check if it works for CXX, too.
7794ac_cv_cxx_thread=no
7795if test ! -z "$CXX"
7796then
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7798$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799ac_save_cxx="$CXX"
7800
7801if test "$ac_cv_kpthread" = "yes"
7802then
7803 CXX="$CXX -Kpthread"
7804 ac_cv_cxx_thread=yes
7805elif test "$ac_cv_kthread" = "yes"
7806then
7807 CXX="$CXX -Kthread"
7808 ac_cv_cxx_thread=yes
7809elif test "$ac_cv_pthread" = "yes"
7810then
7811 CXX="$CXX -pthread"
7812 ac_cv_cxx_thread=yes
7813fi
7814
7815if test $ac_cv_cxx_thread = yes
7816then
7817 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7818 $CXX -c conftest.$ac_ext 2>&5
7819 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7820 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7821 then
7822 ac_cv_cxx_thread=yes
7823 else
7824 ac_cv_cxx_thread=no
7825 fi
7826 rm -fr conftest*
7827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7829$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007830fi
7831CXX="$ac_save_cxx"
7832
7833
7834# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7836$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007837if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007839else
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007841/* end confdefs.h. */
7842#include <stdlib.h>
7843#include <stdarg.h>
7844#include <string.h>
7845#include <float.h>
7846
7847int
7848main ()
7849{
7850
7851 ;
7852 return 0;
7853}
7854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007855if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007856 ac_cv_header_stdc=yes
7857else
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007859fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7861
7862if test $ac_cv_header_stdc = yes; then
7863 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007865/* end confdefs.h. */
7866#include <string.h>
7867
7868_ACEOF
7869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 $EGREP "memchr" >/dev/null 2>&1; then :
7871
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007872else
7873 ac_cv_header_stdc=no
7874fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007875rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007876
7877fi
7878
7879if test $ac_cv_header_stdc = yes; then
7880 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007882/* end confdefs.h. */
7883#include <stdlib.h>
7884
7885_ACEOF
7886if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 $EGREP "free" >/dev/null 2>&1; then :
7888
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007889else
7890 ac_cv_header_stdc=no
7891fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007892rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893
7894fi
7895
7896if test $ac_cv_header_stdc = yes; then
7897 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007899 :
7900else
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007902/* end confdefs.h. */
7903#include <ctype.h>
7904#include <stdlib.h>
7905#if ((' ' & 0x0FF) == 0x020)
7906# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7907# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7908#else
7909# define ISLOWER(c) \
7910 (('a' <= (c) && (c) <= 'i') \
7911 || ('j' <= (c) && (c) <= 'r') \
7912 || ('s' <= (c) && (c) <= 'z'))
7913# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7914#endif
7915
7916#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7917int
7918main ()
7919{
7920 int i;
7921 for (i = 0; i < 256; i++)
7922 if (XOR (islower (i), ISLOWER (i))
7923 || toupper (i) != TOUPPER (i))
7924 return 2;
7925 return 0;
7926}
7927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007928if ac_fn_c_try_run "$LINENO"; then :
7929
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007930else
Matthias Kloseb9621712010-04-24 17:59:49 +00007931 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007935fi
7936
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007937fi
7938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7940$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007941if test $ac_cv_header_stdc = yes; then
7942
Matthias Kloseb9621712010-04-24 17:59:49 +00007943$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007944
7945fi
7946
stratakise768c862018-01-23 16:11:24 +01007947for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007948fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007949ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007950sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007951utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007952poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007953sys/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 +01007954sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007955sys/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 +01007956sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007957sys/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 -07007958libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007959linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007960sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007961do :
7962 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7963ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007964if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007966#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007967_ACEOF
7968
7969fi
7970
Guido van Rossum627b2d71993-12-24 10:39:16 +00007971done
7972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007973ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007974for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7977$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007978if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007980else
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007982/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007983#include <sys/types.h>
7984#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007985
Martin v. Löwis11437992002-04-12 09:54:03 +00007986int
7987main ()
7988{
7989if ((DIR *) 0)
7990return 0;
7991 ;
7992 return 0;
7993}
7994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007995if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007996 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007997else
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002eval ac_res=\$$as_ac_Header
8003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8004$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008005if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008007#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008008_ACEOF
8009
8010ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008011fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008012
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008013done
8014# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8015if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8017$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008018if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008020else
Martin v. Löwis11437992002-04-12 09:54:03 +00008021 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025/* Override any GCC internal prototype to avoid an error.
8026 Use char because int might match the return type of a GCC
8027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008028#ifdef __cplusplus
8029extern "C"
8030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008031char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008032int
8033main ()
8034{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008036 ;
8037 return 0;
8038}
8039_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040for ac_lib in '' dir; do
8041 if test -z "$ac_lib"; then
8042 ac_res="none required"
8043 else
8044 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008045 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008050rm -f core conftest.err conftest.$ac_objext \
8051 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008052 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008053 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055done
Victor Stinnere0be4232011-10-25 13:06:09 +02008056if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058else
8059 ac_cv_search_opendir=no
8060fi
8061rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008062LIBS=$ac_func_search_save_LIBS
8063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8065$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008067if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008070fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008071
Michael W. Hudson54241132001-12-07 15:38:26 +00008072else
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8074$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008075if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008077else
8078 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082/* Override any GCC internal prototype to avoid an error.
8083 Use char because int might match the return type of a GCC
8084 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008085#ifdef __cplusplus
8086extern "C"
8087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008088char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008089int
8090main ()
8091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008093 ;
8094 return 0;
8095}
8096_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097for ac_lib in '' x; do
8098 if test -z "$ac_lib"; then
8099 ac_res="none required"
8100 else
8101 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008102 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008107rm -f core conftest.err conftest.$ac_objext \
8108 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008109 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112done
Victor Stinnere0be4232011-10-25 13:06:09 +02008113if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115else
8116 ac_cv_search_opendir=no
8117fi
8118rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008119LIBS=$ac_func_search_save_LIBS
8120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8122$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008124if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008125 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008127fi
8128
8129fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008130
Matthias Kloseb9621712010-04-24 17:59:49 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8132$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008133if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008135else
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008137/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008138#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008139int
8140main ()
8141{
8142return makedev(0, 0);
8143 ;
8144 return 0;
8145}
8146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008148 ac_cv_header_sys_types_h_makedev=yes
8149else
Matthias Kloseb9621712010-04-24 17:59:49 +00008150 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008152rm -f core conftest.err conftest.$ac_objext \
8153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008154
8155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8157$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008158
8159if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008160ac_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 +02008161if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008162
Matthias Kloseb9621712010-04-24 17:59:49 +00008163$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008164
8165fi
8166
8167
8168
8169 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 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 +02008171if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008172
Matthias Kloseb9621712010-04-24 17:59:49 +00008173$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008174
8175fi
8176
8177
8178 fi
8179fi
8180
Michael W. Hudson54241132001-12-07 15:38:26 +00008181
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008182# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8183# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8184SAVE_CFLAGS=$CFLAGS
8185CFLAGS="-std=c99 $CFLAGS"
8186for ac_header in bluetooth/bluetooth.h
8187do :
8188 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8189if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8190 cat >>confdefs.h <<_ACEOF
8191#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8192_ACEOF
8193
8194fi
8195
8196done
8197
8198CFLAGS=$SAVE_CFLAGS
8199
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008200# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8201for ac_header in net/if.h
8202do :
8203 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8204#ifdef STDC_HEADERS
8205# include <stdlib.h>
8206# include <stddef.h>
8207#else
8208# ifdef HAVE_STDLIB_H
8209# include <stdlib.h>
8210# endif
8211#endif
8212#ifdef HAVE_SYS_SOCKET_H
8213# include <sys/socket.h>
8214#endif
8215
8216"
Victor Stinnere0be4232011-10-25 13:06:09 +02008217if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008218 cat >>confdefs.h <<_ACEOF
8219#define HAVE_NET_IF_H 1
8220_ACEOF
8221
8222fi
8223
8224done
8225
8226
Martin v. Löwis11017b12006-01-14 18:12:57 +00008227# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008228for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008229do :
8230 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 +00008231#ifdef HAVE_ASM_TYPES_H
8232#include <asm/types.h>
8233#endif
8234#ifdef HAVE_SYS_SOCKET_H
8235#include <sys/socket.h>
8236#endif
8237
Matthias Kloseb9621712010-04-24 17:59:49 +00008238"
Victor Stinnere0be4232011-10-25 13:06:09 +02008239if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008240 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008241#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008242_ACEOF
8243
8244fi
8245
8246done
8247
8248
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008249# On Linux, qrtr.h requires asm/types.h
8250for ac_header in linux/qrtr.h
8251do :
8252 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8253#ifdef HAVE_ASM_TYPES_H
8254#include <asm/types.h>
8255#endif
8256#ifdef HAVE_SYS_SOCKET_H
8257#include <sys/socket.h>
8258#endif
8259
8260"
8261if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8262 cat >>confdefs.h <<_ACEOF
8263#define HAVE_LINUX_QRTR_H 1
8264_ACEOF
8265
8266fi
8267
8268done
8269
8270
caaveryeffc12f2017-09-06 18:18:10 -04008271for ac_header in linux/vm_sockets.h
8272do :
8273 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8274#ifdef HAVE_SYS_SOCKET_H
8275#include <sys/socket.h>
8276#endif
8277
8278"
8279if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8280 cat >>confdefs.h <<_ACEOF
8281#define HAVE_LINUX_VM_SOCKETS_H 1
8282_ACEOF
8283
8284fi
8285
8286done
8287
8288
karl ding360371f2020-04-29 15:31:19 -07008289# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8290for 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 +02008291do :
8292 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8293ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8294#ifdef HAVE_SYS_SOCKET_H
8295#include <sys/socket.h>
8296#endif
8297
8298"
8299if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8300 cat >>confdefs.h <<_ACEOF
8301#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8302_ACEOF
8303
8304fi
8305
8306done
8307
8308
Guido van Rossum627b2d71993-12-24 10:39:16 +00008309# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008310was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8312$as_echo_n "checking for clock_t in time.h... " >&6; }
8313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008314/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008315#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008316
8317_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008320 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008321else
Martin v. Löwis11437992002-04-12 09:54:03 +00008322
8323
Matthias Kloseb9621712010-04-24 17:59:49 +00008324$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008325
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008326
Guido van Rossum627b2d71993-12-24 10:39:16 +00008327fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008328rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8331$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8334$as_echo_n "checking for makedev... " >&6; }
8335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008336/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008337
Jesus Cea740f53a2010-04-28 11:35:30 +00008338#if defined(MAJOR_IN_MKDEV)
8339#include <sys/mkdev.h>
8340#elif defined(MAJOR_IN_SYSMACROS)
8341#include <sys/sysmacros.h>
8342#else
8343#include <sys/types.h>
8344#endif
8345
Neal Norwitz11690112002-07-30 01:08:28 +00008346int
8347main ()
8348{
Jesus Cea740f53a2010-04-28 11:35:30 +00008349
8350 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008351 ;
8352 return 0;
8353}
Matthias Kloseb159a552010-04-25 21:00:44 +00008354
Neal Norwitz11690112002-07-30 01:08:28 +00008355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008356if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008357 ac_cv_has_makedev=yes
8358else
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008361rm -f core conftest.err conftest.$ac_objext \
8362 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8364$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008365if test "$ac_cv_has_makedev" = "yes"; then
8366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008368
8369fi
8370
Christian Heimes985ecdc2013-11-20 11:46:18 +01008371# byte swapping
8372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8373$as_echo_n "checking for le64toh... " >&6; }
8374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8375/* end confdefs.h. */
8376
8377#ifdef HAVE_ENDIAN_H
8378#include <endian.h>
8379#elif defined(HAVE_SYS_ENDIAN_H)
8380#include <sys/endian.h>
8381#endif
8382
8383int
8384main ()
8385{
8386
8387 le64toh(1)
8388 ;
8389 return 0;
8390}
8391
8392_ACEOF
8393if ac_fn_c_try_link "$LINENO"; then :
8394 ac_cv_has_le64toh=yes
8395else
8396 ac_cv_has_le64toh=no
8397fi
8398rm -f core conftest.err conftest.$ac_objext \
8399 conftest$ac_exeext conftest.$ac_ext
8400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8401$as_echo "$ac_cv_has_le64toh" >&6; }
8402if test "$ac_cv_has_le64toh" = "yes"; then
8403
8404$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8405
8406fi
8407
Martin v. Löwis399a6892002-10-04 10:22:02 +00008408use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008409# Don't use largefile support for GNU/Hurd
8410case $ac_sys_system in GNU*)
8411 use_lfs=no
8412esac
8413
Martin v. Löwis399a6892002-10-04 10:22:02 +00008414if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008415# Two defines needed to enable largefile support on various platforms
8416# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008417case $ac_sys_system/$ac_sys_release in
8418AIX*)
8419
8420$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8421
8422 ;;
8423esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008424
Matthias Kloseb9621712010-04-24 17:59:49 +00008425$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008426
8427
Matthias Kloseb9621712010-04-24 17:59:49 +00008428$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008429
Martin v. Löwis399a6892002-10-04 10:22:02 +00008430fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008431
Guido van Rossum84e7b241996-08-19 21:59:00 +00008432# Add some code to confdefs.h so that the test for off_t works on SCO
8433cat >> confdefs.h <<\EOF
8434#if defined(SCO_DS)
8435#undef _OFF_T
8436#endif
8437EOF
8438
Guido van Rossumef2255b2000-03-10 22:30:29 +00008439# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008440ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008441if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008443else
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
8445cat >>confdefs.h <<_ACEOF
8446#define mode_t int
8447_ACEOF
8448
8449fi
8450
Matthias Kloseb9621712010-04-24 17:59:49 +00008451ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008452if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008454else
Martin v. Löwis11437992002-04-12 09:54:03 +00008455
8456cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008458_ACEOF
8459
8460fi
8461
Matthias Kloseb9621712010-04-24 17:59:49 +00008462ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008464
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008465else
Martin v. Löwis11437992002-04-12 09:54:03 +00008466
8467cat >>confdefs.h <<_ACEOF
8468#define pid_t int
8469_ACEOF
8470
8471fi
8472
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008473
Martin v. Löwis11437992002-04-12 09:54:03 +00008474cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008475#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008476_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008477
Matthias Kloseb9621712010-04-24 17:59:49 +00008478ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008479if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008480
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008481else
Martin v. Löwis11437992002-04-12 09:54:03 +00008482
8483cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008485_ACEOF
8486
8487fi
8488
Matthias Kloseb9621712010-04-24 17:59:49 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8490$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008491if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008493else
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008495/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008496#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008497
8498_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008501 ac_cv_type_uid_t=yes
8502else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008503 ac_cv_type_uid_t=no
8504fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008505rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8509$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008510if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008511
Matthias Kloseb9621712010-04-24 17:59:49 +00008512$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008513
8514
Matthias Kloseb9621712010-04-24 17:59:49 +00008515$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008516
8517fi
8518
Mark Dickinson983bc162012-12-02 12:11:38 +00008519
Matthias Kloseb9621712010-04-24 17:59:49 +00008520ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008521if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522
Matthias Kloseb9621712010-04-24 17:59:49 +00008523$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008524
8525fi
8526
Stefan Krah1919b7e2012-03-21 18:25:23 +01008527ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8528if test "x$ac_cv_type___uint128_t" = xyes; then :
8529
8530$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8531
8532fi
8533
Jack Jansendd19cf82001-12-06 22:36:17 +00008534
Michael W. Hudson54241132001-12-07 15:38:26 +00008535# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008536# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537# The cast to long int works around a bug in the HP C Compiler
8538# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8539# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8540# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8542$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008543if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008545else
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 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 +00008547
Martin v. Löwis11437992002-04-12 09:54:03 +00008548else
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 if test "$ac_cv_type_int" = yes; then
8550 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8551$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008552as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008553See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554 else
8555 ac_cv_sizeof_int=0
8556 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8561$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562
8563
8564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008566#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008567_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008568
8569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570# The cast to long int works around a bug in the HP C Compiler
8571# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8572# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8573# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8575$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008576if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008578else
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 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 +00008580
Martin v. Löwis11437992002-04-12 09:54:03 +00008581else
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 if test "$ac_cv_type_long" = yes; then
8583 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008585as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008586See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008587 else
8588 ac_cv_sizeof_long=0
8589 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008591
Martin v. Löwis11437992002-04-12 09:54:03 +00008592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8594$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008595
8596
8597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008599#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008600_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008601
8602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603# The cast to long int works around a bug in the HP C Compiler
8604# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8605# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8606# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8608$as_echo_n "checking size of long long... " >&6; }
8609if ${ac_cv_sizeof_long_long+:} false; then :
8610 $as_echo_n "(cached) " >&6
8611else
8612 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8613
8614else
8615 if test "$ac_cv_type_long_long" = yes; then
8616 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8618as_fn_error 77 "cannot compute sizeof (long long)
8619See \`config.log' for more details" "$LINENO" 5; }
8620 else
8621 ac_cv_sizeof_long_long=0
8622 fi
8623fi
8624
8625fi
8626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8627$as_echo "$ac_cv_sizeof_long_long" >&6; }
8628
8629
8630
8631cat >>confdefs.h <<_ACEOF
8632#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8633_ACEOF
8634
8635
8636# 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 void *" >&5
8641$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008642if ${ac_cv_sizeof_void_p+:} 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 (void *))" "ac_cv_sizeof_void_p" "$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_void_p" = 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 (void *)
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_void_p=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_void_p" >&5
8660$as_echo "$ac_cv_sizeof_void_p" >&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 Rossumad678af1998-10-02 14:42:15 +00008665#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008666_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +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 short" >&5
8674$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008675if ${ac_cv_sizeof_short+:} 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 (short))" "ac_cv_sizeof_short" "$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_short" = 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 (short)
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_short=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_short" >&5
8693$as_echo "$ac_cv_sizeof_short" >&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 Rossumef2255b2000-03-10 22:30:29 +00008698#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008699_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +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.
Matthias Kloseb9621712010-04-24 17:59:49 +00008706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8707$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008708if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008710else
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 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 +00008712
Martin v. Löwis11437992002-04-12 09:54:03 +00008713else
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 if test "$ac_cv_type_float" = 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;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008717as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008718See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719 else
8720 ac_cv_sizeof_float=0
8721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008723
Martin v. Löwis11437992002-04-12 09:54:03 +00008724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8726$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008727
8728
8729
Martin v. Löwis11437992002-04-12 09:54:03 +00008730cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008731#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008732_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008733
8734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008735# 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 double" >&5
8740$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008741if ${ac_cv_sizeof_double+:} 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 (double))" "ac_cv_sizeof_double" "$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_double" = 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 (double)
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_double=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_double" >&5
8759$as_echo "$ac_cv_sizeof_double" >&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 Rossumef2255b2000-03-10 22:30:29 +00008764#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008765_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +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 fpos_t" >&5
8773$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008774if ${ac_cv_sizeof_fpos_t+:} 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 (fpos_t))" "ac_cv_sizeof_fpos_t" "$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_fpos_t" = 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 (fpos_t)
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_fpos_t=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_fpos_t" >&5
8792$as_echo "$ac_cv_sizeof_fpos_t" >&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 Rossumb9a22a12000-06-30 02:48:53 +00008797#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008798_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008799
Michael W. Hudson54241132001-12-07 15:38:26 +00008800
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 size_t" >&5
8806$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008807if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008809else
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 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 +00008811
Martin v. Löwis18e16552006-02-15 17:27:45 +00008812else
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 if test "$ac_cv_type_size_t" = 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 (size_t)
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_size_t=0
8820 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822
Martin v. Löwis18e16552006-02-15 17:27:45 +00008823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8825$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826
8827
8828
Martin v. Löwis18e16552006-02-15 17:27:45 +00008829cat >>confdefs.h <<_ACEOF
8830#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8831_ACEOF
8832
8833
Christian Heimes400adb02008-02-01 08:12:03 +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 pid_t" >&5
8839$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008840if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008841 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008842else
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 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 +00008844
Christian Heimes400adb02008-02-01 08:12:03 +00008845else
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 if test "$ac_cv_type_pid_t" = 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 (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008850See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008851 else
8852 ac_cv_sizeof_pid_t=0
8853 fi
8854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008855
Christian Heimes400adb02008-02-01 08:12:03 +00008856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8858$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008859
8860
8861
8862cat >>confdefs.h <<_ACEOF
8863#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8864_ACEOF
8865
8866
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008867# 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.
8871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8872$as_echo_n "checking size of uintptr_t... " >&6; }
8873if ${ac_cv_sizeof_uintptr_t+:} false; then :
8874 $as_echo_n "(cached) " >&6
8875else
8876 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8877
8878else
8879 if test "$ac_cv_type_uintptr_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;}
8882as_fn_error 77 "cannot compute sizeof (uintptr_t)
8883See \`config.log' for more details" "$LINENO" 5; }
8884 else
8885 ac_cv_sizeof_uintptr_t=0
8886 fi
8887fi
8888
8889fi
8890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8891$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8892
8893
8894
8895cat >>confdefs.h <<_ACEOF
8896#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8897_ACEOF
8898
8899
Michael W. Hudson54241132001-12-07 15:38:26 +00008900
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008901
Eitan Adler3055c942018-05-15 22:58:09 -07008902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8903$as_echo_n "checking for long double... " >&6; }
8904if ${ac_cv_type_long_double+:} false; then :
8905 $as_echo_n "(cached) " >&6
8906else
8907 if test "$GCC" = yes; then
8908 ac_cv_type_long_double=yes
8909 else
8910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8911/* end confdefs.h. */
8912/* The Stardent Vistra knows sizeof (long double), but does
8913 not support it. */
8914 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008915int
8916main ()
8917{
Eitan Adler3055c942018-05-15 22:58:09 -07008918static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8919 sizeof (double) <= sizeof (long double))];
8920test_array [0] = 0;
8921return test_array [0];
8922
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008923 ;
8924 return 0;
8925}
8926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008927if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008928 ac_cv_type_long_double=yes
8929else
8930 ac_cv_type_long_double=no
8931fi
8932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8933 fi
8934fi
8935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8936$as_echo "$ac_cv_type_long_double" >&6; }
8937 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008938
Matthias Kloseb9621712010-04-24 17:59:49 +00008939$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008940
Eitan Adler3055c942018-05-15 22:58:09 -07008941 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008942
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008943# The cast to long int works around a bug in the HP C Compiler
8944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8946# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8948$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008949if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008951else
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 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 +00008953
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008954else
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 if test "$ac_cv_type_long_double" = yes; then
8956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008958as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008959See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008960 else
8961 ac_cv_sizeof_long_double=0
8962 fi
8963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008964
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8967$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008968
8969
8970
8971cat >>confdefs.h <<_ACEOF
8972#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8973_ACEOF
8974
8975
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977# The cast to long int works around a bug in the HP C Compiler
8978# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8979# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8980# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8982$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008983if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008985else
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 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 +00008987
Thomas Woutersb2137042007-02-01 18:02:27 +00008988else
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 if test "$ac_cv_type__Bool" = yes; then
8990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008992as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008993See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008994 else
8995 ac_cv_sizeof__Bool=0
8996 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008998
Thomas Woutersb2137042007-02-01 18:02:27 +00008999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9001$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009002
9003
9004
Thomas Woutersb2137042007-02-01 18:02:27 +00009005cat >>confdefs.h <<_ACEOF
9006#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9007_ACEOF
9008
9009
Thomas Woutersb2137042007-02-01 18:02:27 +00009010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009011# The cast to long int works around a bug in the HP C Compiler
9012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9014# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9016$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009017if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009019else
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009021#ifdef HAVE_SYS_TYPES_H
9022#include <sys/types.h>
9023#endif
9024
Matthias Kloseb9621712010-04-24 17:59:49 +00009025"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009026
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009027else
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 if test "$ac_cv_type_off_t" = yes; then
9029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009031as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009032See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009033 else
9034 ac_cv_sizeof_off_t=0
9035 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009037
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9040$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009041
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009042
9043
Martin v. Löwis11437992002-04-12 09:54:03 +00009044cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009045#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009046_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009047
Michael W. Hudson54241132001-12-07 15:38:26 +00009048
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009049
Matthias Kloseb9621712010-04-24 17:59:49 +00009050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9051$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009052if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009053 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009054
Matthias Kloseb9621712010-04-24 17:59:49 +00009055$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009056
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9058$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009059else
Matthias Kloseb9621712010-04-24 17:59:49 +00009060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9061$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009062fi
9063
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009064# The cast to long int works around a bug in the HP C Compiler
9065# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9066# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9067# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9069$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009070if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009071 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009072else
Matthias Kloseb9621712010-04-24 17:59:49 +00009073 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009074#ifdef HAVE_SYS_TYPES_H
9075#include <sys/types.h>
9076#endif
9077#ifdef HAVE_TIME_H
9078#include <time.h>
9079#endif
9080
Matthias Kloseb9621712010-04-24 17:59:49 +00009081"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009082
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009083else
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 if test "$ac_cv_type_time_t" = yes; then
9085 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009087as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009088See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009089 else
9090 ac_cv_sizeof_time_t=0
9091 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009093
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9096$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009097
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009098
9099
Martin v. Löwis11437992002-04-12 09:54:03 +00009100cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009101#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009102_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009103
Michael W. Hudson54241132001-12-07 15:38:26 +00009104
9105
Trent Mick635f6fb2000-08-23 21:33:05 +00009106# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009107ac_save_cc="$CC"
9108if test "$ac_cv_kpthread" = "yes"
9109then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009110elif test "$ac_cv_kthread" = "yes"
9111then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009112elif test "$ac_cv_pthread" = "yes"
9113then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009114fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009115
Matthias Kloseb9621712010-04-24 17:59:49 +00009116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9117$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009118have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009120/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009121
9122 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009123int
9124main ()
9125{
Guido van Rossum12580492000-09-24 16:47:19 +00009126pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009127 ;
9128 return 0;
9129}
Matthias Kloseb159a552010-04-25 21:00:44 +00009130
Martin v. Löwis11437992002-04-12 09:54:03 +00009131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009132if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009133 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9137$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009138if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009139 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009140# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9141# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9142# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9144$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009145if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009147else
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009149#ifdef HAVE_PTHREAD_H
9150#include <pthread.h>
9151#endif
9152
Matthias Kloseb9621712010-04-24 17:59:49 +00009153"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009155else
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 if test "$ac_cv_type_pthread_t" = yes; then
9157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009159as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009160See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009161 else
9162 ac_cv_sizeof_pthread_t=0
9163 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009165
Trent Mick635f6fb2000-08-23 21:33:05 +00009166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9168$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009170
9171
Martin v. Löwis11437992002-04-12 09:54:03 +00009172cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009173#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009174_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009176
Trent Mick635f6fb2000-08-23 21:33:05 +00009177fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009178
9179# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9180# This checking will be unnecessary after removing deprecated TLS API.
9181# The cast to long int works around a bug in the HP C Compiler
9182# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9183# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9184# This bug is HP SR number 8606223364.
9185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9186$as_echo_n "checking size of pthread_key_t... " >&6; }
9187if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9188 $as_echo_n "(cached) " >&6
9189else
9190 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9191"; then :
9192
9193else
9194 if test "$ac_cv_type_pthread_key_t" = yes; then
9195 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9196$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9197as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9198See \`config.log' for more details" "$LINENO" 5; }
9199 else
9200 ac_cv_sizeof_pthread_key_t=0
9201 fi
9202fi
9203
9204fi
9205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9206$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9207
9208
9209
9210cat >>confdefs.h <<_ACEOF
9211#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9212_ACEOF
9213
9214
9215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9216$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9217if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9219/* end confdefs.h. */
9220#include <pthread.h>
9221int
9222main ()
9223{
9224pthread_key_t k; k * 1;
9225 ;
9226 return 0;
9227}
9228_ACEOF
9229if ac_fn_c_try_compile "$LINENO"; then :
9230 ac_pthread_key_t_is_arithmetic_type=yes
9231else
9232 ac_pthread_key_t_is_arithmetic_type=no
9233
9234fi
9235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9237$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9238 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9239
9240$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9241
9242 fi
9243else
9244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9245$as_echo "no" >&6; }
9246fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009247CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009248
Michael W. Hudson54241132001-12-07 15:38:26 +00009249
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009250case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009251 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009252 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9253 ;;
9254 Darwin/*)
9255 OTHER_LIBTOOL_OPT=""
9256 ;;
9257esac
9258
9259
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009260
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009261case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009262 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009263 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9264 if test "${enable_universalsdk}"; then
9265 :
9266 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009267 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009268 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009269 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009270 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009271 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009272 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009273 if test ${gcc_version} '<' 4.0
9274 then
9275 LIBTOOL_CRUFT="-lcc_dynamic"
9276 else
9277 LIBTOOL_CRUFT=""
9278 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009279 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009280 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009281else
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009283/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009284
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009285 #include <unistd.h>
9286 int main(int argc, char*argv[])
9287 {
9288 if (sizeof(long) == 4) {
9289 return 0;
9290 } else {
9291 return 1;
9292 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009293 }
9294
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009296if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009297 ac_osx_32bit=yes
9298else
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009300fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9302 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009303fi
9304
9305
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009306 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009307 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009308 i386)
9309 MACOSX_DEFAULT_ARCH="i386"
9310 ;;
9311 ppc)
9312 MACOSX_DEFAULT_ARCH="ppc"
9313 ;;
9314 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009315 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009316 ;;
9317 esac
9318 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009319 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009320 i386)
9321 MACOSX_DEFAULT_ARCH="x86_64"
9322 ;;
9323 ppc)
9324 MACOSX_DEFAULT_ARCH="ppc64"
9325 ;;
9326 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009327 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009328 ;;
9329 esac
9330
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009331 fi
9332
9333 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009334 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009335 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009336esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9338$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009339if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009340then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009341 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009342 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009343 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009344
Matthias Kloseb9621712010-04-24 17:59:49 +00009345$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009346
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9348$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009349 if test $enable_shared = "yes"
9350 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009351 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 +00009352 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009353else
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9355$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009356fi
9357
Matthias Kloseb9621712010-04-24 17:59:49 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9359$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009360case $ac_sys_system/$ac_sys_release in
9361 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009362
Matthias Kloseb9621712010-04-24 17:59:49 +00009363$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009364
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9366$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009367 ;;
9368 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9370$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009371 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009372esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009373
Guido van Rossum0a516c91994-09-12 10:58:40 +00009374# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009375
Michael W. Hudson54241132001-12-07 15:38:26 +00009376
9377
9378
9379
Benjamin Peterson99f03762010-04-11 22:15:28 +00009380
Thomas Wouters477c8d52006-05-27 19:21:47 +00009381
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009382# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9383# -- usually .so, .sl on HP-UX, .dll on Cygwin
9384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9385$as_echo_n "checking the extension of shared libraries... " >&6; }
9386if test -z "$SHLIB_SUFFIX"; then
9387 case $ac_sys_system in
9388 hp*|HP*)
9389 case `uname -m` in
9390 ia64) SHLIB_SUFFIX=.so;;
9391 *) SHLIB_SUFFIX=.sl;;
9392 esac
9393 ;;
9394 CYGWIN*) SHLIB_SUFFIX=.dll;;
9395 *) SHLIB_SUFFIX=.so;;
9396 esac
9397fi
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9399$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009400
Guido van Rossum0a516c91994-09-12 10:58:40 +00009401# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009402# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009403# (Shared libraries in this instance are shared modules to be loaded into
9404# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9406$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009407if test -z "$LDSHARED"
9408then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009409 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009410 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009411 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009412 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009413 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009415 if test "$GCC" = "yes" ; then
9416 LDSHARED='$(CC) -shared'
9417 LDCXXSHARED='$(CXX) -shared'
9418 else
9419 LDSHARED='$(CC) -G'
9420 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009421 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009422 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009423 if test "$GCC" = "yes" ; then
9424 LDSHARED='$(CC) -shared'
9425 LDCXXSHARED='$(CXX) -shared'
9426 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009427 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009428 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009429 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009430 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009431 LDSHARED='$(CC) -bundle'
9432 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009433 if test "$enable_framework" ; then
9434 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009435 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9436 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009437 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009438 else
9439 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009440 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009441 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009442 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009443 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009444 LDSHARED='$(CC) -bundle'
9445 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009446 if test "$enable_framework" ; then
9447 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009448 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9449 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009450 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009451 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009452 # No framework, use the Python app as bundle-loader
9453 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009454 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009455 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009456 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009457 Darwin/*)
9458 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9459 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009460
Ned Deily36820b62014-06-25 13:44:22 -07009461 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9462 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9463 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9464 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9465 if test ${dep_target_major} -eq 10 && \
9466 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009467 then
Ned Deily36820b62014-06-25 13:44:22 -07009468 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009469 LDSHARED='$(CC) -bundle'
9470 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009471 if test "$enable_framework" ; then
9472 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009473 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9474 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009475 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009476 else
9477 # No framework, use the Python app as bundle-loader
9478 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9479 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009480 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009481 fi
Ned Deily36820b62014-06-25 13:44:22 -07009482 else
9483 # building for OS X 10.3 and later
9484 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9485 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9486 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009487 fi
9488 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009489 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009490 LDSHARED='$(CC) -shared'
9491 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009492 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009493 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009494 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009495 LDSHARED='$(CC) -shared'
9496 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009497 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009498 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009499 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009500 OpenBSD*)
9501 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9502 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009503 LDSHARED='$(CC) -shared $(CCSHARED)'
9504 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009505 else
9506 case `uname -r` in
9507 [01].* | 2.[0-7] | 2.[0-7].*)
9508 LDSHARED="ld -Bshareable ${LDFLAGS}"
9509 ;;
9510 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009511 LDSHARED='$(CC) -shared $(CCSHARED)'
9512 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009513 ;;
9514 esac
9515 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009516 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009517 LDSHARED='$(CC) -shared'
9518 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009519 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009520 if test "$GCC" = "yes" ; then
9521 LDSHARED='$(CC) -shared'
9522 LDCXXSHARED='$(CXX) -shared'
9523 else
9524 LDSHARED='$(CC) -G'
9525 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009526 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009527 SCO_SV*)
9528 LDSHARED='$(CC) -Wl,-G,-Bexport'
9529 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9530 CYGWIN*)
9531 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9532 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009533 *) LDSHARED="ld";;
9534 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9537$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009538LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009539BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009540# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009541# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9543$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009544if test -z "$CCSHARED"
9545then
Guido van Rossum07397971997-04-29 21:49:50 +00009546 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009547 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009548 then CCSHARED="-fPIC";
9549 elif test `uname -p` = sparc;
9550 then CCSHARED="-xcode=pic32";
9551 else CCSHARED="-Kpic";
9552 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009553 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009554 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009555 else CCSHARED="+z";
9556 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009557 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009558 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009559 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009560 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009561 if test "$GCC" = "yes"
9562 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009563 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009564 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009565 SCO_SV*)
9566 if test "$GCC" = "yes"
9567 then CCSHARED="-fPIC"
9568 else CCSHARED="-Kpic -belf"
9569 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009570 VxWorks*)
9571 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009572 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9575$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009576# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009577# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9579$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009580if test -z "$LINKFORSHARED"
9581then
Guido van Rossum07397971997-04-29 21:49:50 +00009582 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009583 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009584 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009585 LINKFORSHARED="-Wl,-E -Wl,+s";;
9586# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009587 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009588 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009589 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009591 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009592
9593 # Issue #18075: the default maximum stack size (8MBytes) is too
9594 # small for the default recursion limit. Increase the stack size
9595 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009596 # Note: This matches the value of THREAD_STACK_SIZE in
9597 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009598 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9599
Jack Jansene578a632001-08-15 01:27:14 +00009600 if test "$enable_framework"
9601 then
Jack Jansenda49e192005-01-07 13:08:22 +00009602 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009603 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009604 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009605 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009606 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009607 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009608 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009609 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9610 then
9611 LINKFORSHARED="-Wl,--export-dynamic"
9612 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009613 SunOS/5*) case $CC in
9614 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009615 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009616 then
9617 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009618 fi;;
9619 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009620 CYGWIN*)
9621 if test $enable_shared = "no"
9622 then
9623 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9624 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009625 QNX*)
9626 # -Wl,-E causes the symbols to be added to the dynamic
9627 # symbol table so that they can be found when a module
9628 # is loaded. -N 2048K causes the stack size to be set
9629 # to 2048 kilobytes so that the stack doesn't overflow
9630 # when running test_compile.py.
9631 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009632 VxWorks*)
9633 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009634 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9637$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009638
Michael W. Hudson54241132001-12-07 15:38:26 +00009639
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009640
Matthias Kloseb9621712010-04-24 17:59:49 +00009641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9642$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009643if test ! "$LIBRARY" = "$LDLIBRARY"
9644then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009645 case $ac_sys_system in
9646 CYGWIN*)
9647 # Cygwin needs CCSHARED when building extension DLLs
9648 # but not when building the interpreter DLL.
9649 CFLAGSFORSHARED='';;
9650 *)
9651 CFLAGSFORSHARED='$(CCSHARED)'
9652 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9655$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009656
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009657# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9658# library (with --enable-shared).
9659# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009660# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9661# if it is not required, since it creates a dependency of the shared library
9662# to LIBS. This, in turn, means that applications linking the shared libpython
9663# don't need to link LIBS explicitly. The default should be only changed
9664# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009665
Matthias Kloseb9621712010-04-24 17:59:49 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9667$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009668case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009669 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009670 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009671esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9673$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009674
9675
Guido van Rossum627b2d71993-12-24 10:39:16 +00009676# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9678$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009679if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009680 $as_echo_n "(cached) " >&6
9681else
9682 ac_check_lib_save_LIBS=$LIBS
9683LIBS="-lsendfile $LIBS"
9684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9685/* end confdefs.h. */
9686
9687/* Override any GCC internal prototype to avoid an error.
9688 Use char because int might match the return type of a GCC
9689 builtin and then its argument prototype would still apply. */
9690#ifdef __cplusplus
9691extern "C"
9692#endif
9693char sendfile ();
9694int
9695main ()
9696{
9697return sendfile ();
9698 ;
9699 return 0;
9700}
9701_ACEOF
9702if ac_fn_c_try_link "$LINENO"; then :
9703 ac_cv_lib_sendfile_sendfile=yes
9704else
9705 ac_cv_lib_sendfile_sendfile=no
9706fi
9707rm -f core conftest.err conftest.$ac_objext \
9708 conftest$ac_exeext conftest.$ac_ext
9709LIBS=$ac_check_lib_save_LIBS
9710fi
9711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9712$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009713if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009714 cat >>confdefs.h <<_ACEOF
9715#define HAVE_LIBSENDFILE 1
9716_ACEOF
9717
9718 LIBS="-lsendfile $LIBS"
9719
9720fi
9721
Matthias Kloseb9621712010-04-24 17:59:49 +00009722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9723$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009724if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009726else
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009728LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009730/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732/* Override any GCC internal prototype to avoid an error.
9733 Use char because int might match the return type of a GCC
9734 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009735#ifdef __cplusplus
9736extern "C"
9737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009738char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009739int
9740main ()
9741{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ;
9744 return 0;
9745}
9746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009747if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009749else
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009752rm -f core conftest.err conftest.$ac_objext \
9753 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009754LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9757$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009758if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 cat >>confdefs.h <<_ACEOF
9760#define HAVE_LIBDL 1
9761_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009762
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009763 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009764
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009765fi
9766 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9768$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009769if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009770 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009771else
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009773LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777/* Override any GCC internal prototype to avoid an error.
9778 Use char because int might match the return type of a GCC
9779 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009780#ifdef __cplusplus
9781extern "C"
9782#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009783char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009784int
9785main ()
9786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009788 ;
9789 return 0;
9790}
9791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009792if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009794else
Matthias Kloseb9621712010-04-24 17:59:49 +00009795 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009797rm -f core conftest.err conftest.$ac_objext \
9798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009799LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9802$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009803if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 cat >>confdefs.h <<_ACEOF
9805#define HAVE_LIBDLD 1
9806_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009807
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009808 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009809
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009810fi
9811 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009812
Michael Felt0d3ccb42017-12-30 22:39:20 +01009813# checks for uuid.h location
9814for ac_header in uuid/uuid.h uuid.h
9815do :
9816 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9817ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9818if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9819 cat >>confdefs.h <<_ACEOF
9820#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9821_ACEOF
9822
9823fi
9824
9825done
9826
9827
Berker Peksag9a10ff42017-11-08 23:09:16 +03009828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9829$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9831/* end confdefs.h. */
9832#include <uuid/uuid.h>
9833int
9834main ()
9835{
9836
9837#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009838void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009839#endif
9840
9841 ;
9842 return 0;
9843}
9844_ACEOF
9845if ac_fn_c_try_compile "$LINENO"; then :
9846
9847$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9848
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9850$as_echo "yes" >&6; }
9851else
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853$as_echo "no" >&6; }
9854
9855fi
9856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9857
Michael Felt0d3ccb42017-12-30 22:39:20 +01009858# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009859# FreeBSD and OpenBSD provides support as well
9860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9861$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9863/* end confdefs.h. */
9864#include <uuid.h>
9865int
9866main ()
9867{
9868
9869#ifndef uuid_create
9870void *x = uuid_create
9871#endif
9872
9873 ;
9874 return 0;
9875}
9876_ACEOF
9877if ac_fn_c_try_compile "$LINENO"; then :
9878
9879$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9880
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9882$as_echo "yes" >&6; }
9883else
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9885$as_echo "no" >&6; }
9886
9887fi
9888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9889
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009890# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9891# stream in big-endian byte-order
9892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9893$as_echo_n "checking for uuid_enc_be... " >&6; }
9894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9895/* end confdefs.h. */
9896#include <uuid.h>
9897int
9898main ()
9899{
9900
9901#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009902void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009903#endif
9904
9905 ;
9906 return 0;
9907}
9908_ACEOF
9909if ac_fn_c_try_compile "$LINENO"; then :
9910
9911$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9912
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9914$as_echo "yes" >&6; }
9915else
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9917$as_echo "no" >&6; }
9918
9919fi
9920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9921
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009922# 'Real Time' functions on Solaris
9923# posix4 on Solaris 2.6
9924# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009926$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009927if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009929else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009930 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934/* Override any GCC internal prototype to avoid an error.
9935 Use char because int might match the return type of a GCC
9936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009937#ifdef __cplusplus
9938extern "C"
9939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009940char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009941int
9942main ()
9943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 ;
9946 return 0;
9947}
9948_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949for ac_lib in '' pthread rt posix4; do
9950 if test -z "$ac_lib"; then
9951 ac_res="none required"
9952 else
9953 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009954 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009955 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009957 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009959rm -f core conftest.err conftest.$ac_objext \
9960 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009961 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009962 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009964done
Victor Stinnere0be4232011-10-25 13:06:09 +02009965if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967else
9968 ac_cv_search_sem_init=no
9969fi
9970rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009971LIBS=$ac_func_search_save_LIBS
9972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9974$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009976if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009978
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009979fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009980
Martin v. Löwis519adae2003-09-20 10:47:47 +00009981
Martin v. Löwis19d17342003-06-14 21:03:05 +00009982# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9984$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009985if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009987else
9988 ac_check_lib_save_LIBS=$LIBS
9989LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009991/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009993/* Override any GCC internal prototype to avoid an error.
9994 Use char because int might match the return type of a GCC
9995 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009996#ifdef __cplusplus
9997extern "C"
9998#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009999char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010000int
10001main ()
10002{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010003return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010004 ;
10005 return 0;
10006}
10007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010008if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010009 ac_cv_lib_intl_textdomain=yes
10010else
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010013rm -f core conftest.err conftest.$ac_objext \
10014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010015LIBS=$ac_check_lib_save_LIBS
10016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10018$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010019if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010020
Matthias Kloseb9621712010-04-24 17:59:49 +000010021$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010022
Brett Cannonc6d936e2009-06-07 20:09:53 +000010023 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010024fi
10025
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010026
10027# checks for system dependent C++ extensions support
10028case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010029 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10030$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010032/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010033
Georg Brandl59e87bd2011-02-15 19:48:59 +000010034 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010035int
10036main ()
10037{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010038loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010039 ;
10040 return 0;
10041}
Matthias Kloseb159a552010-04-25 21:00:44 +000010042
Martin v. Löwis11437992002-04-12 09:54:03 +000010043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010044if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010045
Matthias Kloseb159a552010-04-25 21:00:44 +000010046
Matthias Kloseb9621712010-04-24 17:59:49 +000010047$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010048
Matthias Kloseb159a552010-04-25 21:00:44 +000010049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010050$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010051
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010052else
Matthias Kloseb159a552010-04-25 21:00:44 +000010053
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010055$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010056
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010058rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010059 conftest$ac_exeext conftest.$ac_ext
10060# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10061# of the AIX system used to build/package Python executable. This tag serves
10062# as a baseline for bdist module packages
10063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10064$as_echo_n "checking for the system builddate... " >&6; }
10065 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10066
10067cat >>confdefs.h <<_ACEOF
10068#define AIX_BUILDDATE $AIX_BUILDDATE
10069_ACEOF
10070
10071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10072$as_echo "$AIX_BUILDDATE" >&6; }
10073 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010074 *) ;;
10075esac
10076
Christian Heimes985ecdc2013-11-20 11:46:18 +010010077# check for systems that require aligned memory access
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10079$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010080if ${ac_cv_aligned_required+:} false; then :
10081 $as_echo_n "(cached) " >&6
10082else
10083 if test "$cross_compiling" = yes; then :
10084 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010085else
10086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10087/* end confdefs.h. */
10088
10089int main()
10090{
10091 char s[16];
10092 int i, *p1, *p2;
10093 for (i=0; i < 16; i++)
10094 s[i] = i;
10095 p1 = (int*)(s+1);
10096 p2 = (int*)(s+2);
10097 if (*p1 == *p2)
10098 return 1;
10099 return 0;
10100}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010101_ACEOF
10102if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010103 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010104else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010105 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010106fi
10107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10108 conftest.$ac_objext conftest.beam conftest.$ac_ext
10109fi
10110
10111
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010112fi
10113
10114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10115$as_echo "$ac_cv_aligned_required" >&6; }
10116if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010117
10118$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10119
10120fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010121
10122# str, bytes and memoryview hash algorithm
10123
10124
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10126$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10127
10128# Check whether --with-hash_algorithm was given.
10129if test "${with_hash_algorithm+set}" = set; then :
10130 withval=$with_hash_algorithm;
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10132$as_echo "$withval" >&6; }
10133case "$withval" in
10134 siphash24)
10135 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10136
10137 ;;
10138 fnv)
10139 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10140
10141 ;;
10142 *)
10143 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10144 ;;
10145esac
10146
10147else
10148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10149$as_echo "default" >&6; }
10150fi
10151
10152
Charles-François Natalid30b0222014-05-08 23:08:51 +010010153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10154$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10155
10156# Check whether --with-address_sanitizer was given.
10157if test "${with_address_sanitizer+set}" = set; then :
10158 withval=$with_address_sanitizer;
10159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10160$as_echo "$withval" >&6; }
10161BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10162LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010163# ASan works by controlling memory allocation, our own malloc interferes.
10164with_pymalloc="no"
10165
10166else
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10168$as_echo "no" >&6; }
10169fi
10170
10171
10172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10173$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10174
10175# Check whether --with-memory_sanitizer was given.
10176if test "${with_memory_sanitizer+set}" = set; then :
10177 withval=$with_memory_sanitizer;
10178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10179$as_echo "$withval" >&6; }
10180BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10181LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10182# MSan works by controlling memory allocation, our own malloc interferes.
10183with_pymalloc="no"
10184
10185else
10186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10187$as_echo "no" >&6; }
10188fi
10189
10190
10191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10192$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10193
10194# Check whether --with-undefined_behavior_sanitizer was given.
10195if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10196 withval=$with_undefined_behavior_sanitizer;
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10198$as_echo "$withval" >&6; }
10199BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10200LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010201
10202else
10203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10204$as_echo "no" >&6; }
10205fi
10206
10207
Guido van Rossum70c7f481998-03-26 18:44:10 +000010208# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10210$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010211if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010213else
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010215LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219/* Override any GCC internal prototype to avoid an error.
10220 Use char because int might match the return type of a GCC
10221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010222#ifdef __cplusplus
10223extern "C"
10224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010225char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010226int
10227main ()
10228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 ;
10231 return 0;
10232}
10233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010236else
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010239rm -f core conftest.err conftest.$ac_objext \
10240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010241LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10244$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010245if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010246 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010247fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010248 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10250$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010251if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010253else
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010255LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259/* Override any GCC internal prototype to avoid an error.
10260 Use char because int might match the return type of a GCC
10261 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010262#ifdef __cplusplus
10263extern "C"
10264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010265char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010266int
10267main ()
10268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 ;
10271 return 0;
10272}
10273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010274if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010276else
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010279rm -f core conftest.err conftest.$ac_objext \
10280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010281LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10284$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010285if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010286 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010287fi
10288 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010289
Matthias Kloseb9621712010-04-24 17:59:49 +000010290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10291$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010294if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10297$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010298LIBS="$withval $LIBS"
10299
10300else
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303fi
10304
Guido van Rossum7f43da71994-08-01 12:15:30 +000010305
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010306
10307
10308
10309
10310
10311
Victor Stinnerb477d192020-01-22 22:48:16 +010010312
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010313if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10314 if test -n "$ac_tool_prefix"; then
10315 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10316set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10318$as_echo_n "checking for $ac_word... " >&6; }
10319if ${ac_cv_path_PKG_CONFIG+:} false; then :
10320 $as_echo_n "(cached) " >&6
10321else
10322 case $PKG_CONFIG in
10323 [\\/]* | ?:[\\/]*)
10324 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10325 ;;
10326 *)
10327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10328for as_dir in $PATH
10329do
10330 IFS=$as_save_IFS
10331 test -z "$as_dir" && as_dir=.
10332 for ac_exec_ext in '' $ac_executable_extensions; do
10333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10334 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10336 break 2
10337 fi
10338done
10339 done
10340IFS=$as_save_IFS
10341
10342 ;;
10343esac
10344fi
10345PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10346if test -n "$PKG_CONFIG"; then
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10348$as_echo "$PKG_CONFIG" >&6; }
10349else
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10351$as_echo "no" >&6; }
10352fi
10353
10354
10355fi
10356if test -z "$ac_cv_path_PKG_CONFIG"; then
10357 ac_pt_PKG_CONFIG=$PKG_CONFIG
10358 # Extract the first word of "pkg-config", so it can be a program name with args.
10359set dummy pkg-config; ac_word=$2
10360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10361$as_echo_n "checking for $ac_word... " >&6; }
10362if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10363 $as_echo_n "(cached) " >&6
10364else
10365 case $ac_pt_PKG_CONFIG in
10366 [\\/]* | ?:[\\/]*)
10367 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10368 ;;
10369 *)
10370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10371for as_dir in $PATH
10372do
10373 IFS=$as_save_IFS
10374 test -z "$as_dir" && as_dir=.
10375 for ac_exec_ext in '' $ac_executable_extensions; do
10376 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10377 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10379 break 2
10380 fi
10381done
10382 done
10383IFS=$as_save_IFS
10384
10385 ;;
10386esac
10387fi
10388ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10389if test -n "$ac_pt_PKG_CONFIG"; then
10390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10391$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10392else
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
10395fi
10396
10397 if test "x$ac_pt_PKG_CONFIG" = x; then
10398 PKG_CONFIG=""
10399 else
10400 case $cross_compiling:$ac_tool_warned in
10401yes:)
10402{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10403$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10404ac_tool_warned=yes ;;
10405esac
10406 PKG_CONFIG=$ac_pt_PKG_CONFIG
10407 fi
10408else
10409 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10410fi
10411
10412fi
10413if test -n "$PKG_CONFIG"; then
10414 _pkg_min_version=0.9.0
10415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10416$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10417 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10419$as_echo "yes" >&6; }
10420 else
10421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10422$as_echo "no" >&6; }
10423 PKG_CONFIG=""
10424 fi
10425fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010426
10427# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10429$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010430
10431# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010432if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010433 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010434else
10435 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010436fi
10437
10438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10440$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010441
10442# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10444$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010445
10446# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010447if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010448 withval=$with_system_ffi;
10449fi
10450
10451
Zachary Waref40d4dd2016-09-17 01:25:24 -050010452if test "$ac_sys_system" = "Darwin"
10453then
10454 case "$with_system_ffi" in
10455 "")
10456 with_system_ffi="no"
10457 ;;
10458 yes|no)
10459 ;;
10460 *)
10461 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10462 ;;
10463 esac
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10465$as_echo "$with_system_ffi" >&6; }
10466else
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10468$as_echo "yes" >&6; }
10469 if test "$with_system_ffi" != ""
10470 then
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10472$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10473 fi
10474 with_system_ffi="yes"
10475fi
Zachary Ware935043d2016-09-09 17:01:21 -070010476
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010477if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010478 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10479else
10480 LIBFFI_INCLUDEDIR=""
10481fi
10482
10483
Stefan Krah60187b52012-03-23 19:06:27 +010010484# Check for use of the system libmpdec library
10485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10486$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10487
10488# Check whether --with-system_libmpdec was given.
10489if test "${with_system_libmpdec+set}" = set; then :
10490 withval=$with_system_libmpdec;
10491else
10492 with_system_libmpdec="no"
10493fi
10494
10495
10496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10497$as_echo "$with_system_libmpdec" >&6; }
10498
Stefan Krah815280e2020-02-29 19:43:42 +010010499# Check whether _decimal should use a coroutine-local or thread-local context
10500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10501$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10502
10503# Check whether --with-decimal_contextvar was given.
10504if test "${with_decimal_contextvar+set}" = set; then :
10505 withval=$with_decimal_contextvar;
10506else
10507 with_decimal_contextvar="yes"
10508fi
10509
10510
10511if test "$with_decimal_contextvar" != "no"
10512then
10513
10514$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10515
10516fi
10517
10518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10519$as_echo "$with_decimal_contextvar" >&6; }
10520
Benjamin Peterson076ed002010-10-31 17:11:02 +000010521# Check for support for loadable sqlite extensions
10522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10523$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10524# Check whether --enable-loadable-sqlite-extensions was given.
10525if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10526 enableval=$enable_loadable_sqlite_extensions;
10527else
10528 enable_loadable_sqlite_extensions="no"
10529fi
10530
10531
10532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10533$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10534
Ned Deilyd819b932013-09-06 01:07:05 -070010535# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10536
10537
10538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10539$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10540
10541# Check whether --with-tcltk-includes was given.
10542if test "${with_tcltk_includes+set}" = set; then :
10543 withval=$with_tcltk_includes;
10544else
10545 with_tcltk_includes="default"
10546fi
10547
10548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10549$as_echo "$with_tcltk_includes" >&6; }
10550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10551$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10552
10553# Check whether --with-tcltk-libs was given.
10554if test "${with_tcltk_libs+set}" = set; then :
10555 withval=$with_tcltk_libs;
10556else
10557 with_tcltk_libs="default"
10558fi
10559
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10561$as_echo "$with_tcltk_libs" >&6; }
10562if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10563then
10564 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10565 then
10566 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10567 fi
10568 TCLTK_INCLUDES=""
10569 TCLTK_LIBS=""
10570else
10571 TCLTK_INCLUDES="$with_tcltk_includes"
10572 TCLTK_LIBS="$with_tcltk_libs"
10573fi
10574
Matthias Klose55708cc2009-04-30 08:06:49 +000010575# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10577$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010578
10579# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010580if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010581 withval=$with_dbmliborder;
10582if test x$with_dbmliborder = xyes
10583then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010584as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010585else
10586 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10587 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10588 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010589 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010590 fi
10591 done
10592fi
10593fi
10594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10596$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010597
Martin v. Löwis11437992002-04-12 09:54:03 +000010598# Templates for things AC_DEFINEd more than once.
10599# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010600
10601
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010602if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010603then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010604 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010605 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010606
10607 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010608 if test "$ac_sys_system" = "SunOS"; then
10609 CFLAGS="$CFLAGS -D_REENTRANT"
10610 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010611elif test "$ac_cv_kpthread" = "yes"
10612then
10613 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010614 if test "$ac_cv_cxx_thread" = "yes"; then
10615 CXX="$CXX -Kpthread"
10616 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010617 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010618elif test "$ac_cv_kthread" = "yes"
10619then
10620 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010621 if test "$ac_cv_cxx_thread" = "yes"; then
10622 CXX="$CXX -Kthread"
10623 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010624 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010625elif test "$ac_cv_pthread" = "yes"
10626then
10627 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010628 if test "$ac_cv_cxx_thread" = "yes"; then
10629 CXX="$CXX -pthread"
10630 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010631 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010632else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010633 if test ! -z "$withval" -a -d "$withval"
10634 then LDFLAGS="$LDFLAGS -L$withval"
10635 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010636
10637 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010638 # define _POSIX_THREADS in unistd.h. Some apparently don't
10639 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10641$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010643/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010644
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010645#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010646#ifdef _POSIX_THREADS
10647yes
10648#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010649
10650_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010653 unistd_defines_pthreads=yes
10654else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010655 unistd_defines_pthreads=no
10656fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010657rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010658
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10660$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010661
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010663
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010664 # Just looking for pthread_create in libpthread is not enough:
10665 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10666 # So we really have to include pthread.h, and then link.
10667 _libs=$LIBS
10668 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10670$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010672/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010673
10674#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010675#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010676
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010677void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010678int
10679main ()
10680{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010681
10682pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010683 ;
10684 return 0;
10685}
10686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010687if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010688
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10690$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010691 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010692
Guido van Rossum02a1c402000-02-25 19:26:31 +000010693else
Martin v. Löwis11437992002-04-12 09:54:03 +000010694
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010695 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010697if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010698
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010699 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010700
Guido van Rossumad678af1998-10-02 14:42:15 +000010701else
Guido van Rossumad678af1998-10-02 14:42:15 +000010702
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10704$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010705if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010707else
Martin v. Löwis11437992002-04-12 09:54:03 +000010708 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010709LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713/* Override any GCC internal prototype to avoid an error.
10714 Use char because int might match the return type of a GCC
10715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010716#ifdef __cplusplus
10717extern "C"
10718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010719char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010720int
10721main ()
10722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010724 ;
10725 return 0;
10726}
10727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010730else
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010733rm -f core conftest.err conftest.$ac_objext \
10734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010735LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10738$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010739if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010740
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010741 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010742 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010743
Greg Steinadf63d62000-07-05 10:38:09 +000010744else
Greg Steinadf63d62000-07-05 10:38:09 +000010745
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10747$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010748if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010750else
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010752LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010756/* Override any GCC internal prototype to avoid an error.
10757 Use char because int might match the return type of a GCC
10758 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010759#ifdef __cplusplus
10760extern "C"
10761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010762char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010763int
10764main ()
10765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010766return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010767 ;
10768 return 0;
10769}
10770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010771if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010772 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010773else
Matthias Kloseb9621712010-04-24 17:59:49 +000010774 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010776rm -f core conftest.err conftest.$ac_objext \
10777 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010778LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10781$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010782if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010783
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010784 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010785 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010786
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010787else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010788
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10790$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010791if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010793else
Martin v. Löwis11437992002-04-12 09:54:03 +000010794 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010795LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010799/* Override any GCC internal prototype to avoid an error.
10800 Use char because int might match the return type of a GCC
10801 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010802#ifdef __cplusplus
10803extern "C"
10804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010805char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010806int
10807main ()
10808{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010809return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010810 ;
10811 return 0;
10812}
10813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010814if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010816else
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010819rm -f core conftest.err conftest.$ac_objext \
10820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010821LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10824$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010825if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010826
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010827 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010828 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010829
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010830else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010831
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10833$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010834if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010836else
Martin v. Löwis11437992002-04-12 09:54:03 +000010837 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010838LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842/* Override any GCC internal prototype to avoid an error.
10843 Use char because int might match the return type of a GCC
10844 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010845#ifdef __cplusplus
10846extern "C"
10847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010848char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010849int
10850main ()
10851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010852return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010853 ;
10854 return 0;
10855}
10856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010857if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010858 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010859else
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010862rm -f core conftest.err conftest.$ac_objext \
10863 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010864LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10867$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010868if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010869
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010870 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010871 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010872
Guido van Rossumb93a8621998-05-07 13:27:32 +000010873else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010874
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010875 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10876
Guido van Rossum2d38f911996-06-26 19:47:01 +000010877fi
10878
Guido van Rossum627b2d71993-12-24 10:39:16 +000010879
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010880fi
10881
Guido van Rossum0be3e491997-05-22 20:33:33 +000010882fi
10883
Guido van Rossum49545951997-12-02 19:28:29 +000010884fi
10885
Guido van Rossumb93a8621998-05-07 13:27:32 +000010886fi
10887
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010889rm -f core conftest.err conftest.$ac_objext \
10890 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10893$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010894if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010896else
Martin v. Löwis11437992002-04-12 09:54:03 +000010897 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010898LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010902/* Override any GCC internal prototype to avoid an error.
10903 Use char because int might match the return type of a GCC
10904 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010905#ifdef __cplusplus
10906extern "C"
10907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010908char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010909int
10910main ()
10911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010912return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 ;
10914 return 0;
10915}
10916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010917if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010919else
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010922rm -f core conftest.err conftest.$ac_objext \
10923 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010924LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10927$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010928if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010929
Martin v. Löwis130fb172001-07-19 11:00:41 +000010930 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010931
Guido van Rossum627b2d71993-12-24 10:39:16 +000010932fi
10933
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010934
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010935fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010936
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010937if test "$posix_threads" = "yes"; then
10938 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010941
10942 fi
10943
10944 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10945 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010946 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010947$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010948
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010949 ;;
10950 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010951$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010952
10953 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010954 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010955$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010956
10957 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010958 esac
10959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10961$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010962 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010963 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010964else
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010966 ac_cv_pthread_system_supported=no
10967else
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010969/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010970
10971 #include <stdio.h>
10972 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010973 void *foo(void *parm) {
10974 return NULL;
10975 }
10976 main() {
10977 pthread_attr_t attr;
10978 pthread_t id;
10979 if (pthread_attr_init(&attr)) exit(-1);
10980 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10981 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10982 exit(0);
10983 }
10984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010985if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010986 ac_cv_pthread_system_supported=yes
10987else
Matthias Kloseb9621712010-04-24 17:59:49 +000010988 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10991 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010992fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994
Guido van Rossum627b2d71993-12-24 10:39:16 +000010995fi
10996
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10998$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010999 if test "$ac_cv_pthread_system_supported" = "yes"; then
11000
Matthias Kloseb9621712010-04-24 17:59:49 +000011001$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011002
11003 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011004 for ac_func in pthread_sigmask
11005do :
11006 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011007if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011008 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011009#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011010_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011011 case $ac_sys_system in
11012 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011015
11016 ;;
11017 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011018fi
11019done
11020
pdoxe14679c2017-10-05 00:01:56 -070011021 for ac_func in pthread_getcpuclockid
11022do :
11023 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11024if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11025 cat >>confdefs.h <<_ACEOF
11026#define HAVE_PTHREAD_GETCPUCLOCKID 1
11027_ACEOF
11028
11029fi
11030done
11031
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011032fi
11033
11034
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011035# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011036
Matthias Kloseb9621712010-04-24 17:59:49 +000011037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11038$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011039# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011040if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11044$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045 ipv6=no
11046 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11048$as_echo "yes" >&6; }
11049 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050
11051 ipv6=yes
11052 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011054else
Martin v. Löwis11437992002-04-12 09:54:03 +000011055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011057/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058 /* AF_INET6 available check */
11059#include <sys/types.h>
11060#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011061int
11062main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011063{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011064int domain = AF_INET6;
11065 ;
11066 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067}
Martin v. Löwis11437992002-04-12 09:54:03 +000011068_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011069if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011070
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11072$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011074
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075else
Matthias Kloseb159a552010-04-25 21:00:44 +000011076
Matthias Kloseb9621712010-04-24 17:59:49 +000011077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11078$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011079 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011080
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011081fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011083
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011084if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11086$as_echo_n "checking if RFC2553 API is available... " >&6; }
11087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011088/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011089
11090 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011091#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011092int
11093main ()
11094{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011095struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011096 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 ;
11098 return 0;
11099}
Matthias Kloseb159a552010-04-25 21:00:44 +000011100
Martin v. Löwis11437992002-04-12 09:54:03 +000011101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011102if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011103
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011105$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011106 ipv6=yes
11107
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011108else
Matthias Kloseb159a552010-04-25 21:00:44 +000011109
11110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011111$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011112 ipv6=no
11113
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011116fi
11117
11118if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011120
11121fi
11122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123fi
11124
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125
11126ipv6type=unknown
11127ipv6lib=none
11128ipv6trylibc=no
11129
11130if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11132$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011133 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11134 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011135 case $i in
11136 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011138/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011139
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140#include <netinet/in.h>
11141#ifdef IPV6_INRIA_VERSION
11142yes
11143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011144_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011147 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011148fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011149rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011150
11151 ;;
11152 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011154/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011155
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011156#include <netinet/in.h>
11157#ifdef __KAME__
11158yes
11159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011160_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011162 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011163 ipv6type=$i;
11164 ipv6lib=inet6
11165 ipv6libdir=/usr/local/v6/lib
11166 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011167fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011168rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011169
11170 ;;
11171 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011173/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011174
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011175#include <features.h>
11176#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11177yes
11178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011179_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011182 ipv6type=$i;
11183 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011184fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011185rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011186
11187 ;;
11188 linux-inet6)
11189 if test -d /usr/inet6; then
11190 ipv6type=$i
11191 ipv6lib=inet6
11192 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011193 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011194 fi
11195 ;;
11196 solaris)
11197 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011198 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011199 ipv6type=$i
11200 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011201 fi
11202 fi
11203 ;;
11204 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011206/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011207
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011208#include <sys/param.h>
11209#ifdef _TOSHIBA_INET6
11210yes
11211#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011212_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011213if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011214 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011215 ipv6type=$i;
11216 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011217 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011218fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011219rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011220
11221 ;;
11222 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011224/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011225
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011226#include </usr/local/v6/include/sys/v6config.h>
11227#ifdef __V6D__
11228yes
11229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011230_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011231if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011233 ipv6type=$i;
11234 ipv6lib=v6;
11235 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011236 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011237fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011238rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011239
11240 ;;
11241 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011243/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011244
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011245#include <sys/param.h>
11246#ifdef _ZETA_MINAMI_INET6
11247yes
11248#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011249_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011251 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011252 ipv6type=$i;
11253 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011254 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011255fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011256rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011257
11258 ;;
11259 esac
11260 if test "$ipv6type" != "unknown"; then
11261 break
11262 fi
11263 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11265$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011266fi
11267
11268if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11269 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11270 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11271 echo "using lib$ipv6lib"
11272 else
11273 if test $ipv6trylibc = "yes"; then
11274 echo "using libc"
11275 else
11276 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11277 echo "You need to fetch lib$ipv6lib.a from appropriate"
11278 echo 'ipv6 kit and compile beforehand.'
11279 exit 1
11280 fi
11281 fi
11282fi
11283
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11285$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11287/* end confdefs.h. */
11288 /* CAN_RAW_FD_FRAMES available check */
11289#include <linux/can/raw.h>
11290int
11291main ()
11292{
11293int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11294 ;
11295 return 0;
11296}
11297_ACEOF
11298if ac_fn_c_try_compile "$LINENO"; then :
11299
11300
11301$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11302
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11304$as_echo "yes" >&6; }
11305
11306else
11307
11308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
11310
11311fi
11312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11313
Zackery Spytz97e0de02020-04-09 06:03:49 -060011314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11315$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11317/* end confdefs.h. */
11318
11319#include <linux/can/raw.h>
11320int
11321main ()
11322{
11323int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11324 ;
11325 return 0;
11326}
11327_ACEOF
11328if ac_fn_c_try_compile "$LINENO"; then :
11329
11330
11331$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11332
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11334$as_echo "yes" >&6; }
11335
11336else
11337
11338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11339$as_echo "no" >&6; }
11340
11341fi
11342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11343
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011344# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11346$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011348# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011349if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350 withval=$with_doc_strings;
11351fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011352
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011353
11354if test -z "$with_doc_strings"
11355then with_doc_strings="yes"
11356fi
11357if test "$with_doc_strings" != "no"
11358then
11359
Matthias Kloseb9621712010-04-24 17:59:49 +000011360$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011361
11362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11364$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011365
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011366# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11368$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011371if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011372 withval=$with_pymalloc;
11373fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011374
Neil Schemenauera35c6882001-02-27 04:45:05 +000011375
Neil Schemenauer16c22972002-03-22 15:34:49 +000011376if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011377then
11378 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011379fi
11380if test "$with_pymalloc" != "no"
11381then
Martin v. Löwis11437992002-04-12 09:54:03 +000011382
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011384
11385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11387$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011388
Nick Coghlan6ea41862017-06-11 13:16:15 +100011389# Check for --with-c-locale-coercion
11390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11391$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11392
11393# Check whether --with-c-locale-coercion was given.
11394if test "${with_c_locale_coercion+set}" = set; then :
11395 withval=$with_c_locale_coercion;
11396fi
11397
11398
11399if test -z "$with_c_locale_coercion"
11400then
11401 with_c_locale_coercion="yes"
11402fi
11403if test "$with_c_locale_coercion" != "no"
11404then
11405
11406$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11407
11408fi
11409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11410$as_echo "$with_c_locale_coercion" >&6; }
11411
Benjamin Peterson05159c42009-12-03 03:01:27 +000011412# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11414$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011415
11416# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011417if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011418 withval=$with_valgrind;
11419else
11420 with_valgrind=no
11421fi
11422
Matthias Kloseb9621712010-04-24 17:59:49 +000011423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11424$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011425if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011426 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 +020011427if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011428
Matthias Kloseb9621712010-04-24 17:59:49 +000011429$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011430
11431else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011432 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011433
11434fi
11435
11436
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011437 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011438fi
11439
Łukasz Langaa785c872016-09-09 17:37:37 -070011440# Check for DTrace support
11441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11442$as_echo_n "checking for --with-dtrace... " >&6; }
11443
11444# Check whether --with-dtrace was given.
11445if test "${with_dtrace+set}" = set; then :
11446 withval=$with_dtrace;
11447else
11448 with_dtrace=no
11449fi
11450
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11452$as_echo "$with_dtrace" >&6; }
11453
11454
11455
11456
11457
11458DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011459DTRACE_HEADERS=
11460DTRACE_OBJS=
11461
11462if test "$with_dtrace" = "yes"
11463then
11464 # Extract the first word of "dtrace", so it can be a program name with args.
11465set dummy dtrace; ac_word=$2
11466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11467$as_echo_n "checking for $ac_word... " >&6; }
11468if ${ac_cv_path_DTRACE+:} false; then :
11469 $as_echo_n "(cached) " >&6
11470else
11471 case $DTRACE in
11472 [\\/]* | ?:[\\/]*)
11473 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11474 ;;
11475 *)
11476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11477for as_dir in $PATH
11478do
11479 IFS=$as_save_IFS
11480 test -z "$as_dir" && as_dir=.
11481 for ac_exec_ext in '' $ac_executable_extensions; do
11482 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11483 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11484 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11485 break 2
11486 fi
11487done
11488 done
11489IFS=$as_save_IFS
11490
11491 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11492 ;;
11493esac
11494fi
11495DTRACE=$ac_cv_path_DTRACE
11496if test -n "$DTRACE"; then
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11498$as_echo "$DTRACE" >&6; }
11499else
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11501$as_echo "no" >&6; }
11502fi
11503
11504
11505 if test "$DTRACE" = "not found"; then
11506 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11507 fi
11508
11509$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11510
11511 DTRACE_HEADERS="Include/pydtrace_probes.h"
11512
11513 # On OS X, DTrace providers do not need to be explicitly compiled and
11514 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11515 # generation flag '-G'. We check for presence of this flag, rather than
11516 # hardcoding support by OS, in the interest of robustness.
11517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11518$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11519if ${ac_cv_dtrace_link+:} false; then :
11520 $as_echo_n "(cached) " >&6
11521else
11522 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011523 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011524 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011525 ac_cv_dtrace_link=yes
11526
11527fi
11528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11529$as_echo "$ac_cv_dtrace_link" >&6; }
11530 if test "$ac_cv_dtrace_link" = "yes"; then
11531 DTRACE_OBJS="Python/pydtrace.o"
11532 fi
11533fi
11534
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011535# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011536
Guido van Rossum98935bf2001-09-05 19:13:16 +000011537DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011538
Guido van Rossume97ee181999-12-20 21:27:22 +000011539# the dlopen() function means we might want to use dynload_shlib.o. some
11540# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011541for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011542do :
11543 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011544if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011546#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011547_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011548
Guido van Rossume97ee181999-12-20 21:27:22 +000011549fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011550done
Guido van Rossume97ee181999-12-20 21:27:22 +000011551
Michael W. Hudson54241132001-12-07 15:38:26 +000011552
Guido van Rossume97ee181999-12-20 21:27:22 +000011553# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11554# loading of modules.
11555
Matthias Kloseb9621712010-04-24 17:59:49 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11557$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011558if test -z "$DYNLOADFILE"
11559then
11560 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011561 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11562 if test "$ac_cv_func_dlopen" = yes
11563 then DYNLOADFILE="dynload_shlib.o"
11564 else DYNLOADFILE="dynload_aix.o"
11565 fi
11566 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011567 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011568 *)
11569 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11570 # out any dynamic loading
11571 if test "$ac_cv_func_dlopen" = yes
11572 then DYNLOADFILE="dynload_shlib.o"
11573 else DYNLOADFILE="dynload_stub.o"
11574 fi
11575 ;;
11576 esac
11577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11579$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011580if test "$DYNLOADFILE" != "dynload_stub.o"
11581then
Martin v. Löwis11437992002-04-12 09:54:03 +000011582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011584
11585fi
11586
Neil Schemenauer4e425612001-06-19 15:44:15 +000011587# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11588
Michael W. Hudson54241132001-12-07 15:38:26 +000011589
Matthias Kloseb9621712010-04-24 17:59:49 +000011590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11591$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011592if test -z "$MACHDEP_OBJS"
11593then
Jack Jansene578a632001-08-15 01:27:14 +000011594 MACHDEP_OBJS=$extra_machdep_objs
11595else
11596 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011597fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011598if test -z "$MACHDEP_OBJS"; then
11599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11600$as_echo "none" >&6; }
11601else
11602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11603$as_echo "$MACHDEP_OBJS" >&6; }
11604fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011605
Guido van Rossum627b2d71993-12-24 10:39:16 +000011606# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011607for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011608 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11609 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011610 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011611 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011612 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011613 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011614 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011615 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011616 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011617 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011618 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011619 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011620 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011621 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011622 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011623 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011624 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011625 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11626 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011627 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011628 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011629 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011630 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011631 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011632do :
11633 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11634ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011635if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011636 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011637#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011638_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011639
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011640fi
11641done
11642
Michael W. Hudson54241132001-12-07 15:38:26 +000011643
Benjamin Peterson40caa052018-09-12 15:52:40 -070011644# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11645# links. Some libc implementations have a stub lchmod implementation that always
11646# returns an error.
11647if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011648 for ac_func in lchmod
11649do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011650 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11651if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011652 cat >>confdefs.h <<_ACEOF
11653#define HAVE_LCHMOD 1
11654_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011655
11656fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011657done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011658
11659fi
11660
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011661ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11662 #include <dirent.h>
11663"
11664if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11665
11666$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11667
11668fi
11669
11670
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011671# For some functions, having a definition is not sufficient, since
11672# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11674$as_echo_n "checking for chroot... " >&6; }
11675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011676/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011677#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011678int
11679main ()
11680{
11681void *x=chroot
11682 ;
11683 return 0;
11684}
11685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011686if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011689
Matthias Kloseb159a552010-04-25 21:00:44 +000011690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011691$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011692else
Matthias Kloseb9621712010-04-24 17:59:49 +000011693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11694$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011695
11696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11699$as_echo_n "checking for link... " >&6; }
11700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011701/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011702#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011703int
11704main ()
11705{
11706void *x=link
11707 ;
11708 return 0;
11709}
11710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011714
Matthias Kloseb159a552010-04-25 21:00:44 +000011715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011716$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011717else
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11719$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011720
11721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11724$as_echo_n "checking for symlink... " >&6; }
11725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011726/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011727#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011728int
11729main ()
11730{
11731void *x=symlink
11732 ;
11733 return 0;
11734}
11735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011736if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011737
Matthias Kloseb9621712010-04-24 17:59:49 +000011738$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011739
Matthias Kloseb159a552010-04-25 21:00:44 +000011740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011741$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011742else
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11744$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011745
11746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11749$as_echo_n "checking for fchdir... " >&6; }
11750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011751/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011752#include <unistd.h>
11753int
11754main ()
11755{
11756void *x=fchdir
11757 ;
11758 return 0;
11759}
11760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011764
Matthias Kloseb159a552010-04-25 21:00:44 +000011765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011766$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011767else
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11769$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011770
11771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11774$as_echo_n "checking for fsync... " >&6; }
11775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011776/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011777#include <unistd.h>
11778int
11779main ()
11780{
11781void *x=fsync
11782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011787
Matthias Kloseb9621712010-04-24 17:59:49 +000011788$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011789
Matthias Kloseb159a552010-04-25 21:00:44 +000011790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011791$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011792else
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11794$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011795
11796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11799$as_echo_n "checking for fdatasync... " >&6; }
11800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011801/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011802#include <unistd.h>
11803int
11804main ()
11805{
11806void *x=fdatasync
11807 ;
11808 return 0;
11809}
11810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011811if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011812
Matthias Kloseb9621712010-04-24 17:59:49 +000011813$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011814
Matthias Kloseb159a552010-04-25 21:00:44 +000011815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011816$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011817else
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11819$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011820
11821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11824$as_echo_n "checking for epoll... " >&6; }
11825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011826/* end confdefs.h. */
11827#include <sys/epoll.h>
11828int
11829main ()
11830{
11831void *x=epoll_create
11832 ;
11833 return 0;
11834}
11835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011836if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011837
Matthias Kloseb9621712010-04-24 17:59:49 +000011838$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011839
Matthias Kloseb159a552010-04-25 21:00:44 +000011840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011841$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011842else
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11844$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011845
11846fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11849$as_echo_n "checking for epoll_create1... " >&6; }
11850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11851/* end confdefs.h. */
11852#include <sys/epoll.h>
11853int
11854main ()
11855{
11856void *x=epoll_create1
11857 ;
11858 return 0;
11859}
11860_ACEOF
11861if ac_fn_c_try_compile "$LINENO"; then :
11862
11863$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11864
11865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11866$as_echo "yes" >&6; }
11867else
11868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11869$as_echo "no" >&6; }
11870
11871fi
11872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11874$as_echo_n "checking for kqueue... " >&6; }
11875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011876/* end confdefs.h. */
11877
11878#include <sys/types.h>
11879#include <sys/event.h>
11880
11881int
11882main ()
11883{
11884int x=kqueue()
11885 ;
11886 return 0;
11887}
11888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011889if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011890
Matthias Kloseb9621712010-04-24 17:59:49 +000011891$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011892
Matthias Kloseb159a552010-04-25 21:00:44 +000011893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011894$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011895else
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11897$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011898
11899fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11902$as_echo_n "checking for prlimit... " >&6; }
11903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11904/* end confdefs.h. */
11905
11906#include <sys/time.h>
11907#include <sys/resource.h>
11908
11909int
11910main ()
11911{
11912void *x=prlimit
11913 ;
11914 return 0;
11915}
11916_ACEOF
11917if ac_fn_c_try_compile "$LINENO"; then :
11918
11919$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11920
11921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11922$as_echo "yes" >&6; }
11923else
11924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11925$as_echo "no" >&6; }
11926
11927fi
11928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11929
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11931$as_echo_n "checking for memfd_create... " >&6; }
11932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11933/* end confdefs.h. */
11934
11935#ifdef HAVE_SYS_MMAN_H
11936#include <sys/mman.h>
11937#endif
11938#ifdef HAVE_SYS_MEMFD_H
11939#include <sys/memfd.h>
11940#endif
11941
11942int
11943main ()
11944{
11945void *x=memfd_create
11946 ;
11947 return 0;
11948}
11949_ACEOF
11950if ac_fn_c_try_compile "$LINENO"; then :
11951
11952$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11953
11954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11955$as_echo "yes" >&6; }
11956else
11957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11958$as_echo "no" >&6; }
11959
11960fi
11961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11962
Martin v. Löwisd5843682002-11-21 20:41:28 +000011963# On some systems (eg. FreeBSD 5), we would find a definition of the
11964# functions ctermid_r, setgroups in the library, but no prototype
11965# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11966# address to avoid compiler warnings and potential miscompilations
11967# because of the missing prototypes.
11968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11970$as_echo_n "checking for ctermid_r... " >&6; }
11971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011972/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011973
Martin v. Löwisd5843682002-11-21 20:41:28 +000011974#include <stdio.h>
11975
Martin v. Löwisd5843682002-11-21 20:41:28 +000011976int
11977main ()
11978{
11979void* p = ctermid_r
11980 ;
11981 return 0;
11982}
11983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011985
Matthias Kloseb9621712010-04-24 17:59:49 +000011986$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011987
Matthias Kloseb159a552010-04-25 21:00:44 +000011988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011989$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011990else
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011993
11994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11996
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11998$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011999if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012000 $as_echo_n "(cached) " >&6
12001else
12002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012003/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012004#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012005int
12006main ()
12007{
12008void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012009
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012010 ;
12011 return 0;
12012}
12013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012014if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012015 ac_cv_flock_decl=yes
12016else
12017 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012018
12019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012021
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012022fi
12023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12024$as_echo "$ac_cv_flock_decl" >&6; }
12025if test "x${ac_cv_flock_decl}" = xyes; then
12026 for ac_func in flock
12027do :
12028 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012029if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012030 cat >>confdefs.h <<_ACEOF
12031#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012032_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012033
Antoine Pitroua3000072010-09-07 14:52:42 +000012034else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012036$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012037if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012038 $as_echo_n "(cached) " >&6
12039else
12040 ac_check_lib_save_LIBS=$LIBS
12041LIBS="-lbsd $LIBS"
12042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12043/* end confdefs.h. */
12044
12045/* Override any GCC internal prototype to avoid an error.
12046 Use char because int might match the return type of a GCC
12047 builtin and then its argument prototype would still apply. */
12048#ifdef __cplusplus
12049extern "C"
12050#endif
12051char flock ();
12052int
12053main ()
12054{
12055return flock ();
12056 ;
12057 return 0;
12058}
12059_ACEOF
12060if ac_fn_c_try_link "$LINENO"; then :
12061 ac_cv_lib_bsd_flock=yes
12062else
12063 ac_cv_lib_bsd_flock=no
12064fi
12065rm -f core conftest.err conftest.$ac_objext \
12066 conftest$ac_exeext conftest.$ac_ext
12067LIBS=$ac_check_lib_save_LIBS
12068fi
12069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12070$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012071if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012072 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012073
12074
12075$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12076
12077
12078fi
12079
12080
12081fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012082done
12083
Antoine Pitroua3000072010-09-07 14:52:42 +000012084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085
Matthias Kloseb9621712010-04-24 17:59:49 +000012086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12087$as_echo_n "checking for getpagesize... " >&6; }
12088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012089/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012090
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012091#include <unistd.h>
12092
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012093int
12094main ()
12095{
12096void* p = getpagesize
12097 ;
12098 return 0;
12099}
12100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012101if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012102
Matthias Kloseb9621712010-04-24 17:59:49 +000012103$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012104
Matthias Kloseb159a552010-04-25 21:00:44 +000012105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012106$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012107else
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12109$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012110
12111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012113
Victor Stinner984890f2011-11-24 13:53:38 +010012114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12115$as_echo_n "checking for broken unsetenv... " >&6; }
12116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12117/* end confdefs.h. */
12118
12119#include <stdlib.h>
12120
12121int
12122main ()
12123{
12124int res = unsetenv("DUMMY")
12125 ;
12126 return 0;
12127}
12128_ACEOF
12129if ac_fn_c_try_compile "$LINENO"; then :
12130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12131$as_echo "no" >&6; }
12132else
12133
12134$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12135
12136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12137$as_echo "yes" >&6; }
12138
12139fi
12140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12141
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012142for ac_prog in true
12143do
12144 # Extract the first word of "$ac_prog", so it can be a program name with args.
12145set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12147$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012148if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012150else
12151 if test -n "$TRUE"; then
12152 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12153else
12154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12155for as_dir in $PATH
12156do
12157 IFS=$as_save_IFS
12158 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012160 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012161 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 $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 +000012163 break 2
12164 fi
12165done
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012167IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012168
12169fi
12170fi
12171TRUE=$ac_cv_prog_TRUE
12172if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12174$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12177$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012178fi
12179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012180
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012181 test -n "$TRUE" && break
12182done
12183test -n "$TRUE" || TRUE="/bin/true"
12184
12185
Matthias Kloseb9621712010-04-24 17:59:49 +000012186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12187$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012188if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012190else
12191 ac_check_lib_save_LIBS=$LIBS
12192LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012194/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196/* Override any GCC internal prototype to avoid an error.
12197 Use char because int might match the return type of a GCC
12198 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012199#ifdef __cplusplus
12200extern "C"
12201#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012202char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012203int
12204main ()
12205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012207 ;
12208 return 0;
12209}
12210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012211if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012212 ac_cv_lib_c_inet_aton=yes
12213else
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012216rm -f core conftest.err conftest.$ac_objext \
12217 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012218LIBS=$ac_check_lib_save_LIBS
12219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12221$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012222if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012223 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012224else
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12226$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012227if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012228 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012229else
12230 ac_check_lib_save_LIBS=$LIBS
12231LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012233/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012235/* Override any GCC internal prototype to avoid an error.
12236 Use char because int might match the return type of a GCC
12237 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012238#ifdef __cplusplus
12239extern "C"
12240#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012241char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012242int
12243main ()
12244{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012245return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012246 ;
12247 return 0;
12248}
12249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012250if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012251 ac_cv_lib_resolv_inet_aton=yes
12252else
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012255rm -f core conftest.err conftest.$ac_objext \
12256 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012257LIBS=$ac_check_lib_save_LIBS
12258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12260$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012261if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012262 cat >>confdefs.h <<_ACEOF
12263#define HAVE_LIBRESOLV 1
12264_ACEOF
12265
12266 LIBS="-lresolv $LIBS"
12267
12268fi
12269
12270
12271fi
12272
12273
Christian Heimesd0764e22007-12-04 15:00:33 +000012274# On Tru64, chflags seems to be present, but calling it will
12275# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12277$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012280else
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012282 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012283else
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012285/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012286
Christian Heimesd0764e22007-12-04 15:00:33 +000012287#include <sys/stat.h>
12288#include <unistd.h>
12289int main(int argc, char*argv[])
12290{
12291 if(chflags(argv[0], 0) != 0)
12292 return 1;
12293 return 0;
12294}
Ned Deily3eb67d52011-06-28 00:00:28 -070012295
Christian Heimesd0764e22007-12-04 15:00:33 +000012296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012297if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012298 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012299else
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12303 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012304fi
12305
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012306
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12309$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012310if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012312if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012313 ac_cv_have_chflags="yes"
12314else
12315 ac_cv_have_chflags="no"
12316fi
12317
12318fi
12319if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012320
Matthias Kloseb9621712010-04-24 17:59:49 +000012321$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012322
12323fi
12324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12326$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012327if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012328 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012329else
Matthias Kloseb9621712010-04-24 17:59:49 +000012330 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012331 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012332else
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012334/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012335
Christian Heimesd0764e22007-12-04 15:00:33 +000012336#include <sys/stat.h>
12337#include <unistd.h>
12338int main(int argc, char*argv[])
12339{
12340 if(lchflags(argv[0], 0) != 0)
12341 return 1;
12342 return 0;
12343}
Ned Deily3eb67d52011-06-28 00:00:28 -070012344
Christian Heimesd0764e22007-12-04 15:00:33 +000012345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012346if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012347 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012348else
Matthias Kloseb9621712010-04-24 17:59:49 +000012349 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12352 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012353fi
12354
12355
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12358$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012359if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012361if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012362 ac_cv_have_lchflags="yes"
12363else
12364 ac_cv_have_lchflags="no"
12365fi
12366
12367fi
12368if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012371
12372fi
12373
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012374case $ac_sys_system/$ac_sys_release in
12375Darwin/*)
12376 _CUR_CFLAGS="${CFLAGS}"
12377 _CUR_LDFLAGS="${LDFLAGS}"
12378 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12379 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12380 ;;
12381esac
12382
Matthias Kloseb9621712010-04-24 17:59:49 +000012383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12384$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012385if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012387else
12388 ac_check_lib_save_LIBS=$LIBS
12389LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012391/* end confdefs.h. */
12392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012393/* Override any GCC internal prototype to avoid an error.
12394 Use char because int might match the return type of a GCC
12395 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012396#ifdef __cplusplus
12397extern "C"
12398#endif
12399char inflateCopy ();
12400int
12401main ()
12402{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012404 ;
12405 return 0;
12406}
12407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012408if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012409 ac_cv_lib_z_inflateCopy=yes
12410else
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012413rm -f core conftest.err conftest.$ac_objext \
12414 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012415LIBS=$ac_check_lib_save_LIBS
12416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12418$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012419if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012420
Matthias Kloseb9621712010-04-24 17:59:49 +000012421$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012422
12423fi
12424
12425
12426case $ac_sys_system/$ac_sys_release in
12427Darwin/*)
12428 CFLAGS="${_CUR_CFLAGS}"
12429 LDFLAGS="${_CUR_LDFLAGS}"
12430 ;;
12431esac
12432
Matthias Kloseb9621712010-04-24 17:59:49 +000012433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12434$as_echo_n "checking for hstrerror... " >&6; }
12435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012436/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012437
Martin v. Löwise9416172003-05-03 10:12:45 +000012438#include <netdb.h>
12439
Martin v. Löwise9416172003-05-03 10:12:45 +000012440int
12441main ()
12442{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012443void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012444 ;
12445 return 0;
12446}
12447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012448if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012449
Matthias Kloseb9621712010-04-24 17:59:49 +000012450$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012451
Matthias Kloseb159a552010-04-25 21:00:44 +000012452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012453$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012454else
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12456$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012457
12458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012459rm -f core conftest.err conftest.$ac_objext \
12460 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461
Matthias Kloseb9621712010-04-24 17:59:49 +000012462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12463$as_echo_n "checking for inet_aton... " >&6; }
12464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012465/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012466
Martin v. Löwis86d66262006-02-17 08:40:11 +000012467#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012468#include <sys/socket.h>
12469#include <netinet/in.h>
12470#include <arpa/inet.h>
12471
Martin v. Löwise9416172003-05-03 10:12:45 +000012472int
12473main ()
12474{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012475void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012476 ;
12477 return 0;
12478}
12479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012480if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012481
Matthias Kloseb9621712010-04-24 17:59:49 +000012482$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012483
Matthias Kloseb159a552010-04-25 21:00:44 +000012484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012485$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012486else
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012489
12490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012491rm -f core conftest.err conftest.$ac_objext \
12492 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493
Matthias Kloseb9621712010-04-24 17:59:49 +000012494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12495$as_echo_n "checking for inet_pton... " >&6; }
12496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012497/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012498
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012499#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012500#include <sys/socket.h>
12501#include <netinet/in.h>
12502#include <arpa/inet.h>
12503
Martin v. Löwise9416172003-05-03 10:12:45 +000012504int
12505main ()
12506{
12507void* p = inet_pton
12508 ;
12509 return 0;
12510}
12511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012513
Matthias Kloseb9621712010-04-24 17:59:49 +000012514$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012515
Matthias Kloseb159a552010-04-25 21:00:44 +000012516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012517$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012518else
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12520$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012521
12522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012524
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012525# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12527$as_echo_n "checking for setgroups... " >&6; }
12528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012529/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012530
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012531#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012532#ifdef HAVE_GRP_H
12533#include <grp.h>
12534#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012535
Martin v. Löwisd5843682002-11-21 20:41:28 +000012536int
12537main ()
12538{
12539void* p = setgroups
12540 ;
12541 return 0;
12542}
12543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012544if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012545
Matthias Kloseb9621712010-04-24 17:59:49 +000012546$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012547
Matthias Kloseb159a552010-04-25 21:00:44 +000012548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012549$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012550else
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12552$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012553
12554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012556
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012557# check for openpty and forkpty
12558
12559for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012560do :
12561 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012562if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012563 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012564#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012565_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012566
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012567else
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12569$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012570if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012571 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012572else
Martin v. Löwis11437992002-04-12 09:54:03 +000012573 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012574LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578/* Override any GCC internal prototype to avoid an error.
12579 Use char because int might match the return type of a GCC
12580 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012581#ifdef __cplusplus
12582extern "C"
12583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012584char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012585int
12586main ()
12587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012588return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012589 ;
12590 return 0;
12591}
12592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012593if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012594 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012595else
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012598rm -f core conftest.err conftest.$ac_objext \
12599 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012600LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12603$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012604if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012606 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012607else
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12609$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012610if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012612else
12613 ac_check_lib_save_LIBS=$LIBS
12614LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012616/* end confdefs.h. */
12617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012618/* Override any GCC internal prototype to avoid an error.
12619 Use char because int might match the return type of a GCC
12620 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012621#ifdef __cplusplus
12622extern "C"
12623#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012624char openpty ();
12625int
12626main ()
12627{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012629 ;
12630 return 0;
12631}
12632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012633if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012634 ac_cv_lib_bsd_openpty=yes
12635else
Matthias Kloseb9621712010-04-24 17:59:49 +000012636 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012638rm -f core conftest.err conftest.$ac_objext \
12639 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012640LIBS=$ac_check_lib_save_LIBS
12641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12643$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012644if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012645 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012646 LIBS="$LIBS -lbsd"
12647fi
12648
12649
12650fi
12651
Fred Drake8cef4cf2000-06-28 16:40:38 +000012652
12653fi
12654done
12655
12656for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012657do :
12658 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012659if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012661#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012662_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012663
Fred Drake8cef4cf2000-06-28 16:40:38 +000012664else
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12666$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012667if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012669else
Martin v. Löwis11437992002-04-12 09:54:03 +000012670 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012671LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675/* Override any GCC internal prototype to avoid an error.
12676 Use char because int might match the return type of a GCC
12677 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012678#ifdef __cplusplus
12679extern "C"
12680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012681char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012682int
12683main ()
12684{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012686 ;
12687 return 0;
12688}
12689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012690if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012692else
Matthias Kloseb9621712010-04-24 17:59:49 +000012693 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012695rm -f core conftest.err conftest.$ac_objext \
12696 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012697LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12700$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012701if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012703 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012704else
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12706$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012707if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012708 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012709else
12710 ac_check_lib_save_LIBS=$LIBS
12711LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012713/* end confdefs.h. */
12714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715/* Override any GCC internal prototype to avoid an error.
12716 Use char because int might match the return type of a GCC
12717 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012718#ifdef __cplusplus
12719extern "C"
12720#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012721char forkpty ();
12722int
12723main ()
12724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012726 ;
12727 return 0;
12728}
12729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012730if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012731 ac_cv_lib_bsd_forkpty=yes
12732else
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012735rm -f core conftest.err conftest.$ac_objext \
12736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012737LIBS=$ac_check_lib_save_LIBS
12738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12740$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012741if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012742 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012743 LIBS="$LIBS -lbsd"
12744fi
12745
12746
12747fi
12748
Fred Drake8cef4cf2000-06-28 16:40:38 +000012749
12750fi
12751done
12752
Jack Jansendd19cf82001-12-06 22:36:17 +000012753
Michael W. Hudson54241132001-12-07 15:38:26 +000012754# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012755for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012756do :
12757 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12758ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012759if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012761#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012762_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012764fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012765done
12766
Michael W. Hudson54241132001-12-07 15:38:26 +000012767
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012768ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012769if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012770 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012771
Martin v. Löwis1142de32002-03-29 16:28:31 +000012772else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012773 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012774 *" dup2.$ac_objext "* ) ;;
12775 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012777esac
12778
Martin v. Löwis1142de32002-03-29 16:28:31 +000012779fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012780
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012781ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012782if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012783 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12784
12785else
12786 case " $LIBOBJS " in
12787 *" strdup.$ac_objext "* ) ;;
12788 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12789 ;;
12790esac
12791
12792fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012793
12794
12795for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012796do :
12797 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012798if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012799 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012800#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012803/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012804#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012805int
12806main ()
12807{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012808getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 ;
12810 return 0;
12811}
12812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012813if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012814
Matthias Kloseb9621712010-04-24 17:59:49 +000012815$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012816
Guido van Rossum627b2d71993-12-24 10:39:16 +000012817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012819
Guido van Rossum627b2d71993-12-24 10:39:16 +000012820fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012821done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012822
Jack Jansen150753c2003-03-29 22:07:47 +000012823for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012824do :
12825 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012826if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012827 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012828#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012831/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012832#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012833int
12834main ()
12835{
12836setpgrp(0,0);
12837 ;
12838 return 0;
12839}
12840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012841if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012842
Matthias Kloseb9621712010-04-24 17:59:49 +000012843$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012844
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012847
12848fi
12849done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012850
Michael W. Hudson54241132001-12-07 15:38:26 +000012851
Gregory P. Smith387512c2018-12-30 15:42:32 -080012852# We search for both crypt and crypt_r as one or the other may be defined
12853# This gets us our -lcrypt in LIBS when required on the target platform.
12854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12855$as_echo_n "checking for library containing crypt... " >&6; }
12856if ${ac_cv_search_crypt+:} false; then :
12857 $as_echo_n "(cached) " >&6
12858else
12859 ac_func_search_save_LIBS=$LIBS
12860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12861/* end confdefs.h. */
12862
12863/* Override any GCC internal prototype to avoid an error.
12864 Use char because int might match the return type of a GCC
12865 builtin and then its argument prototype would still apply. */
12866#ifdef __cplusplus
12867extern "C"
12868#endif
12869char crypt ();
12870int
12871main ()
12872{
12873return crypt ();
12874 ;
12875 return 0;
12876}
12877_ACEOF
12878for ac_lib in '' crypt; do
12879 if test -z "$ac_lib"; then
12880 ac_res="none required"
12881 else
12882 ac_res=-l$ac_lib
12883 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12884 fi
12885 if ac_fn_c_try_link "$LINENO"; then :
12886 ac_cv_search_crypt=$ac_res
12887fi
12888rm -f core conftest.err conftest.$ac_objext \
12889 conftest$ac_exeext
12890 if ${ac_cv_search_crypt+:} false; then :
12891 break
12892fi
12893done
12894if ${ac_cv_search_crypt+:} false; then :
12895
12896else
12897 ac_cv_search_crypt=no
12898fi
12899rm conftest.$ac_ext
12900LIBS=$ac_func_search_save_LIBS
12901fi
12902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12903$as_echo "$ac_cv_search_crypt" >&6; }
12904ac_res=$ac_cv_search_crypt
12905if test "$ac_res" != no; then :
12906 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12907
12908fi
12909
12910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12911$as_echo_n "checking for library containing crypt_r... " >&6; }
12912if ${ac_cv_search_crypt_r+:} false; then :
12913 $as_echo_n "(cached) " >&6
12914else
12915 ac_func_search_save_LIBS=$LIBS
12916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12917/* end confdefs.h. */
12918
12919/* Override any GCC internal prototype to avoid an error.
12920 Use char because int might match the return type of a GCC
12921 builtin and then its argument prototype would still apply. */
12922#ifdef __cplusplus
12923extern "C"
12924#endif
12925char crypt_r ();
12926int
12927main ()
12928{
12929return crypt_r ();
12930 ;
12931 return 0;
12932}
12933_ACEOF
12934for ac_lib in '' crypt; do
12935 if test -z "$ac_lib"; then
12936 ac_res="none required"
12937 else
12938 ac_res=-l$ac_lib
12939 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12940 fi
12941 if ac_fn_c_try_link "$LINENO"; then :
12942 ac_cv_search_crypt_r=$ac_res
12943fi
12944rm -f core conftest.err conftest.$ac_objext \
12945 conftest$ac_exeext
12946 if ${ac_cv_search_crypt_r+:} false; then :
12947 break
12948fi
12949done
12950if ${ac_cv_search_crypt_r+:} false; then :
12951
12952else
12953 ac_cv_search_crypt_r=no
12954fi
12955rm conftest.$ac_ext
12956LIBS=$ac_func_search_save_LIBS
12957fi
12958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12959$as_echo "$ac_cv_search_crypt_r" >&6; }
12960ac_res=$ac_cv_search_crypt_r
12961if test "$ac_res" != no; then :
12962 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12963
12964fi
12965
12966
12967ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12968if test "x$ac_cv_func_crypt_r" = xyes; then :
12969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12970/* end confdefs.h. */
12971
12972#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12973#include <crypt.h>
12974
12975int
12976main ()
12977{
12978
12979struct crypt_data d;
12980char *r = crypt_r("", "", &d);
12981
12982 ;
12983 return 0;
12984}
12985_ACEOF
12986if ac_fn_c_try_compile "$LINENO"; then :
12987
12988$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12989
12990fi
12991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12992
12993fi
12994
12995
Victor Stinnere0be4232011-10-25 13:06:09 +020012996for ac_func in clock_gettime
12997do :
12998 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12999if test "x$ac_cv_func_clock_gettime" = xyes; then :
13000 cat >>confdefs.h <<_ACEOF
13001#define HAVE_CLOCK_GETTIME 1
13002_ACEOF
13003
13004else
13005
13006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13007$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13008if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13009 $as_echo_n "(cached) " >&6
13010else
13011 ac_check_lib_save_LIBS=$LIBS
13012LIBS="-lrt $LIBS"
13013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13014/* end confdefs.h. */
13015
13016/* Override any GCC internal prototype to avoid an error.
13017 Use char because int might match the return type of a GCC
13018 builtin and then its argument prototype would still apply. */
13019#ifdef __cplusplus
13020extern "C"
13021#endif
13022char clock_gettime ();
13023int
13024main ()
13025{
13026return clock_gettime ();
13027 ;
13028 return 0;
13029}
13030_ACEOF
13031if ac_fn_c_try_link "$LINENO"; then :
13032 ac_cv_lib_rt_clock_gettime=yes
13033else
13034 ac_cv_lib_rt_clock_gettime=no
13035fi
13036rm -f core conftest.err conftest.$ac_objext \
13037 conftest$ac_exeext conftest.$ac_ext
13038LIBS=$ac_check_lib_save_LIBS
13039fi
13040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13041$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13042if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13043
Victor Stinner7efb8332014-08-29 15:41:08 +020013044 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013045 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13046
13047
13048$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13049
13050
13051fi
13052
13053
13054fi
13055done
13056
13057
13058for ac_func in clock_getres
13059do :
13060 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13061if test "x$ac_cv_func_clock_getres" = xyes; then :
13062 cat >>confdefs.h <<_ACEOF
13063#define HAVE_CLOCK_GETRES 1
13064_ACEOF
13065
13066else
13067
13068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13069$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13070if ${ac_cv_lib_rt_clock_getres+:} false; then :
13071 $as_echo_n "(cached) " >&6
13072else
13073 ac_check_lib_save_LIBS=$LIBS
13074LIBS="-lrt $LIBS"
13075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13076/* end confdefs.h. */
13077
13078/* Override any GCC internal prototype to avoid an error.
13079 Use char because int might match the return type of a GCC
13080 builtin and then its argument prototype would still apply. */
13081#ifdef __cplusplus
13082extern "C"
13083#endif
13084char clock_getres ();
13085int
13086main ()
13087{
13088return clock_getres ();
13089 ;
13090 return 0;
13091}
13092_ACEOF
13093if ac_fn_c_try_link "$LINENO"; then :
13094 ac_cv_lib_rt_clock_getres=yes
13095else
13096 ac_cv_lib_rt_clock_getres=no
13097fi
13098rm -f core conftest.err conftest.$ac_objext \
13099 conftest$ac_exeext conftest.$ac_ext
13100LIBS=$ac_check_lib_save_LIBS
13101fi
13102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13103$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13104if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13105
13106 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13107
13108
13109fi
13110
13111
13112fi
13113done
13114
13115
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013116for ac_func in clock_settime
13117do :
13118 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13119if test "x$ac_cv_func_clock_settime" = xyes; then :
13120 cat >>confdefs.h <<_ACEOF
13121#define HAVE_CLOCK_SETTIME 1
13122_ACEOF
13123
13124else
13125
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13127$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13128if ${ac_cv_lib_rt_clock_settime+:} false; then :
13129 $as_echo_n "(cached) " >&6
13130else
13131 ac_check_lib_save_LIBS=$LIBS
13132LIBS="-lrt $LIBS"
13133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13134/* end confdefs.h. */
13135
13136/* Override any GCC internal prototype to avoid an error.
13137 Use char because int might match the return type of a GCC
13138 builtin and then its argument prototype would still apply. */
13139#ifdef __cplusplus
13140extern "C"
13141#endif
13142char clock_settime ();
13143int
13144main ()
13145{
13146return clock_settime ();
13147 ;
13148 return 0;
13149}
13150_ACEOF
13151if ac_fn_c_try_link "$LINENO"; then :
13152 ac_cv_lib_rt_clock_settime=yes
13153else
13154 ac_cv_lib_rt_clock_settime=no
13155fi
13156rm -f core conftest.err conftest.$ac_objext \
13157 conftest$ac_exeext conftest.$ac_ext
13158LIBS=$ac_check_lib_save_LIBS
13159fi
13160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13161$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13162if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13163
13164 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13165
13166
13167fi
13168
13169
13170fi
13171done
13172
13173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13175$as_echo_n "checking for major... " >&6; }
13176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013177/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013178
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013179#if defined(MAJOR_IN_MKDEV)
13180#include <sys/mkdev.h>
13181#elif defined(MAJOR_IN_SYSMACROS)
13182#include <sys/sysmacros.h>
13183#else
13184#include <sys/types.h>
13185#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013186
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013187int
13188main ()
13189{
13190
13191 makedev(major(0),minor(0));
13192
13193 ;
13194 return 0;
13195}
13196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013197if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013198
13199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13203$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013204
13205else
Skip Montanaro6dead952003-09-25 14:50:04 +000013206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13208$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013209
13210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013211rm -f core conftest.err conftest.$ac_objext \
13212 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013213
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013214# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013215# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13217$as_echo_n "checking for getaddrinfo... " >&6; }
13218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013219/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013220
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013221#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013222#include <sys/socket.h>
13223#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013224#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013225
Martin v. Löwis11437992002-04-12 09:54:03 +000013226int
13227main ()
13228{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013229getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 ;
13231 return 0;
13232}
13233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013234if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013235 have_getaddrinfo=yes
13236else
Matthias Kloseb9621712010-04-24 17:59:49 +000013237 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013239rm -f core conftest.err conftest.$ac_objext \
13240 conftest$ac_exeext conftest.$ac_ext
13241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13242$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013243if test $have_getaddrinfo = yes
13244then
Matthias Kloseb9621712010-04-24 17:59:49 +000013245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13246$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013247 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013249else
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013251
13252if test "${enable_ipv6+set}" = set; then
13253 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13254else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013255 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013256fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013257else
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013259/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013260
Stefan Krah19c21392012-11-22 23:47:32 +010013261#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013262#include <sys/types.h>
13263#include <netdb.h>
13264#include <string.h>
13265#include <sys/socket.h>
13266#include <netinet/in.h>
13267
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013268int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013269{
13270 int passive, gaierr, inet4 = 0, inet6 = 0;
13271 struct addrinfo hints, *ai, *aitop;
13272 char straddr[INET6_ADDRSTRLEN], strport[16];
13273
13274 for (passive = 0; passive <= 1; passive++) {
13275 memset(&hints, 0, sizeof(hints));
13276 hints.ai_family = AF_UNSPEC;
13277 hints.ai_flags = passive ? AI_PASSIVE : 0;
13278 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013279 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013280 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13281 (void)gai_strerror(gaierr);
13282 goto bad;
13283 }
13284 for (ai = aitop; ai; ai = ai->ai_next) {
13285 if (ai->ai_addr == NULL ||
13286 ai->ai_addrlen == 0 ||
13287 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13288 straddr, sizeof(straddr), strport, sizeof(strport),
13289 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13290 goto bad;
13291 }
13292 switch (ai->ai_family) {
13293 case AF_INET:
13294 if (strcmp(strport, "54321") != 0) {
13295 goto bad;
13296 }
13297 if (passive) {
13298 if (strcmp(straddr, "0.0.0.0") != 0) {
13299 goto bad;
13300 }
13301 } else {
13302 if (strcmp(straddr, "127.0.0.1") != 0) {
13303 goto bad;
13304 }
13305 }
13306 inet4++;
13307 break;
13308 case AF_INET6:
13309 if (strcmp(strport, "54321") != 0) {
13310 goto bad;
13311 }
13312 if (passive) {
13313 if (strcmp(straddr, "::") != 0) {
13314 goto bad;
13315 }
13316 } else {
13317 if (strcmp(straddr, "::1") != 0) {
13318 goto bad;
13319 }
13320 }
13321 inet6++;
13322 break;
13323 case AF_UNSPEC:
13324 goto bad;
13325 break;
13326 default:
13327 /* another family support? */
13328 break;
13329 }
13330 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013331 freeaddrinfo(aitop);
13332 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013333 }
13334
13335 if (!(inet4 == 0 || inet4 == 2))
13336 goto bad;
13337 if (!(inet6 == 0 || inet6 == 2))
13338 goto bad;
13339
13340 if (aitop)
13341 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013342 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013343
13344 bad:
13345 if (aitop)
13346 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013347 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013348}
13349
Martin v. Löwis11437992002-04-12 09:54:03 +000013350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013351if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013352 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13357 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013359
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013360fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013361
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013363
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13365$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13366
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013367if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013368then
13369 if test $ipv6 = yes
13370 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013371 echo 'Fatal: You must get working getaddrinfo() function.'
13372 echo ' or you can specify "--disable-ipv6"'.
13373 exit 1
13374 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013375else
Martin v. Löwis11437992002-04-12 09:54:03 +000013376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013378
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013379fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013380
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013381for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013382do :
13383 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013384if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013386#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013387_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013388
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013389fi
13390done
13391
Michael W. Hudson54241132001-12-07 15:38:26 +000013392
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013393# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13395$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013396if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398else
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013400/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013401#include <sys/types.h>
13402#include <sys/time.h>
13403#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013404
Martin v. Löwis11437992002-04-12 09:54:03 +000013405int
13406main ()
13407{
13408if ((struct tm *) 0)
13409return 0;
13410 ;
13411 return 0;
13412}
13413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013414if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013415 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13422$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013423if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013426
13427fi
13428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13430$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013431if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013433else
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013435/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013436#include <sys/types.h>
13437#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013438
Martin v. Löwis11437992002-04-12 09:54:03 +000013439int
13440main ()
13441{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013442struct tm tm;
13443 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 ;
13446 return 0;
13447}
13448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013449if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013450 ac_cv_struct_tm=time.h
13451else
Matthias Kloseb9621712010-04-24 17:59:49 +000013452 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13457$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013458if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013461
13462fi
13463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464ac_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 +000013465#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013466
Matthias Kloseb9621712010-04-24 17:59:49 +000013467"
Victor Stinnere0be4232011-10-25 13:06:09 +020013468if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013469
13470cat >>confdefs.h <<_ACEOF
13471#define HAVE_STRUCT_TM_TM_ZONE 1
13472_ACEOF
13473
13474
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013475fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013476
Martin v. Löwis11437992002-04-12 09:54:03 +000013477if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13478
Matthias Kloseb9621712010-04-24 17:59:49 +000013479$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480
13481else
Matthias Kloseb9621712010-04-24 17:59:49 +000013482 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13483"
Victor Stinnere0be4232011-10-25 13:06:09 +020013484if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013486else
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013488fi
13489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013490cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013491#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013492_ACEOF
13493
Matthias Kloseb9621712010-04-24 17:59:49 +000013494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13495$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013496if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013498else
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013500/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013501#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013502#if !HAVE_DECL_TZNAME
13503extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013505
Martin v. Löwis11437992002-04-12 09:54:03 +000013506int
13507main ()
13508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013509return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 ;
13511 return 0;
13512}
13513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013514if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013515 ac_cv_var_tzname=yes
13516else
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013519rm -f core conftest.err conftest.$ac_objext \
13520 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13523$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013524 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
Matthias Kloseb9621712010-04-24 17:59:49 +000013526$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013527
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528 fi
13529fi
13530
Matthias Kloseb9621712010-04-24 17:59:49 +000013531ac_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 +020013532if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013533
13534cat >>confdefs.h <<_ACEOF
13535#define HAVE_STRUCT_STAT_ST_RDEV 1
13536_ACEOF
13537
13538
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013539fi
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541ac_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 +020013542if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013543
Martin v. Löwis11437992002-04-12 09:54:03 +000013544cat >>confdefs.h <<_ACEOF
13545#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13546_ACEOF
13547
13548
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013549fi
13550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551ac_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 +020013552if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013553
13554cat >>confdefs.h <<_ACEOF
13555#define HAVE_STRUCT_STAT_ST_FLAGS 1
13556_ACEOF
13557
13558
13559fi
13560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561ac_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 +020013562if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013563
13564cat >>confdefs.h <<_ACEOF
13565#define HAVE_STRUCT_STAT_ST_GEN 1
13566_ACEOF
13567
13568
13569fi
13570
Matthias Kloseb9621712010-04-24 17:59:49 +000013571ac_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 +020013572if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013573
13574cat >>confdefs.h <<_ACEOF
13575#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13576_ACEOF
13577
13578
13579fi
13580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581ac_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 +020013582if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013583
Martin v. Löwis11437992002-04-12 09:54:03 +000013584cat >>confdefs.h <<_ACEOF
13585#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13586_ACEOF
13587
13588
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013589fi
13590
Stefan Krah267b6392016-04-26 01:09:18 +020013591ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13592 #include <sys/types.h>
13593 #include <pwd.h>
13594
13595"
13596if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13597
13598cat >>confdefs.h <<_ACEOF
13599#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13600_ACEOF
13601
13602
13603fi
13604ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13605 #include <sys/types.h>
13606 #include <pwd.h>
13607
13608"
13609if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13610
13611cat >>confdefs.h <<_ACEOF
13612#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13613_ACEOF
13614
13615
13616fi
13617
Zachary Ware6a6967e2016-10-01 00:47:27 -050013618# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13619ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13620"
13621if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13622
13623cat >>confdefs.h <<_ACEOF
13624#define HAVE_SIGINFO_T_SI_BAND 1
13625_ACEOF
13626
13627
13628fi
13629
Michael W. Hudson54241132001-12-07 15:38:26 +000013630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13632$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013633if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013635else
Matthias Kloseb159a552010-04-25 21:00:44 +000013636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013638/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013639#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013640int
13641main ()
13642{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013643return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013644 ;
13645 return 0;
13646}
13647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013648if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013649 ac_cv_header_time_altzone=yes
13650else
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013655fi
13656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13658$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013659if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013662
13663fi
13664
Guido van Rossumda88dad1995-01-26 00:46:29 +000013665was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13667$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013669/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013670
13671#include <sys/types.h>
13672#include <sys/select.h>
13673#include <sys/time.h>
13674
Martin v. Löwis11437992002-04-12 09:54:03 +000013675int
13676main ()
13677{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013678;
Martin v. Löwis11437992002-04-12 09:54:03 +000013679 ;
13680 return 0;
13681}
13682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013683if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013684
13685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013687
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013688 was_it_defined=yes
13689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13693$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013694
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13696$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013697if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013699else
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013701/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013702#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013703int
13704main ()
13705{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013706struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 ;
13708 return 0;
13709}
13710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013712 ac_cv_struct_addrinfo=yes
13713else
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13717fi
13718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13720$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013721if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013724
13725fi
13726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13728$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013729if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013731else
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013733/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013734
13735# include <sys/types.h>
13736# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013737int
13738main ()
13739{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013740struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 ;
13742 return 0;
13743}
13744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013745if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013746 ac_cv_struct_sockaddr_storage=yes
13747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13751fi
13752
Matthias Kloseb9621712010-04-24 17:59:49 +000013753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13754$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013755if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013758
13759fi
13760
Christian Heimesdffa3942016-09-05 23:54:41 +020013761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13762$as_echo_n "checking for sockaddr_alg... " >&6; }
13763if ${ac_cv_struct_sockaddr_alg+:} false; then :
13764 $as_echo_n "(cached) " >&6
13765else
13766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13767/* end confdefs.h. */
13768
13769# include <sys/types.h>
13770# include <sys/socket.h>
13771# include <linux/if_alg.h>
13772int
13773main ()
13774{
13775struct sockaddr_alg s
13776 ;
13777 return 0;
13778}
13779_ACEOF
13780if ac_fn_c_try_compile "$LINENO"; then :
13781 ac_cv_struct_sockaddr_alg=yes
13782else
13783 ac_cv_struct_sockaddr_alg=no
13784fi
13785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13786fi
13787
13788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13789$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13790if test $ac_cv_struct_sockaddr_alg = yes; then
13791
13792$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13793
13794fi
13795
Guido van Rossum627b2d71993-12-24 10:39:16 +000013796# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013797
Matthias Kloseb9621712010-04-24 17:59:49 +000013798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13799$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013800if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013802else
Matthias Kloseb9621712010-04-24 17:59:49 +000013803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013805$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013806int
13807main ()
13808{
13809static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013810test_array [0] = 0;
13811return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013812
13813 ;
13814 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013815}
Martin v. Löwis11437992002-04-12 09:54:03 +000013816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013817if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013818 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013819else
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13825$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013826if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013828
13829fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013830
Matthias Kloseb9621712010-04-24 17:59:49 +000013831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13832$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013833if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013835else
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013837/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013838
Martin v. Löwis11437992002-04-12 09:54:03 +000013839int
13840main ()
13841{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013842
Martin v. Löwis11437992002-04-12 09:54:03 +000013843#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013844 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013845 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013846 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013848 char const *const *pcpcc;
13849 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013850 /* NEC SVR4.0.2 mips cc rejects this. */
13851 struct point {int x, y;};
13852 static struct point const zero = {0,0};
13853 /* AIX XL C 1.02.0.0 rejects this.
13854 It does not let you subtract one const X* pointer from another in
13855 an arm of an if-expression whose if-part is not a constant
13856 expression */
13857 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013860 ++pcpcc;
13861 ppc = (char**) pcpcc;
13862 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013863 { /* SCO 3.2v4 cc rejects this sort of thing. */
13864 char tx;
13865 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013866 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013867
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013870 }
13871 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13872 int x[] = {25, 17};
13873 const int *foo = &x[0];
13874 ++foo;
13875 }
13876 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13877 typedef const int *iptr;
13878 iptr p = 0;
13879 ++p;
13880 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013881 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013882 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013883 struct s { int j; const int *ap[3]; } bx;
13884 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013885 }
13886 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13887 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013891#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013892
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 ;
13894 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013895}
Martin v. Löwis11437992002-04-12 09:54:03 +000013896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013897if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013898 ac_cv_c_const=yes
13899else
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13905$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013906if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013907
Matthias Kloseb9621712010-04-24 17:59:49 +000013908$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013909
13910fi
13911
Michael W. Hudson54241132001-12-07 15:38:26 +000013912
Guido van Rossumda88dad1995-01-26 00:46:29 +000013913works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13915$as_echo_n "checking for working signed char... " >&6; }
13916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013917/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013918
Martin v. Löwis11437992002-04-12 09:54:03 +000013919int
13920main ()
13921{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013922signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013923 ;
13924 return 0;
13925}
13926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013927if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013928 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013929else
Skip Montanaro6dead952003-09-25 14:50:04 +000013930
Matthias Kloseb9621712010-04-24 17:59:49 +000013931$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013932
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013933
Guido van Rossum7f43da71994-08-01 12:15:30 +000013934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13937$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013938
Guido van Rossumda88dad1995-01-26 00:46:29 +000013939have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13941$as_echo_n "checking for prototypes... " >&6; }
13942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013943/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013944int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013945int
13946main ()
13947{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013948return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 ;
13950 return 0;
13951}
13952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013953if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013954
Matthias Kloseb9621712010-04-24 17:59:49 +000013955$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013956
Matthias Kloseb159a552010-04-25 21:00:44 +000013957 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13961$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013962
Guido van Rossumda88dad1995-01-26 00:46:29 +000013963works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13965$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013967/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013968
13969#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013970int foo(int x, ...) {
13971 va_list va;
13972 va_start(va, x);
13973 va_arg(va, int);
13974 va_arg(va, char *);
13975 va_arg(va, double);
13976 return 0;
13977}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013978
Martin v. Löwis11437992002-04-12 09:54:03 +000013979int
13980main ()
13981{
Guido van Rossum90eea071996-08-30 20:58:57 +000013982return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 ;
13984 return 0;
13985}
13986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013987if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
13989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013991
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013992 works=yes
13993
Guido van Rossum627b2d71993-12-24 10:39:16 +000013994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13997$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013998
Martin v. Löwisd6320502004-08-12 13:45:08 +000013999# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14001$as_echo_n "checking for socketpair... " >&6; }
14002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014003/* end confdefs.h. */
14004
14005#include <sys/types.h>
14006#include <sys/socket.h>
14007
14008int
14009main ()
14010{
14011void *x=socketpair
14012 ;
14013 return 0;
14014}
14015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014016if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014017
Matthias Kloseb9621712010-04-24 17:59:49 +000014018$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014019
Matthias Kloseb159a552010-04-25 21:00:44 +000014020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014021$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014022else
Matthias Kloseb9621712010-04-24 17:59:49 +000014023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14024$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014025
14026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014028
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014029# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14031$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014033/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014034#include <sys/types.h>
14035#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014036int
14037main ()
14038{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014039struct sockaddr x;
14040x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 ;
14042 return 0;
14043}
14044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014045if ac_fn_c_try_compile "$LINENO"; then :
14046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14047$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014048
Matthias Kloseb9621712010-04-24 17:59:49 +000014049$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014050
14051else
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14053$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014054
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014057
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014058# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014059
14060
Matthias Kloseb9621712010-04-24 17:59:49 +000014061ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014062if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014065
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14067$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014068 OLD_CFLAGS=$CFLAGS
14069 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014071/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014072
14073# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014074
Martin v. Löwis11437992002-04-12 09:54:03 +000014075int
14076main ()
14077{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014078
14079 char *name;
14080 struct hostent *he, *res;
14081 char buffer[2048];
14082 int buflen = 2048;
14083 int h_errnop;
14084
14085 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014086
14087 ;
14088 return 0;
14089}
14090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014091if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014092
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014094
Martin v. Löwis11437992002-04-12 09:54:03 +000014095
Matthias Kloseb9621712010-04-24 17:59:49 +000014096$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014097
Matthias Kloseb9621712010-04-24 17:59:49 +000014098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14099$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014100
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014101else
Skip Montanaro6dead952003-09-25 14:50:04 +000014102
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14104$as_echo "no" >&6; }
14105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14106$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014108/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014109
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014110# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014111
Martin v. Löwis11437992002-04-12 09:54:03 +000014112int
14113main ()
14114{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014115
14116 char *name;
14117 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014118 char buffer[2048];
14119 int buflen = 2048;
14120 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014121
Matthias Kloseb159a552010-04-25 21:00:44 +000014122 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014123
14124 ;
14125 return 0;
14126}
14127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014128if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014129
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014131
Martin v. Löwis11437992002-04-12 09:54:03 +000014132
Matthias Kloseb159a552010-04-25 21:00:44 +000014133$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014134
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14136$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014137
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014138else
Skip Montanaro6dead952003-09-25 14:50:04 +000014139
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14141$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14143$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14145/* end confdefs.h. */
14146
14147# include <netdb.h>
14148
14149int
14150main ()
14151{
14152
14153 char *name;
14154 struct hostent *he;
14155 struct hostent_data data;
14156
14157 (void) gethostbyname_r(name, he, &data);
14158
14159 ;
14160 return 0;
14161}
14162_ACEOF
14163if ac_fn_c_try_compile "$LINENO"; then :
14164
14165 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14166
14167
14168$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14169
14170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14171$as_echo "yes" >&6; }
14172
14173else
14174
14175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14176$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014177
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014180
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014183
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014186 CFLAGS=$OLD_CFLAGS
14187
14188else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 for ac_func in gethostbyname
14191do :
14192 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014193if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014194 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014195#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014196_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014197
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014198fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014199done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014200
Michael W. Hudson54241132001-12-07 15:38:26 +000014201
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014202fi
14203
Michael W. Hudson54241132001-12-07 15:38:26 +000014204
14205
14206
14207
14208
14209
Guido van Rossum627b2d71993-12-24 10:39:16 +000014210# checks for system services
14211# (none yet)
14212
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014213# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014214ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014215if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014216
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014217else
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14219$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014220if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014222else
Martin v. Löwis11437992002-04-12 09:54:03 +000014223 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014224LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014228/* Override any GCC internal prototype to avoid an error.
14229 Use char because int might match the return type of a GCC
14230 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014231#ifdef __cplusplus
14232extern "C"
14233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014234char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014235int
14236main ()
14237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014239 ;
14240 return 0;
14241}
14242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014243if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014244 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014245else
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014248rm -f core conftest.err conftest.$ac_objext \
14249 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014250LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14253$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014254if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 cat >>confdefs.h <<_ACEOF
14256#define HAVE_LIBIEEE 1
14257_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014258
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014259 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014260
Guido van Rossum627b2d71993-12-24 10:39:16 +000014261fi
14262
Michael W. Hudson54241132001-12-07 15:38:26 +000014263
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014264fi
14265
Michael W. Hudson54241132001-12-07 15:38:26 +000014266
Guido van Rossum7f43da71994-08-01 12:15:30 +000014267# check for --with-libm=...
14268
Guido van Rossum563e7081996-09-10 18:20:48 +000014269case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014270Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014271*) LIBM=-lm
14272esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14274$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014276# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014277if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014278 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014279if test "$withval" = no
14280then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14282$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014283elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014284then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14286$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014287else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014288fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014289else
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14291$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292fi
14293
Guido van Rossum7f43da71994-08-01 12:15:30 +000014294
14295# check for --with-libc=...
14296
Matthias Kloseb9621712010-04-24 17:59:49 +000014297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14298$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014301if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014303if test "$withval" = no
14304then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14306$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014307elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014308then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14310$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014311else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014312fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014313else
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14315$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316fi
14317
Guido van Rossum7f43da71994-08-01 12:15:30 +000014318
Stefan Krah1919b7e2012-03-21 18:25:23 +010014319# **************************************
14320# * Check for gcc x64 inline assembler *
14321# **************************************
14322
14323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14324$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14326/* end confdefs.h. */
14327
14328int
14329main ()
14330{
14331
14332 __asm__ __volatile__ ("movq %rcx, %rax");
14333
14334 ;
14335 return 0;
14336}
14337_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014338if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014339 have_gcc_asm_for_x64=yes
14340else
14341 have_gcc_asm_for_x64=no
14342fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014343rm -f core conftest.err conftest.$ac_objext \
14344 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14346$as_echo "$have_gcc_asm_for_x64" >&6; }
14347if test "$have_gcc_asm_for_x64" = yes
14348then
14349
14350$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14351
14352fi
14353
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014354# **************************************************
14355# * Check for various properties of floating point *
14356# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014357
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14359$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14360if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014362else
14363
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014364
14365ax_cv_c_float_words_bigendian=unknown
14366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014367/* end confdefs.h. */
14368
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014369
14370double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14371
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014372
14373_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014374if ac_fn_c_try_compile "$LINENO"; then :
14375
14376
Arnon Yaari5dd83602020-04-01 18:19:09 +030014377if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014378 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014379fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014380if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014381 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14382 ax_cv_c_float_words_bigendian=no
14383 else
14384 ax_cv_c_float_words_bigendian=unknown
14385 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014386fi
14387
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014388
14389fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014391fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14393$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014394
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014395case $ax_cv_c_float_words_bigendian in
14396 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014397
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014398$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14399 ;;
14400 no)
14401 ;;
14402 *)
14403 as_fn_error $? "
14404
14405Unknown float word ordering. You need to manually preset
14406ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14407
14408 " "$LINENO" 5 ;;
14409esac
14410
14411
14412if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014413then
14414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014416
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014417elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014418then
14419
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014420$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14421
14422else
14423 # Some ARM platforms use a mixed-endian representation for doubles.
14424 # While Python doesn't currently have full support for these platforms
14425 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14426 # conversions work.
14427 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14428 # or little, then it must be this?
14429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014431
14432fi
14433
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014434# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014435# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014436# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014437# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014438# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014439# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014440
14441# This inline assembler syntax may also work for suncc and icc,
14442# so we try it on all platforms.
14443
Matthias Kloseb9621712010-04-24 17:59:49 +000014444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14445$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014447/* end confdefs.h. */
14448
14449int
14450main ()
14451{
14452
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014453 unsigned short cw;
14454 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14455 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014456
14457 ;
14458 return 0;
14459}
14460_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014461if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014462 have_gcc_asm_for_x87=yes
14463else
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014465fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014466rm -f core conftest.err conftest.$ac_objext \
14467 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14469$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014470if test "$have_gcc_asm_for_x87" = yes
14471then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014472
Matthias Kloseb9621712010-04-24 17:59:49 +000014473$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014474
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014475fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014476
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14478$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14480/* end confdefs.h. */
14481
14482int
14483main ()
14484{
14485
14486 unsigned int fpcr;
14487 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14488 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14489
14490 ;
14491 return 0;
14492}
14493_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014494if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014495 have_gcc_asm_for_mc68881=yes
14496else
14497 have_gcc_asm_for_mc68881=no
14498fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014499rm -f core conftest.err conftest.$ac_objext \
14500 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14502$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14503if test "$have_gcc_asm_for_mc68881" = yes
14504then
14505
14506$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14507
14508fi
14509
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014510# Detect whether system arithmetic is subject to x87-style double
14511# rounding issues. The result of this test has little meaning on non
14512# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14513# mode is round-to-nearest and double rounding issues are present, and
14514# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14516$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014517# $BASECFLAGS may affect the result
14518ac_save_cc="$CC"
14519CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014520if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014521 ac_cv_x87_double_rounding=no
14522else
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014524/* end confdefs.h. */
14525
14526#include <stdlib.h>
14527#include <math.h>
14528int main() {
14529 volatile double x, y, z;
14530 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14531 x = 0.99999999999999989; /* 1-2**-53 */
14532 y = 1./x;
14533 if (y != 1.)
14534 exit(0);
14535 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14536 x = 1e16;
14537 y = 2.99999;
14538 z = x + y;
14539 if (z != 1e16+4.)
14540 exit(0);
14541 /* both tests show evidence of double rounding */
14542 exit(1);
14543}
14544
14545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014546if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014547 ac_cv_x87_double_rounding=no
14548else
Matthias Kloseb9621712010-04-24 17:59:49 +000014549 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14552 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014553fi
14554
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014555CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14557$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014558if test "$ac_cv_x87_double_rounding" = yes
14559then
14560
Matthias Kloseb9621712010-04-24 17:59:49 +000014561$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014562
14563fi
14564
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014565# ************************************
14566# * Check for mathematical functions *
14567# ************************************
14568
14569LIBS_SAVE=$LIBS
14570LIBS="$LIBS $LIBM"
14571
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014572for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14573do :
14574 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14575ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014576if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014577 cat >>confdefs.h <<_ACEOF
14578#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14579_ACEOF
14580
14581fi
14582done
14583
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014584for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014585do :
14586 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14587ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014588if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014589 cat >>confdefs.h <<_ACEOF
14590#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14591_ACEOF
14592
14593fi
14594done
14595
14596ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14597"
Victor Stinnere0be4232011-10-25 13:06:09 +020014598if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014599 ac_have_decl=1
14600else
14601 ac_have_decl=0
14602fi
14603
14604cat >>confdefs.h <<_ACEOF
14605#define HAVE_DECL_ISINF $ac_have_decl
14606_ACEOF
14607ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14608"
Victor Stinnere0be4232011-10-25 13:06:09 +020014609if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014610 ac_have_decl=1
14611else
14612 ac_have_decl=0
14613fi
14614
14615cat >>confdefs.h <<_ACEOF
14616#define HAVE_DECL_ISNAN $ac_have_decl
14617_ACEOF
14618ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14619"
Victor Stinnere0be4232011-10-25 13:06:09 +020014620if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014621 ac_have_decl=1
14622else
14623 ac_have_decl=0
14624fi
14625
14626cat >>confdefs.h <<_ACEOF
14627#define HAVE_DECL_ISFINITE $ac_have_decl
14628_ACEOF
14629
14630
Mark Dickinsona614f042009-11-28 12:48:43 +000014631# For multiprocessing module, check that sem_open
14632# actually works. For FreeBSD versions <= 7.2,
14633# the kernel module that provides POSIX semaphores
14634# isn't loaded by default, so an attempt to call
14635# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14637$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014638if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014640else
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014642 ac_cv_posix_semaphores_enabled=yes
14643else
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014645/* end confdefs.h. */
14646
14647#include <unistd.h>
14648#include <fcntl.h>
14649#include <stdio.h>
14650#include <semaphore.h>
14651#include <sys/stat.h>
14652
14653int main(void) {
14654 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14655 if (a == SEM_FAILED) {
14656 perror("sem_open");
14657 return 1;
14658 }
14659 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014660 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014661 return 0;
14662}
14663
14664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014665if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014666 ac_cv_posix_semaphores_enabled=yes
14667else
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14671 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014672fi
14673
14674
Mark Dickinsona614f042009-11-28 12:48:43 +000014675fi
14676
Matthias Kloseb9621712010-04-24 17:59:49 +000014677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14678$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014679if test $ac_cv_posix_semaphores_enabled = no
14680then
14681
Matthias Kloseb9621712010-04-24 17:59:49 +000014682$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014683
14684fi
14685
Mark Dickinson10683072009-04-18 21:18:19 +000014686# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14688$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014689if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014691else
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014693 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014694else
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014696/* end confdefs.h. */
14697
14698#include <unistd.h>
14699#include <fcntl.h>
14700#include <stdio.h>
14701#include <semaphore.h>
14702#include <sys/stat.h>
14703
14704int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014705 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014706 int count;
14707 int res;
14708 if(a==SEM_FAILED){
14709 perror("sem_open");
14710 return 1;
14711
14712 }
14713 res = sem_getvalue(a, &count);
14714 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014715 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014716 return res==-1 ? 1 : 0;
14717}
14718
Mark Dickinson10683072009-04-18 21:18:19 +000014719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014720if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014721 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014722else
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014727fi
14728
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014729
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014730fi
14731
Matthias Kloseb9621712010-04-24 17:59:49 +000014732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14733$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014734if test $ac_cv_broken_sem_getvalue = yes
14735then
14736
Matthias Kloseb9621712010-04-24 17:59:49 +000014737$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014738
14739fi
14740
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014741ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14742"
14743if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14744 ac_have_decl=1
14745else
14746 ac_have_decl=0
14747fi
14748
14749cat >>confdefs.h <<_ACEOF
14750#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14751_ACEOF
14752ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14753"
14754if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14755 ac_have_decl=1
14756else
14757 ac_have_decl=0
14758fi
14759
14760cat >>confdefs.h <<_ACEOF
14761#define HAVE_DECL_RTLD_NOW $ac_have_decl
14762_ACEOF
14763ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14764"
14765if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14766 ac_have_decl=1
14767else
14768 ac_have_decl=0
14769fi
14770
14771cat >>confdefs.h <<_ACEOF
14772#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14773_ACEOF
14774ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14775"
14776if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14777 ac_have_decl=1
14778else
14779 ac_have_decl=0
14780fi
14781
14782cat >>confdefs.h <<_ACEOF
14783#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14784_ACEOF
14785ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14786"
14787if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14788 ac_have_decl=1
14789else
14790 ac_have_decl=0
14791fi
14792
14793cat >>confdefs.h <<_ACEOF
14794#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14795_ACEOF
14796ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14797"
14798if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14799 ac_have_decl=1
14800else
14801 ac_have_decl=0
14802fi
14803
14804cat >>confdefs.h <<_ACEOF
14805#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14806_ACEOF
14807ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14808"
14809if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14810 ac_have_decl=1
14811else
14812 ac_have_decl=0
14813fi
14814
14815cat >>confdefs.h <<_ACEOF
14816#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14817_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014818ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14819"
14820if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14821 ac_have_decl=1
14822else
14823 ac_have_decl=0
14824fi
14825
14826cat >>confdefs.h <<_ACEOF
14827#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14828_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014829
14830
Mark Dickinsonbd792642009-03-18 20:06:12 +000014831# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14833$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014834# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014835if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014836 enableval=$enable_big_digits; case $enable_big_digits in
14837yes)
14838 enable_big_digits=30 ;;
14839no)
14840 enable_big_digits=15 ;;
1484115|30)
14842 ;;
14843*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014844 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 +000014845esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14847$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014848
14849cat >>confdefs.h <<_ACEOF
14850#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14851_ACEOF
14852
14853
14854else
Matthias Kloseb9621712010-04-24 17:59:49 +000014855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14856$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014857fi
14858
14859
Guido van Rossumef2255b2000-03-10 22:30:29 +000014860# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014861ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014862if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014863
14864
Matthias Kloseb9621712010-04-24 17:59:49 +000014865$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014866
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014867 wchar_h="yes"
14868
Guido van Rossumef2255b2000-03-10 22:30:29 +000014869else
Martin v. Löwis11437992002-04-12 09:54:03 +000014870 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014871
14872fi
14873
Michael W. Hudson54241132001-12-07 15:38:26 +000014874
Martin v. Löwis11437992002-04-12 09:54:03 +000014875
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014876# determine wchar_t size
14877if test "$wchar_h" = yes
14878then
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014880# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14881# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14882# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14884$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014885if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014887else
Matthias Kloseb9621712010-04-24 17:59:49 +000014888 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14889"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014890
Martin v. Löwis11437992002-04-12 09:54:03 +000014891else
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 if test "$ac_cv_type_wchar_t" = yes; then
14893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014895as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014896See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897 else
14898 ac_cv_sizeof_wchar_t=0
14899 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014901
Martin v. Löwis11437992002-04-12 09:54:03 +000014902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14904$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905
14906
14907
Martin v. Löwis11437992002-04-12 09:54:03 +000014908cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014909#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014910_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014911
Michael W. Hudson54241132001-12-07 15:38:26 +000014912
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014913fi
14914
Matthias Kloseb9621712010-04-24 17:59:49 +000014915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14916$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014917have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014919/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014920
14921#include <tcl.h>
14922#if TCL_UTF_MAX != 6
14923# error "NOT UCS4_TCL"
14924#endif
14925int
14926main ()
14927{
14928
14929 ;
14930 return 0;
14931}
14932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014933if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014934
14935
Matthias Kloseb9621712010-04-24 17:59:49 +000014936$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014937
14938 have_ucs4_tcl=yes
14939
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14943$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014944
Skip Montanaro6dead952003-09-25 14:50:04 +000014945# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014946if test "$wchar_h" = yes
14947then
14948 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14950$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014951 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014953else
14954
Matthias Kloseb9621712010-04-24 17:59:49 +000014955 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014956 ac_cv_wchar_t_signed=yes
14957else
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014959/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014960
14961 #include <wchar.h>
14962 int main()
14963 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014964 /* Success: exit code 0 */
14965 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014966 }
14967
14968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014969if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014970 ac_cv_wchar_t_signed=yes
14971else
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014973fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014974rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14975 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014976fi
14977
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014978fi
14979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14981$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982fi
14983
Michael Osipov3738fad2018-08-24 18:17:19 +020014984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14985$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014986# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014987if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014988 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014989then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014990
Matthias Kloseb9621712010-04-24 17:59:49 +000014991$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014992
Michael Osipov3738fad2018-08-24 18:17:19 +020014993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14994$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014995else
Michael Osipov3738fad2018-08-24 18:17:19 +020014996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14997$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014998fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014999
15000# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15002$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015003if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015005else
Matthias Kloseb9621712010-04-24 17:59:49 +000015006 ac_cv_c_bigendian=unknown
15007 # See if we're dealing with a universal compiler.
15008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15009/* end confdefs.h. */
15010#ifndef __APPLE_CC__
15011 not a universal capable compiler
15012 #endif
15013 typedef int dummy;
15014
Skip Montanaro6dead952003-09-25 14:50:04 +000015015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015016if ac_fn_c_try_compile "$LINENO"; then :
15017
15018 # Check for potential -arch flags. It is not universal unless
15019 # there are at least two -arch flags with different values.
15020 ac_arch=
15021 ac_prev=
15022 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15023 if test -n "$ac_prev"; then
15024 case $ac_word in
15025 i?86 | x86_64 | ppc | ppc64)
15026 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15027 ac_arch=$ac_word
15028 else
15029 ac_cv_c_bigendian=universal
15030 break
15031 fi
15032 ;;
15033 esac
15034 ac_prev=
15035 elif test "x$ac_word" = "x-arch"; then
15036 ac_prev=arch
15037 fi
15038 done
15039fi
15040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15041 if test $ac_cv_c_bigendian = unknown; then
15042 # See if sys/param.h defines the BYTE_ORDER macro.
15043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015044/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015045#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015046 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015047
Martin v. Löwis11437992002-04-12 09:54:03 +000015048int
15049main ()
15050{
Matthias Kloseb9621712010-04-24 17:59:49 +000015051#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15052 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15053 && LITTLE_ENDIAN)
15054 bogus endian macros
15055 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015056
15057 ;
15058 return 0;
15059}
15060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015061if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015062 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015064/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015065#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015066 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015067
Martin v. Löwis11437992002-04-12 09:54:03 +000015068int
15069main ()
15070{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015071#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015072 not big endian
15073 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015074
15075 ;
15076 return 0;
15077}
15078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015079if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015080 ac_cv_c_bigendian=yes
15081else
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015085fi
15086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15087 fi
15088 if test $ac_cv_c_bigendian = unknown; then
15089 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015091/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015092#include <limits.h>
15093
Martin v. Löwis11437992002-04-12 09:54:03 +000015094int
15095main ()
15096{
Matthias Kloseb9621712010-04-24 17:59:49 +000015097#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15098 bogus endian macros
15099 #endif
15100
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 ;
15102 return 0;
15103}
15104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015105if ac_fn_c_try_compile "$LINENO"; then :
15106 # It does; now see whether it defined to _BIG_ENDIAN or not.
15107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15108/* end confdefs.h. */
15109#include <limits.h>
15110
15111int
15112main ()
15113{
15114#ifndef _BIG_ENDIAN
15115 not big endian
15116 #endif
15117
15118 ;
15119 return 0;
15120}
15121_ACEOF
15122if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015124else
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15128fi
15129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15130 fi
15131 if test $ac_cv_c_bigendian = unknown; then
15132 # Compile a test program.
15133 if test "$cross_compiling" = yes; then :
15134 # Try to guess by grepping values from an object file.
15135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15136/* end confdefs.h. */
15137short int ascii_mm[] =
15138 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15139 short int ascii_ii[] =
15140 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15141 int use_ascii (int i) {
15142 return ascii_mm[i] + ascii_ii[i];
15143 }
15144 short int ebcdic_ii[] =
15145 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15146 short int ebcdic_mm[] =
15147 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15148 int use_ebcdic (int i) {
15149 return ebcdic_mm[i] + ebcdic_ii[i];
15150 }
15151 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152
Matthias Kloseb9621712010-04-24 17:59:49 +000015153int
15154main ()
15155{
15156return use_ascii (foo) == use_ebcdic (foo);
15157 ;
15158 return 0;
15159}
15160_ACEOF
15161if ac_fn_c_try_compile "$LINENO"; then :
15162 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15163 ac_cv_c_bigendian=yes
15164 fi
15165 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15166 if test "$ac_cv_c_bigendian" = unknown; then
15167 ac_cv_c_bigendian=no
15168 else
15169 # finding both strings is unlikely to happen, but who knows?
15170 ac_cv_c_bigendian=unknown
15171 fi
15172 fi
15173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015175else
Matthias Kloseb9621712010-04-24 17:59:49 +000015176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015177/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015179int
15180main ()
15181{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 /* Are we little or big endian? From Harbison&Steele. */
15184 union
15185 {
15186 long int l;
15187 char c[sizeof (long int)];
15188 } u;
15189 u.l = 1;
15190 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191
15192 ;
15193 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015194}
Martin v. Löwis11437992002-04-12 09:54:03 +000015195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015196if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015197 ac_cv_c_bigendian=no
15198else
Matthias Kloseb9621712010-04-24 17:59:49 +000015199 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15202 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204
Matthias Kloseb9621712010-04-24 17:59:49 +000015205 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15208$as_echo "$ac_cv_c_bigendian" >&6; }
15209 case $ac_cv_c_bigendian in #(
15210 yes)
15211 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15212;; #(
15213 no)
15214 ;; #(
15215 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015216
Matthias Kloseb9621712010-04-24 17:59:49 +000015217$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 ;; #(
15220 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015221 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015222 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015224
Michael W. Hudson54241132001-12-07 15:38:26 +000015225
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015226# ABI version string for Python extension modules. This appears between the
15227# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15228# from the following attributes which affect the ABI of this Python build (in
15229# this order):
15230#
15231# * The Python implementation (always 'cpython-' for us)
15232# * The major and minor version numbers
15233# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015234#
15235# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015236# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15237# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015238#
15239# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15240# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015241
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15243$as_echo_n "checking ABIFLAGS... " >&6; }
15244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15245$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15247$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015248SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15250$as_echo "$SOABI" >&6; }
15251
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015252# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15253if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015254 # Similar to SOABI but remove "d" flag from ABIFLAGS
15255
15256 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15257
15258cat >>confdefs.h <<_ACEOF
15259#define ALT_SOABI "${ALT_SOABI}"
15260_ACEOF
15261
15262fi
15263
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015264
15265case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015266 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015267 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15268 *)
15269 EXT_SUFFIX=${SHLIB_SUFFIX};;
15270esac
15271
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15273$as_echo_n "checking LDVERSION... " >&6; }
15274LDVERSION='$(VERSION)$(ABIFLAGS)'
15275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15276$as_echo "$LDVERSION" >&6; }
15277
E. M. Brayc994c8f2019-05-24 17:33:47 +020015278# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015279
E. M. Brayb1fc4172019-05-24 18:39:39 +020015280if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015281 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015282else
15283 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015284fi
15285
doko@python.org87421192013-01-26 11:39:31 +010015286
Victor Stinner8510f432020-03-10 09:53:09 +010015287# Check for --with-libdir-name
15288# /usr/$LIDIRNAME/python$VERSION
15289
15290PLATLIBDIR="lib"
15291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15292$as_echo_n "checking for --with-platlibdir... " >&6; }
15293
15294# Check whether --with-platlibdir was given.
15295if test "${with_platlibdir+set}" = set; then :
15296 withval=$with_platlibdir;
15297# ignore 3 options:
15298# --with-platlibdir
15299# --with-platlibdir=
15300# --without-platlibdir
15301if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15302then
15303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15304$as_echo "yes" >&6; }
15305 PLATLIBDIR="$withval"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015306else
Victor Stinner8510f432020-03-10 09:53:09 +010015307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15308$as_echo "no" >&6; }
15309fi
15310else
15311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15312$as_echo "no" >&6; }
15313fi
15314
15315
15316
15317
15318if test x$PLATFORM_TRIPLET = x; then
15319 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15320else
15321 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015322fi
doko@python.org87421192013-01-26 11:39:31 +010015323
15324
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015325# Check whether right shifting a negative integer extends the sign bit
15326# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15328$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015329if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015330 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015331else
Martin v. Löwis11437992002-04-12 09:54:03 +000015332
Matthias Kloseb9621712010-04-24 17:59:49 +000015333if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015334 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015335else
Matthias Kloseb9621712010-04-24 17:59:49 +000015336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015337/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015338
15339int main()
15340{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015341 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015342}
15343
Martin v. Löwis11437992002-04-12 09:54:03 +000015344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015345if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015346 ac_cv_rshift_extends_sign=yes
15347else
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15351 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015352fi
15353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354fi
15355
Matthias Kloseb9621712010-04-24 17:59:49 +000015356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15357$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015358if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015359then
Martin v. Löwis11437992002-04-12 09:54:03 +000015360
Matthias Kloseb9621712010-04-24 17:59:49 +000015361$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015362
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015363fi
15364
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015365# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15367$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015368if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015369 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015370else
Martin v. Löwis11437992002-04-12 09:54:03 +000015371
Matthias Kloseb9621712010-04-24 17:59:49 +000015372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015373/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015374#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015375int
15376main ()
15377{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015378
15379 FILE *f = fopen("/dev/null", "r");
15380 flockfile(f);
15381 getc_unlocked(f);
15382 funlockfile(f);
15383
Martin v. Löwis11437992002-04-12 09:54:03 +000015384 ;
15385 return 0;
15386}
15387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015388if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015389 ac_cv_have_getc_unlocked=yes
15390else
Matthias Kloseb9621712010-04-24 17:59:49 +000015391 ac_cv_have_getc_unlocked=no
15392fi
15393rm -f core conftest.err conftest.$ac_objext \
15394 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396
Matthias Kloseb9621712010-04-24 17:59:49 +000015397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15398$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015399if test "$ac_cv_have_getc_unlocked" = yes
15400then
Martin v. Löwis11437992002-04-12 09:54:03 +000015401
Matthias Kloseb9621712010-04-24 17:59:49 +000015402$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015403
15404fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015405
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015406# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015407# save the value of LIBS so we don't actually link Python with readline
15408LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015409
Gregory P. Smith18820942008-09-07 06:24:49 +000015410# On some systems we need to link readline to a termcap compatible
15411# library. NOTE: Keep the precedence of listed libraries synchronised
15412# with setup.py.
15413py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15415$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015416for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015417 if test -z "$py_libtermcap"; then
15418 READLINE_LIBS="-lreadline"
15419 else
15420 READLINE_LIBS="-lreadline -l$py_libtermcap"
15421 fi
15422 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015424/* end confdefs.h. */
15425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015426/* Override any GCC internal prototype to avoid an error.
15427 Use char because int might match the return type of a GCC
15428 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015429#ifdef __cplusplus
15430extern "C"
15431#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015432char readline ();
15433int
15434main ()
15435{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015436return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015437 ;
15438 return 0;
15439}
15440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015441if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015442 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015444rm -f core conftest.err conftest.$ac_objext \
15445 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015446 if test $py_cv_lib_readline = yes; then
15447 break
15448 fi
15449done
15450# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15451#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015452if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15454$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015455else
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15457$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015458
Matthias Kloseb9621712010-04-24 17:59:49 +000015459$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015460
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015461fi
15462
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015463# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015465/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015466#include <readline/readline.h>
15467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015468if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015469 have_readline=yes
15470else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015471 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015472
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015473fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015474rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015475if test $have_readline = yes
15476then
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015478/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015479#include <readline/readline.h>
15480
15481_ACEOF
15482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015483 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015484
Matthias Kloseb9621712010-04-24 17:59:49 +000015485$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015486
15487fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015488rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015489
Matthias Kloseb9621712010-04-24 17:59:49 +000015490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015491/* end confdefs.h. */
15492#include <readline/readline.h>
15493
15494_ACEOF
15495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015496 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015497
Matthias Kloseb9621712010-04-24 17:59:49 +000015498$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015499
15500fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015501rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015502
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015503fi
15504
Martin v. Löwis0daad592001-09-30 21:09:59 +000015505# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15507$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015508if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015509 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015510else
Martin v. Löwis11437992002-04-12 09:54:03 +000015511 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015512LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015516/* Override any GCC internal prototype to avoid an error.
15517 Use char because int might match the return type of a GCC
15518 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015519#ifdef __cplusplus
15520extern "C"
15521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015522char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015523int
15524main ()
15525{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015527 ;
15528 return 0;
15529}
15530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015531if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015532 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015533else
Matthias Kloseb9621712010-04-24 17:59:49 +000015534 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015536rm -f core conftest.err conftest.$ac_objext \
15537 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015538LIBS=$ac_check_lib_save_LIBS
15539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15541$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015542if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015543
Matthias Kloseb9621712010-04-24 17:59:49 +000015544$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015545
Martin v. Löwis0daad592001-09-30 21:09:59 +000015546fi
15547
Michael W. Hudson54241132001-12-07 15:38:26 +000015548
Thomas Wouters89d996e2007-09-08 17:39:28 +000015549# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15551$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015552if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015554else
15555 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015556LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015558/* end confdefs.h. */
15559
15560/* Override any GCC internal prototype to avoid an error.
15561 Use char because int might match the return type of a GCC
15562 builtin and then its argument prototype would still apply. */
15563#ifdef __cplusplus
15564extern "C"
15565#endif
15566char rl_completion_display_matches_hook ();
15567int
15568main ()
15569{
15570return rl_completion_display_matches_hook ();
15571 ;
15572 return 0;
15573}
15574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015575if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015576 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15577else
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015580rm -f core conftest.err conftest.$ac_objext \
15581 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015582LIBS=$ac_check_lib_save_LIBS
15583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15585$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015586if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015587
Matthias Kloseb9621712010-04-24 17:59:49 +000015588$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015589
15590fi
15591
15592
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015593# also in 4.0, but not in editline
15594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15595$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15596if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15597 $as_echo_n "(cached) " >&6
15598else
15599 ac_check_lib_save_LIBS=$LIBS
15600LIBS="-lreadline $READLINE_LIBS $LIBS"
15601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15602/* end confdefs.h. */
15603
15604/* Override any GCC internal prototype to avoid an error.
15605 Use char because int might match the return type of a GCC
15606 builtin and then its argument prototype would still apply. */
15607#ifdef __cplusplus
15608extern "C"
15609#endif
15610char rl_resize_terminal ();
15611int
15612main ()
15613{
15614return rl_resize_terminal ();
15615 ;
15616 return 0;
15617}
15618_ACEOF
15619if ac_fn_c_try_link "$LINENO"; then :
15620 ac_cv_lib_readline_rl_resize_terminal=yes
15621else
15622 ac_cv_lib_readline_rl_resize_terminal=no
15623fi
15624rm -f core conftest.err conftest.$ac_objext \
15625 conftest$ac_exeext conftest.$ac_ext
15626LIBS=$ac_check_lib_save_LIBS
15627fi
15628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15629$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15630if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15631
15632$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15633
15634fi
15635
15636
Martin v. Löwis0daad592001-09-30 21:09:59 +000015637# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15639$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015640if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015641 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015642else
Martin v. Löwis11437992002-04-12 09:54:03 +000015643 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015644LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015648/* Override any GCC internal prototype to avoid an error.
15649 Use char because int might match the return type of a GCC
15650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015651#ifdef __cplusplus
15652extern "C"
15653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015654char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015655int
15656main ()
15657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 ;
15660 return 0;
15661}
15662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015665else
Matthias Kloseb9621712010-04-24 17:59:49 +000015666 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015668rm -f core conftest.err conftest.$ac_objext \
15669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015670LIBS=$ac_check_lib_save_LIBS
15671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15673$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015674if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015675
Matthias Kloseb9621712010-04-24 17:59:49 +000015676$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015677
Guido van Rossum353ae582001-07-10 16:45:32 +000015678fi
15679
Jack Jansendd19cf82001-12-06 22:36:17 +000015680
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015681# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015683/* end confdefs.h. */
15684#include <readline/readline.h>
15685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015686if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015687 have_readline=yes
15688else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015689 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015690
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015691fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015692rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015693if test $have_readline = yes
15694then
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015696/* end confdefs.h. */
15697#include <readline/readline.h>
15698
15699_ACEOF
15700if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015701 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015702
Matthias Kloseb9621712010-04-24 17:59:49 +000015703$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015704
15705fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015706rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015707
15708fi
15709
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15711$as_echo_n "checking for append_history in -lreadline... " >&6; }
15712if ${ac_cv_lib_readline_append_history+:} false; then :
15713 $as_echo_n "(cached) " >&6
15714else
15715 ac_check_lib_save_LIBS=$LIBS
15716LIBS="-lreadline $READLINE_LIBS $LIBS"
15717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15718/* end confdefs.h. */
15719
15720/* Override any GCC internal prototype to avoid an error.
15721 Use char because int might match the return type of a GCC
15722 builtin and then its argument prototype would still apply. */
15723#ifdef __cplusplus
15724extern "C"
15725#endif
15726char append_history ();
15727int
15728main ()
15729{
15730return append_history ();
15731 ;
15732 return 0;
15733}
15734_ACEOF
15735if ac_fn_c_try_link "$LINENO"; then :
15736 ac_cv_lib_readline_append_history=yes
15737else
15738 ac_cv_lib_readline_append_history=no
15739fi
15740rm -f core conftest.err conftest.$ac_objext \
15741 conftest$ac_exeext conftest.$ac_ext
15742LIBS=$ac_check_lib_save_LIBS
15743fi
15744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15745$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15746if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15747
15748$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15749
15750fi
15751
15752
Martin v. Löwis82bca632006-02-10 20:49:30 +000015753# End of readline checks: restore LIBS
15754LIBS=$LIBS_no_readline
15755
Matthias Kloseb9621712010-04-24 17:59:49 +000015756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15757$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015758if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015759 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015760else
Martin v. Löwis11437992002-04-12 09:54:03 +000015761
Matthias Kloseb9621712010-04-24 17:59:49 +000015762if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015763 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015764else
Matthias Kloseb9621712010-04-24 17:59:49 +000015765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015766/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015767
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015768#include <stdlib.h>
15769#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015770int main()
15771{
15772 int val1 = nice(1);
15773 if (val1 != -1 && val1 == nice(2))
15774 exit(0);
15775 exit(1);
15776}
15777
Martin v. Löwis11437992002-04-12 09:54:03 +000015778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015779if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015780 ac_cv_broken_nice=yes
15781else
Matthias Kloseb9621712010-04-24 17:59:49 +000015782 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015786fi
15787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015788fi
15789
Matthias Kloseb9621712010-04-24 17:59:49 +000015790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15791$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015792if test "$ac_cv_broken_nice" = yes
15793then
Martin v. Löwis11437992002-04-12 09:54:03 +000015794
Matthias Kloseb9621712010-04-24 17:59:49 +000015795$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015796
15797fi
15798
Matthias Kloseb9621712010-04-24 17:59:49 +000015799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15800$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015801if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015802 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015803else
Matthias Kloseb9621712010-04-24 17:59:49 +000015804 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015805 ac_cv_broken_poll=no
15806else
Matthias Kloseb9621712010-04-24 17:59:49 +000015807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015808/* end confdefs.h. */
15809
15810#include <poll.h>
15811
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015812int main()
15813{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015814 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015815 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015816
15817 close (42);
15818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015819 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015820 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015821 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015822 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015823 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015824 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015825 return 1;
15826}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015827
15828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015829if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015830 ac_cv_broken_poll=yes
15831else
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015837
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015838fi
15839
Matthias Kloseb9621712010-04-24 17:59:49 +000015840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15841$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015842if test "$ac_cv_broken_poll" = yes
15843then
15844
Matthias Kloseb9621712010-04-24 17:59:49 +000015845$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015846
15847fi
15848
Martin v. Löwis1d459062005-03-14 21:23:33 +000015849# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15851$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015852if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015853 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015854else
15855
Matthias Kloseb9621712010-04-24 17:59:49 +000015856if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015857 ac_cv_working_tzset=no
15858else
Matthias Kloseb9621712010-04-24 17:59:49 +000015859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015860/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015861
15862#include <stdlib.h>
15863#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015864#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015865
15866#if HAVE_TZNAME
15867extern char *tzname[];
15868#endif
15869
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015870int main()
15871{
Brett Cannon18367812003-09-19 00:59:16 +000015872 /* Note that we need to ensure that not only does tzset(3)
15873 do 'something' with localtime, but it works as documented
15874 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015875 This includes making sure that tzname is set properly if
15876 tm->tm_zone does not exist since it is the alternative way
15877 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015878
15879 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015880 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015881 */
15882
Martin v. Löwis1d459062005-03-14 21:23:33 +000015883 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015884 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15885
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015886 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015887 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015888 if (localtime(&groundhogday)->tm_hour != 0)
15889 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015890#if HAVE_TZNAME
15891 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15892 if (strcmp(tzname[0], "UTC") ||
15893 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15894 exit(1);
15895#endif
Brett Cannon18367812003-09-19 00:59:16 +000015896
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015897 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015898 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015899 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015900 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015901#if HAVE_TZNAME
15902 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15903 exit(1);
15904#endif
Brett Cannon18367812003-09-19 00:59:16 +000015905
15906 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15907 tzset();
15908 if (localtime(&groundhogday)->tm_hour != 11)
15909 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015910#if HAVE_TZNAME
15911 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15912 exit(1);
15913#endif
15914
15915#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015916 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15917 exit(1);
15918 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15919 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015920#endif
Brett Cannon18367812003-09-19 00:59:16 +000015921
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015922 exit(0);
15923}
15924
15925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015926if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015927 ac_cv_working_tzset=yes
15928else
Matthias Kloseb9621712010-04-24 17:59:49 +000015929 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015933fi
15934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015935fi
15936
Matthias Kloseb9621712010-04-24 17:59:49 +000015937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15938$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015939if test "$ac_cv_working_tzset" = yes
15940then
15941
Matthias Kloseb9621712010-04-24 17:59:49 +000015942$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015943
15944fi
15945
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015946# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15948$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015949if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015950 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015951else
Matthias Kloseb9621712010-04-24 17:59:49 +000015952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015953/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015954#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015955int
15956main ()
15957{
15958
15959struct stat st;
15960st.st_mtim.tv_nsec = 1;
15961
15962 ;
15963 return 0;
15964}
15965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015966if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015967 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015968else
Matthias Kloseb9621712010-04-24 17:59:49 +000015969 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15972fi
15973
Matthias Kloseb9621712010-04-24 17:59:49 +000015974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15975$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015976if test "$ac_cv_stat_tv_nsec" = yes
15977then
15978
Matthias Kloseb9621712010-04-24 17:59:49 +000015979$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015980
15981fi
15982
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015983# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15985$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015986if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015987 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015988else
Matthias Kloseb9621712010-04-24 17:59:49 +000015989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015990/* end confdefs.h. */
15991#include <sys/stat.h>
15992int
15993main ()
15994{
15995
15996struct stat st;
15997st.st_mtimespec.tv_nsec = 1;
15998
15999 ;
16000 return 0;
16001}
16002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016003if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016004 ac_cv_stat_tv_nsec2=yes
16005else
Matthias Kloseb9621712010-04-24 17:59:49 +000016006 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16009fi
16010
Matthias Kloseb9621712010-04-24 17:59:49 +000016011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16012$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016013if test "$ac_cv_stat_tv_nsec2" = yes
16014then
16015
Matthias Kloseb9621712010-04-24 17:59:49 +000016016$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016017
16018fi
16019
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016020# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016021ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016022if test "$cross_compiling" = no; then
16023 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16024fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016025
16026for ac_header in curses.h ncurses.h
16027do :
16028 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16029ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16030if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16031 cat >>confdefs.h <<_ACEOF
16032#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16033_ACEOF
16034
16035fi
16036
16037done
16038
16039
16040# On Solaris, term.h requires curses.h
16041for ac_header in term.h
16042do :
16043 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16044#ifdef HAVE_CURSES_H
16045#include <curses.h>
16046#endif
16047
16048"
16049if test "x$ac_cv_header_term_h" = xyes; then :
16050 cat >>confdefs.h <<_ACEOF
16051#define HAVE_TERM_H 1
16052_ACEOF
16053
16054fi
16055
16056done
16057
16058
Jack Jansen666b1e72001-10-31 12:11:48 +000016059# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16061$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016062if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016063 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016064else
Matthias Kloseb9621712010-04-24 17:59:49 +000016065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016066/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016067#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016068int
16069main ()
16070{
Jack Jansen666b1e72001-10-31 12:11:48 +000016071
16072 int rtn;
16073 rtn = mvwdelch(0,0,0);
16074
Martin v. Löwis11437992002-04-12 09:54:03 +000016075 ;
16076 return 0;
16077}
16078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016079if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016080 ac_cv_mvwdelch_is_expression=yes
16081else
Matthias Kloseb9621712010-04-24 17:59:49 +000016082 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16085fi
16086
Matthias Kloseb9621712010-04-24 17:59:49 +000016087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16088$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016089
16090if test "$ac_cv_mvwdelch_is_expression" = yes
16091then
Martin v. Löwis11437992002-04-12 09:54:03 +000016092
Matthias Kloseb9621712010-04-24 17:59:49 +000016093$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016094
16095fi
16096
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016097# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16098# structs since version 5.7. If the macro is defined as zero before including
16099# [n]curses.h, ncurses will expose fields of the structs regardless of the
16100# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16102$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016103if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016104 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016105else
Matthias Kloseb9621712010-04-24 17:59:49 +000016106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016107/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016108
16109 #define NCURSES_OPAQUE 0
16110 #include <curses.h>
16111
Martin v. Löwis11437992002-04-12 09:54:03 +000016112int
16113main ()
16114{
Jack Jansen666b1e72001-10-31 12:11:48 +000016115
16116 WINDOW *w;
16117 w->_flags = 0;
16118
Martin v. Löwis11437992002-04-12 09:54:03 +000016119 ;
16120 return 0;
16121}
16122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016123if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016124 ac_cv_window_has_flags=yes
16125else
Matthias Kloseb9621712010-04-24 17:59:49 +000016126 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16129fi
16130
Matthias Kloseb9621712010-04-24 17:59:49 +000016131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16132$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016133
Jack Jansen666b1e72001-10-31 12:11:48 +000016134
16135if test "$ac_cv_window_has_flags" = yes
16136then
Martin v. Löwis11437992002-04-12 09:54:03 +000016137
Matthias Kloseb9621712010-04-24 17:59:49 +000016138$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016139
16140fi
16141
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16143$as_echo_n "checking for is_pad... " >&6; }
16144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16145/* end confdefs.h. */
16146#include <curses.h>
16147int
16148main ()
16149{
16150
16151#ifndef is_pad
16152void *x=is_pad
16153#endif
16154
16155 ;
16156 return 0;
16157}
16158_ACEOF
16159if ac_fn_c_try_compile "$LINENO"; then :
16160
16161$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16162
16163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16164$as_echo "yes" >&6; }
16165else
16166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16167$as_echo "no" >&6; }
16168
16169fi
16170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16171
Matthias Kloseb9621712010-04-24 17:59:49 +000016172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16173$as_echo_n "checking for is_term_resized... " >&6; }
16174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016175/* end confdefs.h. */
16176#include <curses.h>
16177int
16178main ()
16179{
16180void *x=is_term_resized
16181 ;
16182 return 0;
16183}
16184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016185if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016186
Matthias Kloseb9621712010-04-24 17:59:49 +000016187$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016188
Matthias Kloseb159a552010-04-25 21:00:44 +000016189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016190$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016191else
Matthias Kloseb9621712010-04-24 17:59:49 +000016192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16193$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016194
16195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16197
Matthias Kloseb9621712010-04-24 17:59:49 +000016198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16199$as_echo_n "checking for resize_term... " >&6; }
16200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016201/* end confdefs.h. */
16202#include <curses.h>
16203int
16204main ()
16205{
16206void *x=resize_term
16207 ;
16208 return 0;
16209}
16210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016211if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016212
Matthias Kloseb9621712010-04-24 17:59:49 +000016213$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016214
Matthias Kloseb159a552010-04-25 21:00:44 +000016215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016216$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016217else
Matthias Kloseb9621712010-04-24 17:59:49 +000016218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16219$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016220
16221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16223
Matthias Kloseb9621712010-04-24 17:59:49 +000016224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16225$as_echo_n "checking for resizeterm... " >&6; }
16226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016227/* end confdefs.h. */
16228#include <curses.h>
16229int
16230main ()
16231{
16232void *x=resizeterm
16233 ;
16234 return 0;
16235}
16236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016237if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016238
Matthias Kloseb9621712010-04-24 17:59:49 +000016239$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016240
Matthias Kloseb159a552010-04-25 21:00:44 +000016241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016242$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016243else
Matthias Kloseb9621712010-04-24 17:59:49 +000016244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16245$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016246
16247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016249
16250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16251$as_echo_n "checking for immedok... " >&6; }
16252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16253/* end confdefs.h. */
16254#include <curses.h>
16255int
16256main ()
16257{
16258
16259#ifndef immedok
16260void *x=immedok
16261#endif
16262
16263 ;
16264 return 0;
16265}
16266_ACEOF
16267if ac_fn_c_try_compile "$LINENO"; then :
16268
16269$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16270
16271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16272$as_echo "yes" >&6; }
16273else
16274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16275$as_echo "no" >&6; }
16276
16277fi
16278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16279
16280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16281$as_echo_n "checking for syncok... " >&6; }
16282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16283/* end confdefs.h. */
16284#include <curses.h>
16285int
16286main ()
16287{
16288
16289#ifndef syncok
16290void *x=syncok
16291#endif
16292
16293 ;
16294 return 0;
16295}
16296_ACEOF
16297if ac_fn_c_try_compile "$LINENO"; then :
16298
16299$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16300
16301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16302$as_echo "yes" >&6; }
16303else
16304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16305$as_echo "no" >&6; }
16306
16307fi
16308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16309
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16311$as_echo_n "checking for wchgat... " >&6; }
16312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16313/* end confdefs.h. */
16314#include <curses.h>
16315int
16316main ()
16317{
16318
16319#ifndef wchgat
16320void *x=wchgat
16321#endif
16322
16323 ;
16324 return 0;
16325}
16326_ACEOF
16327if ac_fn_c_try_compile "$LINENO"; then :
16328
16329$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16330
16331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16332$as_echo "yes" >&6; }
16333else
16334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16335$as_echo "no" >&6; }
16336
16337fi
16338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16339
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16341$as_echo_n "checking for filter... " >&6; }
16342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16343/* end confdefs.h. */
16344#include <curses.h>
16345int
16346main ()
16347{
16348
16349#ifndef filter
16350void *x=filter
16351#endif
16352
16353 ;
16354 return 0;
16355}
16356_ACEOF
16357if ac_fn_c_try_compile "$LINENO"; then :
16358
16359$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16360
16361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16362$as_echo "yes" >&6; }
16363else
16364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16365$as_echo "no" >&6; }
16366
16367fi
16368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16369
16370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16371$as_echo_n "checking for has_key... " >&6; }
16372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16373/* end confdefs.h. */
16374#include <curses.h>
16375int
16376main ()
16377{
16378
16379#ifndef has_key
16380void *x=has_key
16381#endif
16382
16383 ;
16384 return 0;
16385}
16386_ACEOF
16387if ac_fn_c_try_compile "$LINENO"; then :
16388
16389$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16390
16391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16392$as_echo "yes" >&6; }
16393else
16394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16395$as_echo "no" >&6; }
16396
16397fi
16398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16399
16400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16401$as_echo_n "checking for typeahead... " >&6; }
16402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16403/* end confdefs.h. */
16404#include <curses.h>
16405int
16406main ()
16407{
16408
16409#ifndef typeahead
16410void *x=typeahead
16411#endif
16412
16413 ;
16414 return 0;
16415}
16416_ACEOF
16417if ac_fn_c_try_compile "$LINENO"; then :
16418
16419$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16420
16421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16422$as_echo "yes" >&6; }
16423else
16424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16425$as_echo "no" >&6; }
16426
16427fi
16428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16429
16430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16431$as_echo_n "checking for use_env... " >&6; }
16432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16433/* end confdefs.h. */
16434#include <curses.h>
16435int
16436main ()
16437{
16438
16439#ifndef use_env
16440void *x=use_env
16441#endif
16442
16443 ;
16444 return 0;
16445}
16446_ACEOF
16447if ac_fn_c_try_compile "$LINENO"; then :
16448
16449$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16450
16451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16452$as_echo "yes" >&6; }
16453else
16454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16455$as_echo "no" >&6; }
16456
16457fi
16458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016459# last curses configure check
16460CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016461
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16463$as_echo "$as_me: checking for device files" >&6;}
16464
16465if test "x$cross_compiling" = xyes; then
16466 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16468$as_echo_n "checking for /dev/ptmx... " >&6; }
16469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16470$as_echo "not set" >&6; }
16471 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16472 fi
16473 if test "${ac_cv_file__dev_ptc+set}" != set; then
16474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16475$as_echo_n "checking for /dev/ptc... " >&6; }
16476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16477$as_echo "not set" >&6; }
16478 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16479 fi
16480fi
16481
Matthias Kloseb9621712010-04-24 17:59:49 +000016482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16483$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016484if ${ac_cv_file__dev_ptmx+:} false; then :
16485 $as_echo_n "(cached) " >&6
16486else
16487 test "$cross_compiling" = yes &&
16488 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16489if test -r "/dev/ptmx"; then
16490 ac_cv_file__dev_ptmx=yes
16491else
16492 ac_cv_file__dev_ptmx=no
16493fi
16494fi
16495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16496$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16497if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016498
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016499fi
16500
16501if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016502
Matthias Kloseb9621712010-04-24 17:59:49 +000016503$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016504
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16507$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016508if ${ac_cv_file__dev_ptc+:} false; then :
16509 $as_echo_n "(cached) " >&6
16510else
16511 test "$cross_compiling" = yes &&
16512 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16513if test -r "/dev/ptc"; then
16514 ac_cv_file__dev_ptc=yes
16515else
16516 ac_cv_file__dev_ptc=no
16517fi
16518fi
16519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16520$as_echo "$ac_cv_file__dev_ptc" >&6; }
16521if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016522
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016523fi
16524
16525if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016526
Matthias Kloseb9621712010-04-24 17:59:49 +000016527$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016528
Neal Norwitz865400f2003-03-21 01:42:58 +000016529fi
16530
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016531if test $ac_sys_system = Darwin
16532then
16533 LIBS="$LIBS -framework CoreFoundation"
16534fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016535
Matthias Kloseb9621712010-04-24 17:59:49 +000016536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16537$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016538if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016539 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016540else
Matthias Kloseb9621712010-04-24 17:59:49 +000016541 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016542 ac_cv_have_size_t_format="cross -- assuming yes"
16543
Thomas Wouters477c8d52006-05-27 19:21:47 +000016544else
Matthias Kloseb9621712010-04-24 17:59:49 +000016545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016546/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016547
Thomas Wouters477c8d52006-05-27 19:21:47 +000016548#include <stdio.h>
16549#include <stddef.h>
16550#include <string.h>
16551
Christian Heimes2c181612007-12-17 20:04:13 +000016552#ifdef HAVE_SYS_TYPES_H
16553#include <sys/types.h>
16554#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016555
16556#ifdef HAVE_SSIZE_T
16557typedef ssize_t Py_ssize_t;
16558#elif SIZEOF_VOID_P == SIZEOF_LONG
16559typedef long Py_ssize_t;
16560#else
16561typedef int Py_ssize_t;
16562#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016563
Christian Heimes2c181612007-12-17 20:04:13 +000016564int main()
16565{
16566 char buffer[256];
16567
Thomas Wouters477c8d52006-05-27 19:21:47 +000016568 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16569 return 1;
16570
Thomas Wouters89f507f2006-12-13 04:49:30 +000016571 if (strcmp(buffer, "123"))
16572 return 1;
16573
16574 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16575 return 1;
16576
16577 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016578 return 1;
16579
16580 return 0;
16581}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016582
Thomas Wouters477c8d52006-05-27 19:21:47 +000016583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016584if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016585 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016586else
Matthias Kloseb9621712010-04-24 17:59:49 +000016587 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16590 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016591fi
16592
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16595$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016596if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016597
Matthias Kloseb9621712010-04-24 17:59:49 +000016598$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016599
16600fi
16601
Matthias Kloseb9621712010-04-24 17:59:49 +000016602ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016603#ifdef HAVE_SYS_TYPES_H
16604#include <sys/types.h>
16605#endif
16606#ifdef HAVE_SYS_SOCKET_H
16607#include <sys/socket.h>
16608#endif
16609
Matthias Kloseb9621712010-04-24 17:59:49 +000016610"
Victor Stinnere0be4232011-10-25 13:06:09 +020016611if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016612
Martin v. Löwis11437992002-04-12 09:54:03 +000016613else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016614
Matthias Kloseb9621712010-04-24 17:59:49 +000016615$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016616
16617fi
16618
Michael W. Hudson54241132001-12-07 15:38:26 +000016619
Matthias Kloseb9621712010-04-24 17:59:49 +000016620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16621$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016622if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016623 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016624else
Matthias Kloseb9621712010-04-24 17:59:49 +000016625 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016626 ac_cv_broken_mbstowcs=no
16627else
Matthias Kloseb9621712010-04-24 17:59:49 +000016628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016629/* end confdefs.h. */
16630
Stefan Krah19c21392012-11-22 23:47:32 +010016631#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016632#include<stdlib.h>
16633int main() {
16634 size_t len = -1;
16635 const char *str = "text";
16636 len = mbstowcs(NULL, str, 0);
16637 return (len != 4);
16638}
16639
16640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016641if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016642 ac_cv_broken_mbstowcs=no
16643else
Matthias Kloseb9621712010-04-24 17:59:49 +000016644 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016648fi
16649
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016650fi
16651
Matthias Kloseb9621712010-04-24 17:59:49 +000016652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16653$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016654if test "$ac_cv_broken_mbstowcs" = yes
16655then
16656
Matthias Kloseb9621712010-04-24 17:59:49 +000016657$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016658
16659fi
16660
Antoine Pitroub52ec782009-01-25 16:34:23 +000016661# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16663$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016664
16665# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016666if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016667 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016668if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016669then
16670
Matthias Kloseb9621712010-04-24 17:59:49 +000016671$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016672
Matthias Kloseb9621712010-04-24 17:59:49 +000016673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16674$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016675fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016676if test "$withval" = no
16677then
16678
16679$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16680
Matthias Kloseb9621712010-04-24 17:59:49 +000016681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16682$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016683fi
16684
Antoine Pitrou042b1282010-08-13 21:15:58 +000016685else
16686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16687$as_echo "no value specified" >&6; }
16688fi
16689
Antoine Pitroub52ec782009-01-25 16:34:23 +000016690
Matthias Kloseb17289e2012-03-15 19:51:34 +010016691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16692$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16693if ${ac_cv_computed_gotos+:} false; then :
16694 $as_echo_n "(cached) " >&6
16695else
16696 if test "$cross_compiling" = yes; then :
16697 if test "${with_computed_gotos+set}" = set; then
16698 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16699 else
16700 ac_cv_computed_gotos=no
16701 fi
16702else
16703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16704/* end confdefs.h. */
16705
16706int main(int argc, char **argv)
16707{
16708 static void *targets[1] = { &&LABEL1 };
16709 goto LABEL2;
16710LABEL1:
16711 return 0;
16712LABEL2:
16713 goto *targets[0];
16714 return 1;
16715}
16716
16717_ACEOF
16718if ac_fn_c_try_run "$LINENO"; then :
16719 ac_cv_computed_gotos=yes
16720else
16721 ac_cv_computed_gotos=no
16722fi
16723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16724 conftest.$ac_objext conftest.beam conftest.$ac_ext
16725fi
16726
16727fi
16728
16729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16730$as_echo "$ac_cv_computed_gotos" >&6; }
16731case "$ac_cv_computed_gotos" in yes*)
16732
16733$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16734
16735esac
16736
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016737case $ac_sys_system in
16738AIX*)
16739
16740$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16741 ;;
16742esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016743
Michael W. Hudson54241132001-12-07 15:38:26 +000016744
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016745
16746
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016747for h in `(cd $srcdir;echo Python/thread_*.h)`
16748do
16749 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16750done
16751
Michael W. Hudson54241132001-12-07 15:38:26 +000016752
Pablo Galindoa25f3c42020-04-23 01:38:11 +010016753SRCDIRS="Parser Parser/pegen Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16755$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016756for dir in $SRCDIRS; do
16757 if test ! -d $dir; then
16758 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016759 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016760done
Matthias Kloseb9621712010-04-24 17:59:49 +000016761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16762$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016763
Stefan Krah1919b7e2012-03-21 18:25:23 +010016764# Availability of -O2:
16765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16766$as_echo_n "checking for -O2... " >&6; }
16767saved_cflags="$CFLAGS"
16768CFLAGS="-O2"
16769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16770/* end confdefs.h. */
16771
16772int
16773main ()
16774{
16775
16776
16777 ;
16778 return 0;
16779}
16780_ACEOF
16781if ac_fn_c_try_compile "$LINENO"; then :
16782 have_O2=yes
16783else
16784 have_O2=no
16785fi
16786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16788$as_echo "$have_O2" >&6; }
16789CFLAGS="$saved_cflags"
16790
16791# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16792# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16794$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16795saved_cflags="$CFLAGS"
16796CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16797if test "$have_O2" = no; then
16798 CFLAGS=""
16799fi
16800if test "$cross_compiling" = yes; then :
16801 have_glibc_memmove_bug=undefined
16802else
16803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16804/* end confdefs.h. */
16805
16806#include <stdio.h>
16807#include <stdlib.h>
16808#include <string.h>
16809void foo(void *p, void *q) { memmove(p, q, 19); }
16810int main() {
16811 char a[32] = "123456789000000000";
16812 foo(&a[9], a);
16813 if (strcmp(a, "123456789123456789000000000") != 0)
16814 return 1;
16815 foo(a, &a[9]);
16816 if (strcmp(a, "123456789000000000") != 0)
16817 return 1;
16818 return 0;
16819}
16820
16821_ACEOF
16822if ac_fn_c_try_run "$LINENO"; then :
16823 have_glibc_memmove_bug=no
16824else
16825 have_glibc_memmove_bug=yes
16826fi
16827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16828 conftest.$ac_objext conftest.beam conftest.$ac_ext
16829fi
16830
16831CFLAGS="$saved_cflags"
16832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16833$as_echo "$have_glibc_memmove_bug" >&6; }
16834if test "$have_glibc_memmove_bug" = yes; then
16835
16836$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16837
16838fi
16839
16840if test "$have_gcc_asm_for_x87" = yes; then
16841 # Some versions of gcc miscompile inline asm:
16842 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16843 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16844 case $CC in
16845 *gcc*)
16846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16847$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16848 saved_cflags="$CFLAGS"
16849 CFLAGS="-O2"
16850 if test "$cross_compiling" = yes; then :
16851 have_ipa_pure_const_bug=undefined
16852else
16853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16854/* end confdefs.h. */
16855
16856 __attribute__((noinline)) int
16857 foo(int *p) {
16858 int r;
16859 asm ( "movl \$6, (%1)\n\t"
16860 "xorl %0, %0\n\t"
16861 : "=r" (r) : "r" (p) : "memory"
16862 );
16863 return r;
16864 }
16865 int main() {
16866 int p = 8;
16867 if ((foo(&p) ? : p) != 6)
16868 return 1;
16869 return 0;
16870 }
16871
16872_ACEOF
16873if ac_fn_c_try_run "$LINENO"; then :
16874 have_ipa_pure_const_bug=no
16875else
16876 have_ipa_pure_const_bug=yes
16877fi
16878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16879 conftest.$ac_objext conftest.beam conftest.$ac_ext
16880fi
16881
16882 CFLAGS="$saved_cflags"
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16884$as_echo "$have_ipa_pure_const_bug" >&6; }
16885 if test "$have_ipa_pure_const_bug" = yes; then
16886
16887$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16888
16889 fi
16890 ;;
16891 esac
16892fi
16893
Victor Stinner4f5366e2015-01-09 02:13:19 +010016894# Check for stdatomic.h
16895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16896$as_echo_n "checking for stdatomic.h... " >&6; }
16897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16898/* end confdefs.h. */
16899
16900
16901 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016902 atomic_int int_var;
16903 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016904 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016905 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16906 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16907 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016908 return 0;
16909 }
16910
16911
16912_ACEOF
16913if ac_fn_c_try_link "$LINENO"; then :
16914 have_stdatomic_h=yes
16915else
16916 have_stdatomic_h=no
16917fi
16918rm -f core conftest.err conftest.$ac_objext \
16919 conftest$ac_exeext conftest.$ac_ext
16920
16921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16922$as_echo "$have_stdatomic_h" >&6; }
16923
16924if test "$have_stdatomic_h" = yes; then
16925
16926$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16927
16928fi
16929
16930# Check for GCC >= 4.7 __atomic builtins
16931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16932$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16934/* end confdefs.h. */
16935
16936
16937 volatile int val = 1;
16938 int main() {
16939 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16940 return 0;
16941 }
16942
16943
16944_ACEOF
16945if ac_fn_c_try_link "$LINENO"; then :
16946 have_builtin_atomic=yes
16947else
16948 have_builtin_atomic=no
16949fi
16950rm -f core conftest.err conftest.$ac_objext \
16951 conftest$ac_exeext conftest.$ac_ext
16952
16953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16954$as_echo "$have_builtin_atomic" >&6; }
16955
16956if test "$have_builtin_atomic" = yes; then
16957
16958$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16959
16960fi
16961
Ned Deily322f5ba2013-11-21 23:01:59 -080016962# ensurepip option
16963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16964$as_echo_n "checking for ensurepip... " >&6; }
16965
16966# Check whether --with-ensurepip was given.
16967if test "${with_ensurepip+set}" = set; then :
16968 withval=$with_ensurepip;
16969else
16970 with_ensurepip=upgrade
16971fi
16972
16973case $with_ensurepip in #(
16974 yes|upgrade) :
16975 ENSUREPIP=upgrade ;; #(
16976 install) :
16977 ENSUREPIP=install ;; #(
16978 no) :
16979 ENSUREPIP=no ;; #(
16980 *) :
16981 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16982esac
16983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16984$as_echo "$ENSUREPIP" >&6; }
16985
16986
Victor Stinner35a97c02015-03-08 02:59:09 +010016987# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16989$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16991/* end confdefs.h. */
16992
16993
16994 #include <dirent.h>
16995
16996 int main() {
16997 struct dirent entry;
16998 return entry.d_type == DT_UNKNOWN;
16999 }
17000
17001
17002_ACEOF
17003if ac_fn_c_try_link "$LINENO"; then :
17004 have_dirent_d_type=yes
17005else
17006 have_dirent_d_type=no
17007fi
17008rm -f core conftest.err conftest.$ac_objext \
17009 conftest$ac_exeext conftest.$ac_ext
17010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17011$as_echo "$have_dirent_d_type" >&6; }
17012
17013if test "$have_dirent_d_type" = yes; then
17014
17015$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17016
17017fi
17018
Victor Stinner9eb57c52015-03-19 22:21:49 +010017019# check if the Linux getrandom() syscall is available
17020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17021$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17023/* end confdefs.h. */
17024
17025
Victor Stinner1b80b242016-04-12 22:34:58 +020017026 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017027 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017028 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017029
17030 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017031 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017032 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017033 const int flags = GRND_NONBLOCK;
17034 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017035 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017036 return 0;
17037 }
17038
17039
17040_ACEOF
17041if ac_fn_c_try_link "$LINENO"; then :
17042 have_getrandom_syscall=yes
17043else
17044 have_getrandom_syscall=no
17045fi
17046rm -f core conftest.err conftest.$ac_objext \
17047 conftest$ac_exeext conftest.$ac_ext
17048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17049$as_echo "$have_getrandom_syscall" >&6; }
17050
17051if test "$have_getrandom_syscall" = yes; then
17052
17053$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17054
17055fi
17056
Victor Stinner3abf44e2015-09-18 15:38:37 +020017057# check if the getrandom() function is available
17058# the test was written for the Solaris function of <sys/random.h>
17059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17060$as_echo_n "checking for the getrandom() function... " >&6; }
17061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17062/* end confdefs.h. */
17063
17064
17065 #include <sys/random.h>
17066
17067 int main() {
17068 char buffer[1];
17069 const size_t buflen = sizeof(buffer);
17070 const int flags = 0;
17071 /* ignore the result, Python checks for ENOSYS at runtime */
17072 (void)getrandom(buffer, buflen, flags);
17073 return 0;
17074 }
17075
17076
17077_ACEOF
17078if ac_fn_c_try_link "$LINENO"; then :
17079 have_getrandom=yes
17080else
17081 have_getrandom=no
17082fi
17083rm -f core conftest.err conftest.$ac_objext \
17084 conftest$ac_exeext conftest.$ac_ext
17085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17086$as_echo "$have_getrandom" >&6; }
17087
17088if test "$have_getrandom" = yes; then
17089
17090$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17091
17092fi
17093
Neil Schemenauer5741c452019-02-08 10:48:46 -080017094# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17095# shm_* may only be available if linking against librt
17096save_LIBS="$LIBS"
17097save_includes_default="$ac_includes_default"
17098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17099$as_echo_n "checking for library containing shm_open... " >&6; }
17100if ${ac_cv_search_shm_open+:} false; then :
17101 $as_echo_n "(cached) " >&6
17102else
17103 ac_func_search_save_LIBS=$LIBS
17104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17105/* end confdefs.h. */
17106
17107/* Override any GCC internal prototype to avoid an error.
17108 Use char because int might match the return type of a GCC
17109 builtin and then its argument prototype would still apply. */
17110#ifdef __cplusplus
17111extern "C"
17112#endif
17113char shm_open ();
17114int
17115main ()
17116{
17117return shm_open ();
17118 ;
17119 return 0;
17120}
17121_ACEOF
17122for ac_lib in '' rt; do
17123 if test -z "$ac_lib"; then
17124 ac_res="none required"
17125 else
17126 ac_res=-l$ac_lib
17127 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17128 fi
17129 if ac_fn_c_try_link "$LINENO"; then :
17130 ac_cv_search_shm_open=$ac_res
17131fi
17132rm -f core conftest.err conftest.$ac_objext \
17133 conftest$ac_exeext
17134 if ${ac_cv_search_shm_open+:} false; then :
17135 break
17136fi
17137done
17138if ${ac_cv_search_shm_open+:} false; then :
17139
17140else
17141 ac_cv_search_shm_open=no
17142fi
17143rm conftest.$ac_ext
17144LIBS=$ac_func_search_save_LIBS
17145fi
17146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17147$as_echo "$ac_cv_search_shm_open" >&6; }
17148ac_res=$ac_cv_search_shm_open
17149if test "$ac_res" != no; then :
17150 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17151
17152fi
17153
17154if test "$ac_cv_search_shm_open" = "-lrt"; then
17155
17156$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17157
17158fi
17159for ac_header in sys/mman.h
17160do :
17161 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17162if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17163 cat >>confdefs.h <<_ACEOF
17164#define HAVE_SYS_MMAN_H 1
17165_ACEOF
17166
17167fi
17168
17169done
17170
17171# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17172ac_includes_default="\
17173${ac_includes_default}
17174#ifndef __cplusplus
17175# ifdef HAVE_SYS_MMAN_H
17176# include <sys/mman.h>
17177# endif
17178#endif
17179"
17180for ac_func in shm_open shm_unlink
17181do :
17182 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17183ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17184if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17185 cat >>confdefs.h <<_ACEOF
17186#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17187_ACEOF
17188
17189fi
17190done
17191
17192# we don't want to link with librt always, restore LIBS
17193LIBS="$save_LIBS"
17194ac_includes_default="$save_includes_default"
17195
Christian Heimesff5be6e2018-01-20 13:19:21 +010017196# Check for usable OpenSSL
17197
17198 found=false
17199
17200# Check whether --with-openssl was given.
17201if test "${with_openssl+set}" = set; then :
17202 withval=$with_openssl;
17203 case "$withval" in
17204 "" | y | ye | yes | n | no)
17205 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17206 ;;
17207 *) ssldirs="$withval"
17208 ;;
17209 esac
17210
17211else
17212
17213 # if pkg-config is installed and openssl has installed a .pc file,
17214 # then use that information and don't search ssldirs
17215 if test -n "$ac_tool_prefix"; then
17216 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17217set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17219$as_echo_n "checking for $ac_word... " >&6; }
17220if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17221 $as_echo_n "(cached) " >&6
17222else
17223 if test -n "$PKG_CONFIG"; then
17224 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17225else
17226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17227for as_dir in $PATH
17228do
17229 IFS=$as_save_IFS
17230 test -z "$as_dir" && as_dir=.
17231 for ac_exec_ext in '' $ac_executable_extensions; do
17232 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17233 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17235 break 2
17236 fi
17237done
17238 done
17239IFS=$as_save_IFS
17240
17241fi
17242fi
17243PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17244if test -n "$PKG_CONFIG"; then
17245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17246$as_echo "$PKG_CONFIG" >&6; }
17247else
17248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17249$as_echo "no" >&6; }
17250fi
17251
17252
17253fi
17254if test -z "$ac_cv_prog_PKG_CONFIG"; then
17255 ac_ct_PKG_CONFIG=$PKG_CONFIG
17256 # Extract the first word of "pkg-config", so it can be a program name with args.
17257set dummy pkg-config; ac_word=$2
17258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17259$as_echo_n "checking for $ac_word... " >&6; }
17260if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17261 $as_echo_n "(cached) " >&6
17262else
17263 if test -n "$ac_ct_PKG_CONFIG"; then
17264 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17265else
17266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17267for as_dir in $PATH
17268do
17269 IFS=$as_save_IFS
17270 test -z "$as_dir" && as_dir=.
17271 for ac_exec_ext in '' $ac_executable_extensions; do
17272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17273 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17275 break 2
17276 fi
17277done
17278 done
17279IFS=$as_save_IFS
17280
17281fi
17282fi
17283ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17284if test -n "$ac_ct_PKG_CONFIG"; then
17285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17286$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17287else
17288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17289$as_echo "no" >&6; }
17290fi
17291
17292 if test "x$ac_ct_PKG_CONFIG" = x; then
17293 PKG_CONFIG=""
17294 else
17295 case $cross_compiling:$ac_tool_warned in
17296yes:)
17297{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17298$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17299ac_tool_warned=yes ;;
17300esac
17301 PKG_CONFIG=$ac_ct_PKG_CONFIG
17302 fi
17303else
17304 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17305fi
17306
17307 if test x"$PKG_CONFIG" != x""; then
17308 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17309 if test $? = 0; then
17310 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17311 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17312 found=true
17313 fi
17314 fi
17315
17316 # no such luck; use some default ssldirs
17317 if ! $found; then
17318 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17319 fi
17320
17321
17322fi
17323
17324
17325
17326 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17327 # an 'openssl' subdirectory
17328
17329 if ! $found; then
17330 OPENSSL_INCLUDES=
17331 for ssldir in $ssldirs; do
17332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17333$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17334 if test -f "$ssldir/include/openssl/ssl.h"; then
17335 OPENSSL_INCLUDES="-I$ssldir/include"
17336 OPENSSL_LDFLAGS="-L$ssldir/lib"
17337 OPENSSL_LIBS="-lssl -lcrypto"
17338 found=true
17339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17340$as_echo "yes" >&6; }
17341 break
17342 else
17343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17344$as_echo "no" >&6; }
17345 fi
17346 done
17347
17348 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17349 # it will just work!
17350 fi
17351
17352 # try the preprocessor and linker with our new flags,
17353 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17354
17355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17356$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17357 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17358 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17359
17360 save_LIBS="$LIBS"
17361 save_LDFLAGS="$LDFLAGS"
17362 save_CPPFLAGS="$CPPFLAGS"
17363 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17364 LIBS="$OPENSSL_LIBS $LIBS"
17365 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17367/* end confdefs.h. */
17368#include <openssl/ssl.h>
17369int
17370main ()
17371{
17372SSL_new(NULL)
17373 ;
17374 return 0;
17375}
17376_ACEOF
17377if ac_fn_c_try_link "$LINENO"; then :
17378
17379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17380$as_echo "yes" >&6; }
17381 have_openssl=yes
17382
17383else
17384
17385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17386$as_echo "no" >&6; }
17387 have_openssl=no
17388
17389fi
17390rm -f core conftest.err conftest.$ac_objext \
17391 conftest$ac_exeext conftest.$ac_ext
17392 CPPFLAGS="$save_CPPFLAGS"
17393 LDFLAGS="$save_LDFLAGS"
17394 LIBS="$save_LIBS"
17395
17396
17397
17398
17399
17400
17401if test "$have_openssl" = yes; then
17402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17403$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17404
17405 save_LIBS="$LIBS"
17406 save_LDFLAGS="$LDFLAGS"
17407 save_CPPFLAGS="$CPPFLAGS"
17408 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17409 LIBS="$OPENSSL_LIBS $LIBS"
17410 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17411
17412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17413/* end confdefs.h. */
17414
17415 #include <openssl/x509_vfy.h>
17416
17417int
17418main ()
17419{
17420
17421 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17422 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17423 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17424 X509_VERIFY_PARAM_set_hostflags(p, 0);
17425
17426 ;
17427 return 0;
17428}
17429
17430_ACEOF
17431if ac_fn_c_try_link "$LINENO"; then :
17432
17433 ac_cv_has_x509_verify_param_set1_host=yes
17434
17435else
17436
17437 ac_cv_has_x509_verify_param_set1_host=no
17438
17439fi
17440rm -f core conftest.err conftest.$ac_objext \
17441 conftest$ac_exeext conftest.$ac_ext
17442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17443$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17444 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17445
17446$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17447
17448 fi
17449
17450 CPPFLAGS="$save_CPPFLAGS"
17451 LDFLAGS="$save_LDFLAGS"
17452 LIBS="$save_LIBS"
17453fi
17454
Christian Heimes892d66e2018-01-29 14:10:18 +010017455# ssl module default cipher suite string
17456
17457
17458
17459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17460$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17461
17462# Check whether --with-ssl-default-suites was given.
17463if test "${with_ssl_default_suites+set}" = set; then :
17464 withval=$with_ssl_default_suites;
17465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17466$as_echo "$withval" >&6; }
17467case "$withval" in
17468 python)
17469 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17470
17471 ;;
17472 openssl)
17473 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17474
17475 ;;
17476 *)
17477 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17478
17479 cat >>confdefs.h <<_ACEOF
17480#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17481_ACEOF
17482
17483 ;;
17484esac
17485
17486else
17487
17488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17489$as_echo "python" >&6; }
17490$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17491
17492
17493fi
17494
17495
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017496# --with-experimental-isolated-subinterpreters
17497
17498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17499$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17500
17501# Check whether --with-experimental-isolated-subinterpreters was given.
17502if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17503 withval=$with_experimental_isolated_subinterpreters;
17504if test "$withval" != no
17505then
17506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17507$as_echo "yes" >&6; };
17508 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17509
17510else
17511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17512$as_echo "no" >&6; };
17513fi
17514else
17515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17516$as_echo "no" >&6; }
17517fi
17518
17519
Christian Heimes892d66e2018-01-29 14:10:18 +010017520
Guido van Rossum627b2d71993-12-24 10:39:16 +000017521# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017522ac_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 +000017523
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017524ac_config_files="$ac_config_files Modules/ld_so_aix"
17525
Martin v. Löwis11437992002-04-12 09:54:03 +000017526cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017527# This file is a shell script that caches the results of configure
17528# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017529# scripts and configure runs, see configure's option --config-cache.
17530# It is not useful on other systems. If it contains results you don't
17531# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017532#
Martin v. Löwis11437992002-04-12 09:54:03 +000017533# config.status only pays attention to the cache file if you give it
17534# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017535#
Skip Montanaro6dead952003-09-25 14:50:04 +000017536# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017537# loading this file, other *unset* `ac_cv_foo' will be assigned the
17538# following values.
17539
17540_ACEOF
17541
Guido van Rossumf78abae1997-01-21 22:02:36 +000017542# The following way of writing the cache mishandles newlines in values,
17543# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017545# Ultrix sh set writes to stderr and can't be redirected directly,
17546# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547(
17548 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17549 eval ac_val=\$$ac_var
17550 case $ac_val in #(
17551 *${as_nl}*)
17552 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017553 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17554$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555 esac
17556 case $ac_var in #(
17557 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017558 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17559 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560 esac ;;
17561 esac
17562 done
17563
Martin v. Löwis11437992002-04-12 09:54:03 +000017564 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17566 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017567 # `set' does not quote correctly, so add quotes: double-quote
17568 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017569 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017570 "s/'/'\\\\''/g;
17571 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017573 *)
17574 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017576 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577 esac |
17578 sort
17579) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017580 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017582 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017584 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17585 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017586 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17587 :end' >>confcache
17588if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17589 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017590 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017591 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17592$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017593 if test ! -f "$cache_file" || test -h "$cache_file"; then
17594 cat confcache >"$cache_file"
17595 else
17596 case $cache_file in #(
17597 */* | ?:*)
17598 mv -f confcache "$cache_file"$$ &&
17599 mv -f "$cache_file"$$ "$cache_file" ;; #(
17600 *)
17601 mv -f confcache "$cache_file" ;;
17602 esac
17603 fi
17604 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017605 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017606 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17607$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017608 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017609fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017610rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017611
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017612test "x$prefix" = xNONE && prefix=$ac_default_prefix
17613# Let make expand exec_prefix.
17614test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017615
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017616DEFS=-DHAVE_CONFIG_H
17617
Skip Montanaro6dead952003-09-25 14:50:04 +000017618ac_libobjs=
17619ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017620U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017621for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17622 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017624 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17626 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017627 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17628 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017629done
17630LIBOBJS=$ac_libobjs
17631
17632LTLIBOBJS=$ac_ltlibobjs
17633
17634
Martin v. Löwis11437992002-04-12 09:54:03 +000017635
Matthias Kloseb9621712010-04-24 17:59:49 +000017636
Victor Stinnere0be4232011-10-25 13:06:09 +020017637: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017638ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017639ac_clean_files_save=$ac_clean_files
17640ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017641{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17642$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17643as_write_fail=0
17644cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017645#! $SHELL
17646# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017647# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017648# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017649# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017650
Martin v. Löwis11437992002-04-12 09:54:03 +000017651debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017652ac_cs_recheck=false
17653ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017654
Matthias Kloseb9621712010-04-24 17:59:49 +000017655SHELL=\${CONFIG_SHELL-$SHELL}
17656export SHELL
17657_ASEOF
17658cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17659## -------------------- ##
17660## M4sh Initialization. ##
17661## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017663# Be more Bourne compatible
17664DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017665if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017666 emulate sh
17667 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017668 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017669 # is contrary to our usage. Disable this feature.
17670 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017672else
Matthias Kloseb9621712010-04-24 17:59:49 +000017673 case `(set -o) 2>/dev/null` in #(
17674 *posix*) :
17675 set -o posix ;; #(
17676 *) :
17677 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017679fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017680
17681
Matthias Kloseb9621712010-04-24 17:59:49 +000017682as_nl='
17683'
17684export as_nl
17685# Printing a long string crashes Solaris 7 /usr/bin/printf.
17686as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17687as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17688as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17689# Prefer a ksh shell builtin over an external printf program on Solaris,
17690# but without wasting forks for bash or zsh.
17691if test -z "$BASH_VERSION$ZSH_VERSION" \
17692 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17693 as_echo='print -r --'
17694 as_echo_n='print -rn --'
17695elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17696 as_echo='printf %s\n'
17697 as_echo_n='printf %s'
17698else
17699 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17700 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17701 as_echo_n='/usr/ucb/echo -n'
17702 else
17703 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17704 as_echo_n_body='eval
17705 arg=$1;
17706 case $arg in #(
17707 *"$as_nl"*)
17708 expr "X$arg" : "X\\(.*\\)$as_nl";
17709 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17710 esac;
17711 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17712 '
17713 export as_echo_n_body
17714 as_echo_n='sh -c $as_echo_n_body as_echo'
17715 fi
17716 export as_echo_body
17717 as_echo='sh -c $as_echo_body as_echo'
17718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017719
17720# The user is always right.
17721if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017722 PATH_SEPARATOR=:
17723 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17724 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17725 PATH_SEPARATOR=';'
17726 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017729
17730# IFS
17731# We need space, tab and new line, in precisely that order. Quoting is
17732# there to prevent editors from complaining about space-tab.
17733# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17734# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735IFS=" "" $as_nl"
17736
17737# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017738as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017739case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740 *[\\/]* ) as_myself=$0 ;;
17741 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017742for as_dir in $PATH
17743do
17744 IFS=$as_save_IFS
17745 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017746 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17747 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750 ;;
17751esac
17752# We did not find ourselves, most probably we were run as `sh COMMAND'
17753# in which case we are not to be found in the path.
17754if test "x$as_myself" = x; then
17755 as_myself=$0
17756fi
17757if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017758 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17759 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760fi
17761
Matthias Kloseb9621712010-04-24 17:59:49 +000017762# Unset variables that we do not need and which cause bugs (e.g. in
17763# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17764# suppresses any "Segmentation fault" message there. '((' could
17765# trigger a bug in pdksh 5.2.14.
17766for as_var in BASH_ENV ENV MAIL MAILPATH
17767do eval test x\${$as_var+set} = xset \
17768 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769done
17770PS1='$ '
17771PS2='> '
17772PS4='+ '
17773
17774# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017775LC_ALL=C
17776export LC_ALL
17777LANGUAGE=C
17778export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017779
Matthias Kloseb9621712010-04-24 17:59:49 +000017780# CDPATH.
17781(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17782
17783
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017784# as_fn_error STATUS ERROR [LINENO LOG_FD]
17785# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017786# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17787# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017788# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017789as_fn_error ()
17790{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017791 as_status=$1; test $as_status -eq 0 && as_status=1
17792 if test "$4"; then
17793 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17794 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017795 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017796 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017797 as_fn_exit $as_status
17798} # as_fn_error
17799
17800
17801# as_fn_set_status STATUS
17802# -----------------------
17803# Set $? to STATUS, without forking.
17804as_fn_set_status ()
17805{
17806 return $1
17807} # as_fn_set_status
17808
17809# as_fn_exit STATUS
17810# -----------------
17811# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17812as_fn_exit ()
17813{
17814 set +e
17815 as_fn_set_status $1
17816 exit $1
17817} # as_fn_exit
17818
17819# as_fn_unset VAR
17820# ---------------
17821# Portably unset VAR.
17822as_fn_unset ()
17823{
17824 { eval $1=; unset $1;}
17825}
17826as_unset=as_fn_unset
17827# as_fn_append VAR VALUE
17828# ----------------------
17829# Append the text in VALUE to the end of the definition contained in VAR. Take
17830# advantage of any shell optimizations that allow amortized linear growth over
17831# repeated appends, instead of the typical quadratic growth present in naive
17832# implementations.
17833if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17834 eval 'as_fn_append ()
17835 {
17836 eval $1+=\$2
17837 }'
17838else
17839 as_fn_append ()
17840 {
17841 eval $1=\$$1\$2
17842 }
17843fi # as_fn_append
17844
17845# as_fn_arith ARG...
17846# ------------------
17847# Perform arithmetic evaluation on the ARGs, and store the result in the
17848# global $as_val. Take advantage of shells that can avoid forks. The arguments
17849# must be portable across $(()) and expr.
17850if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17851 eval 'as_fn_arith ()
17852 {
17853 as_val=$(( $* ))
17854 }'
17855else
17856 as_fn_arith ()
17857 {
17858 as_val=`expr "$@" || test $? -eq 1`
17859 }
17860fi # as_fn_arith
17861
17862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017863if expr a : '\(a\)' >/dev/null 2>&1 &&
17864 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17865 as_expr=expr
17866else
17867 as_expr=false
17868fi
17869
17870if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17871 as_basename=basename
17872else
17873 as_basename=false
17874fi
17875
Matthias Kloseb9621712010-04-24 17:59:49 +000017876if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17877 as_dirname=dirname
17878else
17879 as_dirname=false
17880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017882as_me=`$as_basename -- "$0" ||
17883$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17884 X"$0" : 'X\(//\)$' \| \
17885 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017886$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017887 sed '/^.*\/\([^/][^/]*\)\/*$/{
17888 s//\1/
17889 q
17890 }
17891 /^X\/\(\/\/\)$/{
17892 s//\1/
17893 q
17894 }
17895 /^X\/\(\/\).*/{
17896 s//\1/
17897 q
17898 }
17899 s/.*/./; q'`
17900
Matthias Kloseb9621712010-04-24 17:59:49 +000017901# Avoid depending upon Character Ranges.
17902as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17903as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17904as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17905as_cr_digits='0123456789'
17906as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907
17908ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017909case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017911 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017913 xy) ECHO_C='\c';;
17914 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17915 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017916 esac;;
17917*)
17918 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017919esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017920
Martin v. Löwis11437992002-04-12 09:54:03 +000017921rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922if test -d conf$$.dir; then
17923 rm -f conf$$.dir/conf$$.file
17924else
17925 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017926 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017928if (echo >conf$$.file) 2>/dev/null; then
17929 if ln -s conf$$.file conf$$ 2>/dev/null; then
17930 as_ln_s='ln -s'
17931 # ... but there are two gotchas:
17932 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17933 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017934 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017935 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017936 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017937 elif ln conf$$.file conf$$ 2>/dev/null; then
17938 as_ln_s=ln
17939 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017940 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017941 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017942else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017943 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17946rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017947
Matthias Kloseb9621712010-04-24 17:59:49 +000017948
17949# as_fn_mkdir_p
17950# -------------
17951# Create "$as_dir" as a directory, including parents if necessary.
17952as_fn_mkdir_p ()
17953{
17954
17955 case $as_dir in #(
17956 -*) as_dir=./$as_dir;;
17957 esac
17958 test -d "$as_dir" || eval $as_mkdir_p || {
17959 as_dirs=
17960 while :; do
17961 case $as_dir in #(
17962 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17963 *) as_qdir=$as_dir;;
17964 esac
17965 as_dirs="'$as_qdir' $as_dirs"
17966 as_dir=`$as_dirname -- "$as_dir" ||
17967$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17968 X"$as_dir" : 'X\(//\)[^/]' \| \
17969 X"$as_dir" : 'X\(//\)$' \| \
17970 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17971$as_echo X"$as_dir" |
17972 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17973 s//\1/
17974 q
17975 }
17976 /^X\(\/\/\)[^/].*/{
17977 s//\1/
17978 q
17979 }
17980 /^X\(\/\/\)$/{
17981 s//\1/
17982 q
17983 }
17984 /^X\(\/\).*/{
17985 s//\1/
17986 q
17987 }
17988 s/.*/./; q'`
17989 test -d "$as_dir" && break
17990 done
17991 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017992 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017993
17994
17995} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017996if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017997 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017998else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017999 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018000 as_mkdir_p=false
18001fi
18002
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018003
18004# as_fn_executable_p FILE
18005# -----------------------
18006# Test if FILE is an executable regular file.
18007as_fn_executable_p ()
18008{
18009 test -f "$1" && test -x "$1"
18010} # as_fn_executable_p
18011as_test_x='test -x'
18012as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018013
18014# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018015as_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 +000018016
18017# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018018as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018019
18020
Martin v. Löwis11437992002-04-12 09:54:03 +000018021exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018022## ----------------------------------- ##
18023## Main body of $CONFIG_STATUS script. ##
18024## ----------------------------------- ##
18025_ASEOF
18026test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018027
Matthias Kloseb9621712010-04-24 17:59:49 +000018028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18029# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018030# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018031# values after options handling.
18032ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018033This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018034generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018035
18036 CONFIG_FILES = $CONFIG_FILES
18037 CONFIG_HEADERS = $CONFIG_HEADERS
18038 CONFIG_LINKS = $CONFIG_LINKS
18039 CONFIG_COMMANDS = $CONFIG_COMMANDS
18040 $ $0 $@
18041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018042on `(hostname || uname -n) 2>/dev/null | sed 1q`
18043"
18044
Martin v. Löwis11437992002-04-12 09:54:03 +000018045_ACEOF
18046
Matthias Kloseb9621712010-04-24 17:59:49 +000018047case $ac_config_files in *"
18048"*) set x $ac_config_files; shift; ac_config_files=$*;;
18049esac
18050
18051case $ac_config_headers in *"
18052"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18053esac
18054
18055
18056cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018057# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018058config_files="$ac_config_files"
18059config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018061_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018062
Matthias Kloseb9621712010-04-24 17:59:49 +000018063cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018064ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018065\`$as_me' instantiates files and other configuration actions
18066from templates according to the current configuration. Unless the files
18067and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018068
Matthias Kloseb9621712010-04-24 17:59:49 +000018069Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018070
18071 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018073 --config print configuration, then exit
18074 -q, --quiet, --silent
18075 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018076 -d, --debug don't remove temporary files
18077 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018078 --file=FILE[:TEMPLATE]
18079 instantiate the configuration file FILE
18080 --header=FILE[:TEMPLATE]
18081 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018082
18083Configuration files:
18084$config_files
18085
18086Configuration headers:
18087$config_headers
18088
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018089Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018092cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18093ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018094ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018095python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018096configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018097 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018098
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018099Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018100This config.status script is free software; the Free Software Foundation
18101gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018102
18103ac_pwd='$ac_pwd'
18104srcdir='$srcdir'
18105INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018106MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018107test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018108_ACEOF
18109
Matthias Kloseb9621712010-04-24 17:59:49 +000018110cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18111# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018112ac_need_defaults=:
18113while test $# != 0
18114do
18115 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018116 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018117 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18118 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018119 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018120 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018121 --*=)
18122 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18123 ac_optarg=
18124 ac_shift=:
18125 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018127 ac_option=$1
18128 ac_optarg=$2
18129 ac_shift=shift
18130 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018131 esac
18132
Skip Montanaro6dead952003-09-25 14:50:04 +000018133 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018134 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018135 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18136 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018137 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018138 $as_echo "$ac_cs_version"; exit ;;
18139 --config | --confi | --conf | --con | --co | --c )
18140 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018142 debug=: ;;
18143 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018144 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018145 case $ac_optarg in
18146 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018147 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018148 esac
18149 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018150 ac_need_defaults=false;;
18151 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018152 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018153 case $ac_optarg in
18154 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18155 esac
18156 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018157 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158 --he | --h)
18159 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018160 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018161Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018162 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018163 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018164 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18165 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18166 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018167
18168 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018169 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018170Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018171
Matthias Kloseb9621712010-04-24 17:59:49 +000018172 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018173 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018174
18175 esac
18176 shift
18177done
18178
Skip Montanaro6dead952003-09-25 14:50:04 +000018179ac_configure_extra_args=
18180
18181if $ac_cs_silent; then
18182 exec 6>/dev/null
18183 ac_configure_extra_args="$ac_configure_extra_args --silent"
18184fi
18185
18186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018187cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018188if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018189 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018190 shift
18191 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18192 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018193 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018194 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018195fi
18196
Martin v. Löwis11437992002-04-12 09:54:03 +000018197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018199exec 5>>config.log
18200{
18201 echo
18202 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18203## Running $as_me. ##
18204_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018205 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018206} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018209cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018210_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018211
Matthias Kloseb9621712010-04-24 17:59:49 +000018212cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018213
18214# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018215for ac_config_target in $ac_config_targets
18216do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018217 case $ac_config_target in
18218 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18219 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18220 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018221 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18222 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018223 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018224 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018225 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018226 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018227 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018228
Victor Stinnere0be4232011-10-25 13:06:09 +020018229 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018230 esac
18231done
18232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018233
Martin v. Löwis11437992002-04-12 09:54:03 +000018234# If the user did not use the arguments to specify the items to instantiate,
18235# then the envvar interface is used. Set only those that are not.
18236# We use the long form for the default assignment because of an extremely
18237# bizarre bug on SunOS 4.1.3.
18238if $ac_need_defaults; then
18239 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18240 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18241fi
18242
Skip Montanaro6dead952003-09-25 14:50:04 +000018243# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018244# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018245# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246# Hook for its removal unless debugging.
18247# Note that there is a small window in which the directory will not be cleaned:
18248# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018249$debug ||
18250{
Victor Stinnere0be4232011-10-25 13:06:09 +020018251 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018252 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018253 : "${ac_tmp:=$tmp}"
18254 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018255' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018256 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018257}
Martin v. Löwis11437992002-04-12 09:54:03 +000018258# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018259
Martin v. Löwis11437992002-04-12 09:54:03 +000018260{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018262 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018263} ||
18264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018265 tmp=./conf$$-$RANDOM
18266 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018267} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018268ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018269
Matthias Kloseb9621712010-04-24 17:59:49 +000018270# Set up the scripts for CONFIG_FILES section.
18271# No need to generate them if there are no CONFIG_FILES.
18272# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018274
Matthias Kloseb9621712010-04-24 17:59:49 +000018275
18276ac_cr=`echo X | tr X '\015'`
18277# On cygwin, bash can eat \r inside `` if the user requested igncr.
18278# But we know of no other shell where ac_cr would be empty at this
18279# point, so we can use a bashism as a fallback.
18280if test "x$ac_cr" = x; then
18281 eval ac_cr=\$\'\\r\'
18282fi
18283ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18284if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018285 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018286else
18287 ac_cs_awk_cr=$ac_cr
18288fi
18289
Victor Stinnere0be4232011-10-25 13:06:09 +020018290echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018291_ACEOF
18292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018293
Matthias Kloseb9621712010-04-24 17:59:49 +000018294{
18295 echo "cat >conf$$subs.awk <<_ACEOF" &&
18296 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18297 echo "_ACEOF"
18298} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018299 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18300ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018301ac_delim='%!_!# '
18302for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018303 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018304 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305
Matthias Kloseb9621712010-04-24 17:59:49 +000018306 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18307 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018308 break
18309 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018310 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311 else
18312 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018313 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018314done
Matthias Kloseb9621712010-04-24 17:59:49 +000018315rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018316
Matthias Kloseb9621712010-04-24 17:59:49 +000018317cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018318cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018320sed -n '
18321h
18322s/^/S["/; s/!.*/"]=/
18323p
18324g
18325s/^[^!]*!//
18326:repl
18327t repl
18328s/'"$ac_delim"'$//
18329t delim
18330:nl
18331h
18332s/\(.\{148\}\)..*/\1/
18333t more1
18334s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18335p
18336n
18337b repl
18338:more1
18339s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18340p
18341g
18342s/.\{148\}//
18343t nl
18344:delim
18345h
18346s/\(.\{148\}\)..*/\1/
18347t more2
18348s/["\\]/\\&/g; s/^/"/; s/$/"/
18349p
18350b
18351:more2
18352s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18353p
18354g
18355s/.\{148\}//
18356t delim
18357' <conf$$subs.awk | sed '
18358/^[^""]/{
18359 N
18360 s/\n//
18361}
18362' >>$CONFIG_STATUS || ac_write_fail=1
18363rm -f conf$$subs.awk
18364cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18365_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018366cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018367 for (key in S) S_is_set[key] = 1
18368 FS = ""
18369
18370}
18371{
18372 line = $ 0
18373 nfields = split(line, field, "@")
18374 substed = 0
18375 len = length(field[1])
18376 for (i = 2; i < nfields; i++) {
18377 key = field[i]
18378 keylen = length(key)
18379 if (S_is_set[key]) {
18380 value = S[key]
18381 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18382 len += length(value) + length(field[++i])
18383 substed = 1
18384 } else
18385 len += 1 + keylen
18386 }
18387
18388 print line
18389}
18390
18391_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018393cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18394if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18395 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18396else
18397 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018398fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018399 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018400_ACEOF
18401
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018402# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18403# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404# trailing colons and then remove the whole line if VPATH becomes empty
18405# (actually we leave an empty line to preserve line numbers).
18406if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018407 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18408h
18409s///
18410s/^/:/
18411s/[ ]*$/:/
18412s/:\$(srcdir):/:/g
18413s/:\${srcdir}:/:/g
18414s/:@srcdir@:/:/g
18415s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018416s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018417x
18418s/\(=[ ]*\).*/\1/
18419G
18420s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421s/^[^=]*=[ ]*$//
18422}'
18423fi
18424
Matthias Kloseb9621712010-04-24 17:59:49 +000018425cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018426fi # test -n "$CONFIG_FILES"
18427
Matthias Kloseb9621712010-04-24 17:59:49 +000018428# Set up the scripts for CONFIG_HEADERS section.
18429# No need to generate them if there are no CONFIG_HEADERS.
18430# This happens for instance with `./config.status Makefile'.
18431if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018432cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018433BEGIN {
18434_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018435
Matthias Kloseb9621712010-04-24 17:59:49 +000018436# Transform confdefs.h into an awk script `defines.awk', embedded as
18437# here-document in config.status, that substitutes the proper values into
18438# config.h.in to produce config.h.
18439
18440# Create a delimiter string that does not exist in confdefs.h, to ease
18441# handling of long lines.
18442ac_delim='%!_!# '
18443for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018444 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18445 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018446 break
18447 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018448 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018449 else
18450 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18451 fi
18452done
18453
18454# For the awk script, D is an array of macro values keyed by name,
18455# likewise P contains macro parameters if any. Preserve backslash
18456# newline sequences.
18457
18458ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18459sed -n '
18460s/.\{148\}/&'"$ac_delim"'/g
18461t rset
18462:rset
18463s/^[ ]*#[ ]*define[ ][ ]*/ /
18464t def
18465d
18466:def
18467s/\\$//
18468t bsnl
18469s/["\\]/\\&/g
18470s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18471D["\1"]=" \3"/p
18472s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18473d
18474:bsnl
18475s/["\\]/\\&/g
18476s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18477D["\1"]=" \3\\\\\\n"\\/p
18478t cont
18479s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18480t cont
18481d
18482:cont
18483n
18484s/.\{148\}/&'"$ac_delim"'/g
18485t clear
18486:clear
18487s/\\$//
18488t bsnlc
18489s/["\\]/\\&/g; s/^/"/; s/$/"/p
18490d
18491:bsnlc
18492s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18493b cont
18494' <confdefs.h | sed '
18495s/'"$ac_delim"'/"\\\
18496"/g' >>$CONFIG_STATUS || ac_write_fail=1
18497
18498cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18499 for (key in D) D_is_set[key] = 1
18500 FS = ""
18501}
18502/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18503 line = \$ 0
18504 split(line, arg, " ")
18505 if (arg[1] == "#") {
18506 defundef = arg[2]
18507 mac1 = arg[3]
18508 } else {
18509 defundef = substr(arg[1], 2)
18510 mac1 = arg[2]
18511 }
18512 split(mac1, mac2, "(") #)
18513 macro = mac2[1]
18514 prefix = substr(line, 1, index(line, defundef) - 1)
18515 if (D_is_set[macro]) {
18516 # Preserve the white space surrounding the "#".
18517 print prefix "define", macro P[macro] D[macro]
18518 next
18519 } else {
18520 # Replace #undef with comments. This is necessary, for example,
18521 # in the case of _POSIX_SOURCE, which is predefined and required
18522 # on some systems where configure will not decide to define it.
18523 if (defundef == "undef") {
18524 print "/*", prefix defundef, macro, "*/"
18525 next
18526 }
18527 }
18528}
18529{ print }
18530_ACAWK
18531_ACEOF
18532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018533 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018534fi # test -n "$CONFIG_HEADERS"
18535
18536
18537eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18538shift
18539for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018540do
18541 case $ac_tag in
18542 :[FHLC]) ac_mode=$ac_tag; continue;;
18543 esac
18544 case $ac_mode$ac_tag in
18545 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018546 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018547 :[FH]-) ac_tag=-:-;;
18548 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18549 esac
18550 ac_save_IFS=$IFS
18551 IFS=:
18552 set x $ac_tag
18553 IFS=$ac_save_IFS
18554 shift
18555 ac_file=$1
18556 shift
18557
18558 case $ac_mode in
18559 :L) ac_source=$1;;
18560 :[FH])
18561 ac_file_inputs=
18562 for ac_f
18563 do
18564 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018565 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018566 *) # Look for the file first in the build tree, then in the source tree
18567 # (if the path is not absolute). The absolute path cannot be DOS-style,
18568 # because $ac_f cannot contain `:'.
18569 test -f "$ac_f" ||
18570 case $ac_f in
18571 [\\/$]*) false;;
18572 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18573 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018574 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018576 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18577 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578 done
18579
18580 # Let's still pretend it is `configure' which instantiates (i.e., don't
18581 # use $as_me), people would be surprised to read:
18582 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018583 configure_input='Generated from '`
18584 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18585 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018586 if test x"$ac_file" != x-; then
18587 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018588 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18589$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018590 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018591 # Neutralize special characters interpreted by sed in replacement strings.
18592 case $configure_input in #(
18593 *\&* | *\|* | *\\* )
18594 ac_sed_conf_input=`$as_echo "$configure_input" |
18595 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18596 *) ac_sed_conf_input=$configure_input;;
18597 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018598
18599 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018600 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18601 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018602 esac
18603 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018604 esac
18605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018606 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018607$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018608 X"$ac_file" : 'X\(//\)[^/]' \| \
18609 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018610 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018611$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018612 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18613 s//\1/
18614 q
18615 }
18616 /^X\(\/\/\)[^/].*/{
18617 s//\1/
18618 q
18619 }
18620 /^X\(\/\/\)$/{
18621 s//\1/
18622 q
18623 }
18624 /^X\(\/\).*/{
18625 s//\1/
18626 q
18627 }
18628 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018629 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018630 ac_builddir=.
18631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018632case "$ac_dir" in
18633.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18634*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018635 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018636 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018637 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018638 case $ac_top_builddir_sub in
18639 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18640 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18641 esac ;;
18642esac
18643ac_abs_top_builddir=$ac_pwd
18644ac_abs_builddir=$ac_pwd$ac_dir_suffix
18645# for backward compatibility:
18646ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018647
18648case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018649 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018650 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018651 ac_top_srcdir=$ac_top_builddir_sub
18652 ac_abs_top_srcdir=$ac_pwd ;;
18653 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018654 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018655 ac_top_srcdir=$srcdir
18656 ac_abs_top_srcdir=$srcdir ;;
18657 *) # Relative name.
18658 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18659 ac_top_srcdir=$ac_top_build_prefix$srcdir
18660 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018661esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018662ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018663
Martin v. Löwis11437992002-04-12 09:54:03 +000018664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018665 case $ac_mode in
18666 :F)
18667 #
18668 # CONFIG_FILE
18669 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018670
18671 case $INSTALL in
18672 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018673 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018674 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018675 ac_MKDIR_P=$MKDIR_P
18676 case $MKDIR_P in
18677 [\\/$]* | ?:[\\/]* ) ;;
18678 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18679 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018680_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018681
Matthias Kloseb9621712010-04-24 17:59:49 +000018682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018683# If the template does not know about datarootdir, expand it.
18684# FIXME: This hack should be removed a few years after 2.60.
18685ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018686ac_sed_dataroot='
18687/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018688 p
18689 q
18690}
18691/@datadir@/p
18692/@docdir@/p
18693/@infodir@/p
18694/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018695/@mandir@/p'
18696case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018697*datarootdir*) ac_datarootdir_seen=yes;;
18698*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018699 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18700$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018702cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018703 ac_datarootdir_hack='
18704 s&@datadir@&$datadir&g
18705 s&@docdir@&$docdir&g
18706 s&@infodir@&$infodir&g
18707 s&@localedir@&$localedir&g
18708 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018709 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018710esac
18711_ACEOF
18712
18713# Neutralize VPATH when `$srcdir' = `.'.
18714# Shell code in configure.ac might set extrasub.
18715# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018716cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18717ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018718$extrasub
18719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018720cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018721:t
18722/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018723s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018724s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018725s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018726s&@srcdir@&$ac_srcdir&;t t
18727s&@abs_srcdir@&$ac_abs_srcdir&;t t
18728s&@top_srcdir@&$ac_top_srcdir&;t t
18729s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18730s&@builddir@&$ac_builddir&;t t
18731s&@abs_builddir@&$ac_abs_builddir&;t t
18732s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18733s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018734s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018735$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018736"
Victor Stinnere0be4232011-10-25 13:06:09 +020018737eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18738 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018740test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018741 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18742 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18743 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018745which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018746$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018747which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018748
Victor Stinnere0be4232011-10-25 13:06:09 +020018749 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018750 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018751 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18752 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018753 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018754 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018755 ;;
18756 :H)
18757 #
18758 # CONFIG_HEADER
18759 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018760 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018761 {
18762 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018763 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18764 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018765 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018766 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018767 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18768$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018769 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018770 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018771 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018772 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018773 fi
18774 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018775 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018776 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018777 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018778 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018779 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018781
18782 esac
18783
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018784
18785 case $ac_file$ac_mode in
18786 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18787
18788 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018789done # for ac_tag
18790
Guido van Rossum627b2d71993-12-24 10:39:16 +000018791
Matthias Kloseb9621712010-04-24 17:59:49 +000018792as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018793_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018794ac_clean_files=$ac_clean_files_save
18795
Matthias Kloseb9621712010-04-24 17:59:49 +000018796test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018797 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018798
Martin v. Löwis11437992002-04-12 09:54:03 +000018799
18800# configure is writing to config.log, and then calls config.status.
18801# config.status does its own redirection, appending to config.log.
18802# Unfortunately, on DOS this fails, as config.log is still kept open
18803# by configure, so config.status won't be able to write to it; its
18804# output is simply discarded. So we exec the FD to /dev/null,
18805# effectively closing config.log, so it can be properly (re)opened and
18806# appended to by config.status. When coming back to configure, we
18807# need to make the FD available again.
18808if test "$no_create" != yes; then
18809 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018810 ac_config_status_args=
18811 test "$silent" = yes &&
18812 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018813 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018814 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018815 exec 5>>config.log
18816 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18817 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018818 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018819fi
18820if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18822$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018823fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018824
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018825
Christian Heimes75ed8902013-11-20 01:11:18 +010018826echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018827if test ! -f Modules/Setup.local
18828then
18829 echo "# Edit this file for local setup changes" >Modules/Setup.local
18830fi
18831
Christian Heimes75ed8902013-11-20 01:11:18 +010018832echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018833$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018834 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018835 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018836mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018837
18838if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18839 echo "" >&6
18840 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018841 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 +000018842 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018843 echo "" >&6
18844 echo "" >&6
18845fi
18846