blob: d3e8149bec08bf827fc986c5badf24b14ae6d0f9 [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
Matthias Kloseb9621712010-04-24 17:59:49 +0000848'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 ac_precious_vars='build_alias
850host_alias
851target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100852MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853CC
854CFLAGS
855LDFLAGS
856LIBS
857CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800858CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700859PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800860PKG_CONFIG
861PKG_CONFIG_PATH
862PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863
Guido van Rossum627b2d71993-12-24 10:39:16 +0000864
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000866ac_init_help=
867ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000868ac_unrecognized_opts=
869ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870# The variables have the same names as the options, with
871# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000872cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875no_recursion=
876prefix=NONE
877program_prefix=NONE
878program_suffix=NONE
879program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884x_includes=NONE
885x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000886
887# Installation directory options.
888# These are left unexpanded so users can "make install exec_prefix=/foo"
889# and all the variables that are supposed to be based on exec_prefix
890# by default will actually change.
891# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893bindir='${exec_prefix}/bin'
894sbindir='${exec_prefix}/sbin'
895libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896datarootdir='${prefix}/share'
897datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898sysconfdir='${prefix}/etc'
899sharedstatedir='${prefix}/com'
900localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901includedir='${prefix}/include'
902oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
904infodir='${datarootdir}/info'
905htmldir='${docdir}'
906dvidir='${docdir}'
907pdfdir='${docdir}'
908psdir='${docdir}'
909libdir='${exec_prefix}/lib'
910localedir='${datarootdir}/locale'
911mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 # If the previous option needs an argument, assign it.
918 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 ac_prev=
921 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000922 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200925 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
926 *=) ac_optarg= ;;
927 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Accept the important Cygnus configure options, so we can diagnose typos.
931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 case $ac_dashdash$ac_option in
933 --)
934 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -bindir | --bindir | --bindi | --bind | --bin | --bi)
937 ac_prev=bindir ;;
938 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940
941 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946 -cache-file | --cache-file | --cache-fil | --cache-fi \
947 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
948 ac_prev=cache_file ;;
949 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
950 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 cache_file=$ac_optarg ;;
952
953 --config-cache | -C)
954 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
962 | --dataroo | --dataro | --datar)
963 ac_prev=datarootdir ;;
964 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
965 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
966 datarootdir=$ac_optarg ;;
967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200972 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt_orig=$ac_useropt
974 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975 case $ac_user_opts in
976 *"
977"enable_$ac_useropt"
978"*) ;;
979 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
980 ac_unrecognized_sep=', ';;
981 esac
982 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983
984 -docdir | --docdir | --docdi | --doc | --do)
985 ac_prev=docdir ;;
986 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
987 docdir=$ac_optarg ;;
988
989 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
990 ac_prev=dvidir ;;
991 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
992 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200998 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000999 ac_useropt_orig=$ac_useropt
1000 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1001 case $ac_user_opts in
1002 *"
1003"enable_$ac_useropt"
1004"*) ;;
1005 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1006 ac_unrecognized_sep=', ';;
1007 esac
1008 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1011 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1012 | --exec | --exe | --ex)
1013 ac_prev=exec_prefix ;;
1014 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1015 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1016 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020 # Obsolete; use --with-gas.
1021 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 -help | --help | --hel | --he | -h)
1024 ac_init_help=long ;;
1025 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1026 ac_init_help=recursive ;;
1027 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1028 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1036 ac_prev=htmldir ;;
1037 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1038 | --ht=*)
1039 htmldir=$ac_optarg ;;
1040
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 -includedir | --includedir | --includedi | --included | --include \
1042 | --includ | --inclu | --incl | --inc)
1043 ac_prev=includedir ;;
1044 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1045 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -infodir | --infodir | --infodi | --infod | --info | --inf)
1049 ac_prev=infodir ;;
1050 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -libdir | --libdir | --libdi | --libd)
1054 ac_prev=libdir ;;
1055 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
1058 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1059 | --libexe | --libex | --libe)
1060 ac_prev=libexecdir ;;
1061 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1062 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 -localedir | --localedir | --localedi | --localed | --locale)
1066 ac_prev=localedir ;;
1067 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1068 localedir=$ac_optarg ;;
1069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 ac_prev=localstatedir ;;
1073 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001074 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
1077 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1078 ac_prev=mandir ;;
1079 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 # Obsolete; use --without-fp.
1084 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 no_create=yes ;;
1089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1091 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1092 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1095 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1096 | --oldin | --oldi | --old | --ol | --o)
1097 ac_prev=oldincludedir ;;
1098 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1099 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1100 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1104 ac_prev=prefix ;;
1105 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1109 | --program-pre | --program-pr | --program-p)
1110 ac_prev=program_prefix ;;
1111 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1112 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1116 | --program-suf | --program-su | --program-s)
1117 ac_prev=program_suffix ;;
1118 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1119 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -program-transform-name | --program-transform-name \
1123 | --program-transform-nam | --program-transform-na \
1124 | --program-transform-n | --program-transform- \
1125 | --program-transform | --program-transfor \
1126 | --program-transfo | --program-transf \
1127 | --program-trans | --program-tran \
1128 | --progr-tra | --program-tr | --program-t)
1129 ac_prev=program_transform_name ;;
1130 -program-transform-name=* | --program-transform-name=* \
1131 | --program-transform-nam=* | --program-transform-na=* \
1132 | --program-transform-n=* | --program-transform-=* \
1133 | --program-transform=* | --program-transfor=* \
1134 | --program-transfo=* | --program-transf=* \
1135 | --program-trans=* | --program-tran=* \
1136 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001139 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1140 ac_prev=pdfdir ;;
1141 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1142 pdfdir=$ac_optarg ;;
1143
1144 -psdir | --psdir | --psdi | --psd | --ps)
1145 ac_prev=psdir ;;
1146 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1147 psdir=$ac_optarg ;;
1148
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1150 | -silent | --silent | --silen | --sile | --sil)
1151 silent=yes ;;
1152
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001153 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1154 ac_prev=sbindir ;;
1155 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1156 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158
1159 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1160 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1161 | --sharedst | --shareds | --shared | --share | --shar \
1162 | --sha | --sh)
1163 ac_prev=sharedstatedir ;;
1164 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1165 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1166 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1167 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170 -site | --site | --sit)
1171 ac_prev=site ;;
1172 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1176 ac_prev=srcdir ;;
1177 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1181 | --syscon | --sysco | --sysc | --sys | --sy)
1182 ac_prev=sysconfdir ;;
1183 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1184 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1193 verbose=yes ;;
1194
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 -version | --version | --versio | --versi | --vers | -V)
1196 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001202 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt_orig=$ac_useropt
1204 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205 case $ac_user_opts in
1206 *"
1207"with_$ac_useropt"
1208"*) ;;
1209 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1210 ac_unrecognized_sep=', ';;
1211 esac
1212 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213
1214 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001218 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 ac_useropt_orig=$ac_useropt
1220 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1221 case $ac_user_opts in
1222 *"
1223"with_$ac_useropt"
1224"*) ;;
1225 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1226 ac_unrecognized_sep=', ';;
1227 esac
1228 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230 --x)
1231 # Obsolete; use --with-x.
1232 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233
1234 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1235 | --x-incl | --x-inc | --x-in | --x-i)
1236 ac_prev=x_includes ;;
1237 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1238 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1242 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1243 ac_prev=x_libraries ;;
1244 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1245 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001248 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1249Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250 ;;
1251
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 *=*)
1253 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1254 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 case $ac_envvar in #(
1256 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 export $ac_envvar ;;
1261
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001262 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001267 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 ;;
1269
1270 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271done
1272
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276fi
1277
Matthias Kloseb9621712010-04-24 17:59:49 +00001278if test -n "$ac_unrecognized_opts"; then
1279 case $enable_option_checking in
1280 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001282 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1283 esac
1284fi
1285
1286# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1288 datadir sysconfdir sharedstatedir localstatedir includedir \
1289 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001290 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001293 # Remove trailing slashes.
1294 case $ac_val in
1295 */ )
1296 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1297 eval $ac_var=\$ac_val;;
1298 esac
1299 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001300 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 [\\/$]* | ?:[\\/]* ) continue;;
1302 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001304 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001305done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307# There might be people who depend on the old broken behavior: `$host'
1308# used to hold the argument of --host etc.
1309# FIXME: To remove some day.
1310build=$build_alias
1311host=$host_alias
1312target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# FIXME: To remove some day.
1315if test "x$host_alias" != x; then
1316 if test "x$build_alias" = x; then
1317 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001318 elif test "x$build_alias" != "x$host_alias"; then
1319 cross_compiling=yes
1320 fi
1321fi
1322
1323ac_tool_prefix=
1324test -n "$host_alias" && ac_tool_prefix=$host_alias-
1325
1326test "$silent" = yes && exec 6>/dev/null
1327
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329ac_pwd=`pwd` && test -n "$ac_pwd" &&
1330ac_ls_di=`ls -di .` &&
1331ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335
1336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337# Find the source files, if location was not specified.
1338if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001339 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001341 ac_confdir=`$as_dirname -- "$as_myself" ||
1342$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1343 X"$as_myself" : 'X\(//\)[^/]' \| \
1344 X"$as_myself" : 'X\(//\)$' \| \
1345 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1346$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)[^/].*/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\/\)$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\).*/{
1360 s//\1/
1361 q
1362 }
1363 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001364 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366 srcdir=..
1367 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368else
1369 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371if test ! -r "$srcdir/$ac_unique_file"; then
1372 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1376ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001377 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378 pwd)`
1379# When building in place, set srcdir=.
1380if test "$ac_abs_confdir" = "$ac_pwd"; then
1381 srcdir=.
1382fi
1383# Remove unnecessary trailing slashes from srcdir.
1384# Double slashes in file names in object file debugging info
1385# mess up M-x gdb in Emacs.
1386case $srcdir in
1387*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1388esac
1389for ac_var in $ac_precious_vars; do
1390 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_env_${ac_var}_value=\$${ac_var}
1392 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1393 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1394done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395
Martin v. Löwis11437992002-04-12 09:54:03 +00001396#
1397# Report the --help message.
1398#
1399if test "$ac_init_help" = "long"; then
1400 # Omit some internal or obsolete options to make the list less imposing.
1401 # This message is too long to be a string in the A/UX 3.1 sh.
1402 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001403\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
1405Usage: $0 [OPTION]... [VAR=VALUE]...
1406
1407To assign environment variables (e.g., CC, CFLAGS...), specify them as
1408VAR=VALUE. See below for descriptions of some of the useful variables.
1409
1410Defaults for the options are specified in brackets.
1411
1412Configuration:
1413 -h, --help display this help and exit
1414 --help=short display options specific to this package
1415 --help=recursive display the short help of all the included packages
1416 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001417 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 --cache-file=FILE cache test results in FILE [disabled]
1419 -C, --config-cache alias for \`--cache-file=config.cache'
1420 -n, --no-create do not create output files
1421 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1422
Martin v. Löwis11437992002-04-12 09:54:03 +00001423Installation directories:
1424 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428
1429By default, \`make install' will install all the files in
1430\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1431an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1432for instance \`--prefix=\$HOME'.
1433
1434For better control, use the options below.
1435
1436Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 --bindir=DIR user executables [EPREFIX/bin]
1438 --sbindir=DIR system admin executables [EPREFIX/sbin]
1439 --libexecdir=DIR program executables [EPREFIX/libexec]
1440 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1441 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1442 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1443 --libdir=DIR object code libraries [EPREFIX/lib]
1444 --includedir=DIR C header files [PREFIX/include]
1445 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1446 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1447 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1448 --infodir=DIR info documentation [DATAROOTDIR/info]
1449 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1450 --mandir=DIR man documentation [DATAROOTDIR/man]
1451 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1452 --htmldir=DIR html documentation [DOCDIR]
1453 --dvidir=DIR dvi documentation [DOCDIR]
1454 --pdfdir=DIR pdf documentation [DOCDIR]
1455 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001456_ACEOF
1457
1458 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001459
1460System types:
1461 --build=BUILD configure for building on BUILD [guessed]
1462 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464fi
1465
1466if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001468 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 cat <<\_ACEOF
1471
1472Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1475 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001476 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001477 create a universal binary build. SDKDIR specifies
1478 which macOS SDK should be used to perform the build,
1479 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001481 create a Python.framework rather than a traditional
1482 Unix install. optional INSTALLDIR specifies the
1483 installation path. see Mac/README.rst (default is
1484 no)
1485 --enable-shared enable building a shared Python library (default is
1486 no)
1487 --enable-profiling enable C-level code profiling with gprof (default is
1488 no)
1489 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1490 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001491 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001492 support loadable extensions in _sqlite module, see
1493 Doc/library/sqlite3.rst (default is no)
1494 --enable-ipv6 enable ipv6 (with ipv4) support, see
1495 Doc/library/socket.rst (default is yes if supported)
1496 --enable-big-digits[=15|30]
1497 use big digits (30 or 15 bits) for Python longs
1498 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Optional Packages:
1501 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1502 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001503 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001504 specify the kind of universal binary that should be
1505 created. this option is only valid when
1506 --enable-universalsdk is set; options are:
1507 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1508 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001509 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001510 specify the name for the python framework on macOS
1511 only valid when --enable-framework is set. see
1512 Mac/README.rst (default is 'Python')
1513 --with-cxx-main[=COMPILER]
1514 compile main() and link Python executable with C++
1515 compiler specified in COMPILER (default is $CXX)
1516 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1517 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001518 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001519 (default is no)
1520 --with-assertions build with C assertions enabled (default is no)
1521 --with-lto enable Link-Time-Optimization in any build (default
1522 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001523 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001524 select hash algorithm for use in Python/pyhash.c
1525 (default is SipHash24)
Charles-François Natalid30b0222014-05-08 23:08:51 +01001526 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001527 enable AddressSanitizer memory error detector,
1528 'asan' (default is no)
1529 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1530 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001531 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001532 enable UndefinedBehaviorSanitizer undefined
1533 behaviour detector, 'ubsan' (default is no)
1534 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001535 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001536 library, see Doc/library/pyexpat.rst (default is no)
1537 --with-system-ffi build _ctypes module using an installed ffi library,
1538 see Doc/library/ctypes.rst (default is
1539 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001540 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001541 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001542 --with-decimal-contextvar
1543 build _decimal module using a coroutine-local rather
1544 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001545 --with-tcltk-includes='-I...'
1546 override search for Tcl and Tk include files
1547 --with-tcltk-libs='-L...'
1548 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001549 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001550 override order to check db backends for dbm; a valid
1551 value is a colon separated string with the backend
1552 names `ndbm', `gdbm' and `bdb'.
1553 --with-doc-strings enable documentation strings (default is yes)
1554 --with-pymalloc enable specialized mallocs (default is yes)
1555 --with-c-locale-coercion
1556 enable C locale coercion to a UTF-8 based locale
1557 (default is yes)
1558 --with-valgrind enable Valgrind support (default is no)
1559 --with-dtrace enable DTrace support (default is no)
1560 --with-libm=STRING override libm math library to STRING (default is
1561 system-dependent)
1562 --with-libc=STRING override libc C library to STRING (default is
1563 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001564 --with-platlibdir=DIRNAME
1565 Python library directory name (default is "lib")
Anthony Shaw2de064e2020-01-14 17:40:10 +11001566 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001567 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001568 --with-ensurepip[=install|upgrade|no]
1569 "install" or "upgrade" using bundled pip (default is
1570 upgrade)
1571 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001572 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001573 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001574 Python's preferred selection (default), openssl:
1575 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001576 custom string, PROTOCOL_SSLv2 ignores the setting,
1577 see Doc/library/ssl.rst
Martin v. Löwis11437992002-04-12 09:54:03 +00001578
1579Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001580 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 CC C compiler command
1582 CFLAGS C compiler flags
1583 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1584 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001589 PROFILE_TASK
1590 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001591 PKG_CONFIG path to pkg-config utility
1592 PKG_CONFIG_PATH
1593 directories to add to pkg-config's search path
1594 PKG_CONFIG_LIBDIR
1595 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001596
1597Use these variables to override the choices made by `configure' or to help
1598it to find libraries and programs with nonstandard names/locations.
1599
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001600Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001603fi
1604
1605if test "$ac_init_help" = "recursive"; then
1606 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 test -d "$ac_dir" ||
1609 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1610 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 ac_builddir=.
1612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613case "$ac_dir" in
1614.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1615*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001616 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001618 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 case $ac_top_builddir_sub in
1620 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1621 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1622 esac ;;
1623esac
1624ac_abs_top_builddir=$ac_pwd
1625ac_abs_builddir=$ac_pwd$ac_dir_suffix
1626# for backward compatibility:
1627ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001628
1629case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632 ac_top_srcdir=$ac_top_builddir_sub
1633 ac_abs_top_srcdir=$ac_pwd ;;
1634 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 ac_top_srcdir=$srcdir
1637 ac_abs_top_srcdir=$srcdir ;;
1638 *) # Relative name.
1639 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1640 ac_top_srcdir=$ac_top_build_prefix$srcdir
1641 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001642esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001643ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001645 cd "$ac_dir" || { ac_status=$?; continue; }
1646 # Check for guested configure.
1647 if test -f "$ac_srcdir/configure.gnu"; then
1648 echo &&
1649 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1650 elif test -f "$ac_srcdir/configure"; then
1651 echo &&
1652 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001654 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655 fi || ac_status=$?
1656 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 done
1658fi
1659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001660test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001661if $ac_init_version; then
1662 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001663python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001664generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001666Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001667This configure script is free software; the Free Software Foundation
1668gives unlimited permission to copy, distribute and modify it.
1669_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001670 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001672
1673## ------------------------ ##
1674## Autoconf initialization. ##
1675## ------------------------ ##
1676
1677# ac_fn_c_try_compile LINENO
1678# --------------------------
1679# Try to compile conftest.$ac_ext, and return whether this succeeded.
1680ac_fn_c_try_compile ()
1681{
1682 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1683 rm -f conftest.$ac_objext
1684 if { { ac_try="$ac_compile"
1685case "(($ac_try" in
1686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1687 *) ac_try_echo=$ac_try;;
1688esac
1689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1690$as_echo "$ac_try_echo"; } >&5
1691 (eval "$ac_compile") 2>conftest.err
1692 ac_status=$?
1693 if test -s conftest.err; then
1694 grep -v '^ *+' conftest.err >conftest.er1
1695 cat conftest.er1 >&5
1696 mv -f conftest.er1 conftest.err
1697 fi
1698 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1699 test $ac_status = 0; } && {
1700 test -z "$ac_c_werror_flag" ||
1701 test ! -s conftest.err
1702 } && test -s conftest.$ac_objext; then :
1703 ac_retval=0
1704else
1705 $as_echo "$as_me: failed program was:" >&5
1706sed 's/^/| /' conftest.$ac_ext >&5
1707
1708 ac_retval=1
1709fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001710 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001711 as_fn_set_status $ac_retval
1712
1713} # ac_fn_c_try_compile
1714
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001715# ac_fn_c_try_cpp LINENO
1716# ----------------------
1717# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1718ac_fn_c_try_cpp ()
1719{
1720 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1721 if { { ac_try="$ac_cpp conftest.$ac_ext"
1722case "(($ac_try" in
1723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1724 *) ac_try_echo=$ac_try;;
1725esac
1726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1727$as_echo "$ac_try_echo"; } >&5
1728 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1729 ac_status=$?
1730 if test -s conftest.err; then
1731 grep -v '^ *+' conftest.err >conftest.er1
1732 cat conftest.er1 >&5
1733 mv -f conftest.er1 conftest.err
1734 fi
1735 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1736 test $ac_status = 0; } > conftest.i && {
1737 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1738 test ! -s conftest.err
1739 }; then :
1740 ac_retval=0
1741else
1742 $as_echo "$as_me: failed program was:" >&5
1743sed 's/^/| /' conftest.$ac_ext >&5
1744
1745 ac_retval=1
1746fi
1747 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1748 as_fn_set_status $ac_retval
1749
1750} # ac_fn_c_try_cpp
1751
Matthias Kloseb9621712010-04-24 17:59:49 +00001752# ac_fn_c_try_link LINENO
1753# -----------------------
1754# Try to link conftest.$ac_ext, and return whether this succeeded.
1755ac_fn_c_try_link ()
1756{
1757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758 rm -f conftest.$ac_objext conftest$ac_exeext
1759 if { { ac_try="$ac_link"
1760case "(($ac_try" in
1761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1762 *) ac_try_echo=$ac_try;;
1763esac
1764eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1765$as_echo "$ac_try_echo"; } >&5
1766 (eval "$ac_link") 2>conftest.err
1767 ac_status=$?
1768 if test -s conftest.err; then
1769 grep -v '^ *+' conftest.err >conftest.er1
1770 cat conftest.er1 >&5
1771 mv -f conftest.er1 conftest.err
1772 fi
1773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1774 test $ac_status = 0; } && {
1775 test -z "$ac_c_werror_flag" ||
1776 test ! -s conftest.err
1777 } && test -s conftest$ac_exeext && {
1778 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001779 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 }; then :
1781 ac_retval=0
1782else
1783 $as_echo "$as_me: failed program was:" >&5
1784sed 's/^/| /' conftest.$ac_ext >&5
1785
1786 ac_retval=1
1787fi
1788 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1789 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1790 # interfere with the next link command; also delete a directory that is
1791 # left behind by Apple's compiler. We do this before executing the actions.
1792 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001793 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001794 as_fn_set_status $ac_retval
1795
1796} # ac_fn_c_try_link
1797
Matthias Kloseb9621712010-04-24 17:59:49 +00001798# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1799# -------------------------------------------------------
1800# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1801# the include files in INCLUDES and setting the cache variable VAR
1802# accordingly.
1803ac_fn_c_check_header_mongrel ()
1804{
1805 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001806 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1808$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001809if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001810 $as_echo_n "(cached) " >&6
1811fi
1812eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
1815else
1816 # Is the header compilable?
1817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1818$as_echo_n "checking $2 usability... " >&6; }
1819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821$4
1822#include <$2>
1823_ACEOF
1824if ac_fn_c_try_compile "$LINENO"; then :
1825 ac_header_compiler=yes
1826else
1827 ac_header_compiler=no
1828fi
1829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1831$as_echo "$ac_header_compiler" >&6; }
1832
1833# Is the header present?
1834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1835$as_echo_n "checking $2 presence... " >&6; }
1836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837/* end confdefs.h. */
1838#include <$2>
1839_ACEOF
1840if ac_fn_c_try_cpp "$LINENO"; then :
1841 ac_header_preproc=yes
1842else
1843 ac_header_preproc=no
1844fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001845rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1847$as_echo "$ac_header_preproc" >&6; }
1848
1849# So? What about this header?
1850case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1851 yes:no: )
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1853$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1855$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1856 ;;
1857 no:yes:* )
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1859$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1861$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1863$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1865$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001868( $as_echo "## --------------------------------------- ##
1869## Report this to https://bugs.python.org/ ##
1870## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001871 ) | sed "s/^/$as_me: WARNING: /" >&2
1872 ;;
1873esac
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001876if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 $as_echo_n "(cached) " >&6
1878else
1879 eval "$3=\$ac_header_compiler"
1880fi
1881eval ac_res=\$$3
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1883$as_echo "$ac_res" >&6; }
1884fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001885 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001886
1887} # ac_fn_c_check_header_mongrel
1888
1889# ac_fn_c_try_run LINENO
1890# ----------------------
1891# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1892# that executables *can* be run.
1893ac_fn_c_try_run ()
1894{
1895 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1896 if { { ac_try="$ac_link"
1897case "(($ac_try" in
1898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1899 *) ac_try_echo=$ac_try;;
1900esac
1901eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1902$as_echo "$ac_try_echo"; } >&5
1903 (eval "$ac_link") 2>&5
1904 ac_status=$?
1905 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1906 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1907 { { case "(($ac_try" in
1908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1909 *) ac_try_echo=$ac_try;;
1910esac
1911eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1912$as_echo "$ac_try_echo"; } >&5
1913 (eval "$ac_try") 2>&5
1914 ac_status=$?
1915 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1916 test $ac_status = 0; }; }; then :
1917 ac_retval=0
1918else
1919 $as_echo "$as_me: program exited with status $ac_status" >&5
1920 $as_echo "$as_me: failed program was:" >&5
1921sed 's/^/| /' conftest.$ac_ext >&5
1922
1923 ac_retval=$ac_status
1924fi
1925 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001926 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001927 as_fn_set_status $ac_retval
1928
1929} # ac_fn_c_try_run
1930
1931# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1932# -------------------------------------------------------
1933# Tests whether HEADER exists and can be compiled using the include files in
1934# INCLUDES, setting the cache variable VAR accordingly.
1935ac_fn_c_check_header_compile ()
1936{
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1939$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001940if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001941 $as_echo_n "(cached) " >&6
1942else
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$4
1946#include <$2>
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 eval "$3=yes"
1950else
1951 eval "$3=no"
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1954fi
1955eval ac_res=\$$3
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1957$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001958 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001959
1960} # ac_fn_c_check_header_compile
1961
Matthias Kloseb9621712010-04-24 17:59:49 +00001962# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1963# -------------------------------------------
1964# Tests whether TYPE exists after having included INCLUDES, setting cache
1965# variable VAR accordingly.
1966ac_fn_c_check_type ()
1967{
1968 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1970$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001971if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001972 $as_echo_n "(cached) " >&6
1973else
1974 eval "$3=no"
1975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1976/* end confdefs.h. */
1977$4
1978int
1979main ()
1980{
1981if (sizeof ($2))
1982 return 0;
1983 ;
1984 return 0;
1985}
1986_ACEOF
1987if ac_fn_c_try_compile "$LINENO"; then :
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989/* end confdefs.h. */
1990$4
1991int
1992main ()
1993{
1994if (sizeof (($2)))
1995 return 0;
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001
2002else
2003 eval "$3=yes"
2004fi
2005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2006fi
2007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2008fi
2009eval ac_res=\$$3
2010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2011$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002012 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014} # ac_fn_c_check_type
2015
Matthias Kloseb9621712010-04-24 17:59:49 +00002016# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2017# --------------------------------------------
2018# Tries to find the compile-time value of EXPR in a program that includes
2019# INCLUDES, setting VAR accordingly. Returns whether the value could be
2020# computed
2021ac_fn_c_compute_int ()
2022{
2023 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2024 if test "$cross_compiling" = yes; then
2025 # Depending upon the size, compute the lo and hi bounds.
2026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027/* end confdefs.h. */
2028$4
2029int
2030main ()
2031{
2032static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002033test_array [0] = 0;
2034return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041 ac_lo=0 ac_mid=0
2042 while :; do
2043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2044/* end confdefs.h. */
2045$4
2046int
2047main ()
2048{
2049static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002050test_array [0] = 0;
2051return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002052
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057if ac_fn_c_try_compile "$LINENO"; then :
2058 ac_hi=$ac_mid; break
2059else
2060 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2061 if test $ac_lo -le $ac_mid; then
2062 ac_lo= ac_hi=
2063 break
2064 fi
2065 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2066fi
2067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2068 done
2069else
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002077test_array [0] = 0;
2078return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002079
2080 ;
2081 return 0;
2082}
2083_ACEOF
2084if ac_fn_c_try_compile "$LINENO"; then :
2085 ac_hi=-1 ac_mid=-1
2086 while :; do
2087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088/* end confdefs.h. */
2089$4
2090int
2091main ()
2092{
2093static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002094test_array [0] = 0;
2095return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002096
2097 ;
2098 return 0;
2099}
2100_ACEOF
2101if ac_fn_c_try_compile "$LINENO"; then :
2102 ac_lo=$ac_mid; break
2103else
2104 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2105 if test $ac_mid -le $ac_hi; then
2106 ac_lo= ac_hi=
2107 break
2108 fi
2109 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112 done
2113else
2114 ac_lo= ac_hi=
2115fi
2116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119# Binary search between lo and hi bounds.
2120while test "x$ac_lo" != "x$ac_hi"; do
2121 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
2126main ()
2127{
2128static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002129test_array [0] = 0;
2130return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002131
2132 ;
2133 return 0;
2134}
2135_ACEOF
2136if ac_fn_c_try_compile "$LINENO"; then :
2137 ac_hi=$ac_mid
2138else
2139 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2140fi
2141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2142done
2143case $ac_lo in #((
2144?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2145'') ac_retval=1 ;;
2146esac
2147 else
2148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2149/* end confdefs.h. */
2150$4
2151static long int longval () { return $2; }
2152static unsigned long int ulongval () { return $2; }
2153#include <stdio.h>
2154#include <stdlib.h>
2155int
2156main ()
2157{
2158
2159 FILE *f = fopen ("conftest.val", "w");
2160 if (! f)
2161 return 1;
2162 if (($2) < 0)
2163 {
2164 long int i = longval ();
2165 if (i != ($2))
2166 return 1;
2167 fprintf (f, "%ld", i);
2168 }
2169 else
2170 {
2171 unsigned long int i = ulongval ();
2172 if (i != ($2))
2173 return 1;
2174 fprintf (f, "%lu", i);
2175 }
2176 /* Do not output a trailing newline, as this causes \r\n confusion
2177 on some platforms. */
2178 return ferror (f) || fclose (f) != 0;
2179
2180 ;
2181 return 0;
2182}
2183_ACEOF
2184if ac_fn_c_try_run "$LINENO"; then :
2185 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2186else
2187 ac_retval=1
2188fi
2189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2190 conftest.$ac_objext conftest.beam conftest.$ac_ext
2191rm -f conftest.val
2192
2193 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002194 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002195 as_fn_set_status $ac_retval
2196
2197} # ac_fn_c_compute_int
2198
2199# ac_fn_c_check_func LINENO FUNC VAR
2200# ----------------------------------
2201# Tests whether FUNC exists, setting the cache variable VAR accordingly
2202ac_fn_c_check_func ()
2203{
2204 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2206$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002207if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002208 $as_echo_n "(cached) " >&6
2209else
2210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h. */
2212/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2213 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2214#define $2 innocuous_$2
2215
2216/* System header to define __stub macros and hopefully few prototypes,
2217 which can conflict with char $2 (); below.
2218 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2219 <limits.h> exists even on freestanding compilers. */
2220
2221#ifdef __STDC__
2222# include <limits.h>
2223#else
2224# include <assert.h>
2225#endif
2226
2227#undef $2
2228
2229/* Override any GCC internal prototype to avoid an error.
2230 Use char because int might match the return type of a GCC
2231 builtin and then its argument prototype would still apply. */
2232#ifdef __cplusplus
2233extern "C"
2234#endif
2235char $2 ();
2236/* The GNU C library defines this for functions which it implements
2237 to always fail with ENOSYS. Some functions are actually named
2238 something starting with __ and the normal name is an alias. */
2239#if defined __stub_$2 || defined __stub___$2
2240choke me
2241#endif
2242
2243int
2244main ()
2245{
2246return $2 ();
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251if ac_fn_c_try_link "$LINENO"; then :
2252 eval "$3=yes"
2253else
2254 eval "$3=no"
2255fi
2256rm -f core conftest.err conftest.$ac_objext \
2257 conftest$ac_exeext conftest.$ac_ext
2258fi
2259eval ac_res=\$$3
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2261$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002262 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002263
2264} # ac_fn_c_check_func
2265
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002266# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2267# ---------------------------------------------
2268# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2269# accordingly.
2270ac_fn_c_check_decl ()
2271{
2272 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273 as_decl_name=`echo $2|sed 's/ *(.*//'`
2274 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2276$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2277if eval \${$3+:} false; then :
2278 $as_echo_n "(cached) " >&6
2279else
2280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281/* end confdefs.h. */
2282$4
2283int
2284main ()
2285{
2286#ifndef $as_decl_name
2287#ifdef __cplusplus
2288 (void) $as_decl_use;
2289#else
2290 (void) $as_decl_name;
2291#endif
2292#endif
2293
2294 ;
2295 return 0;
2296}
2297_ACEOF
2298if ac_fn_c_try_compile "$LINENO"; then :
2299 eval "$3=yes"
2300else
2301 eval "$3=no"
2302fi
2303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304fi
2305eval ac_res=\$$3
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2307$as_echo "$ac_res" >&6; }
2308 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2309
2310} # ac_fn_c_check_decl
2311
Matthias Kloseb9621712010-04-24 17:59:49 +00002312# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2313# ----------------------------------------------------
2314# Tries to find if the field MEMBER exists in type AGGR, after including
2315# INCLUDES, setting cache variable VAR accordingly.
2316ac_fn_c_check_member ()
2317{
2318 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2320$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002321if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002322 $as_echo_n "(cached) " >&6
2323else
2324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2325/* end confdefs.h. */
2326$5
2327int
2328main ()
2329{
2330static $2 ac_aggr;
2331if (ac_aggr.$3)
2332return 0;
2333 ;
2334 return 0;
2335}
2336_ACEOF
2337if ac_fn_c_try_compile "$LINENO"; then :
2338 eval "$4=yes"
2339else
2340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341/* end confdefs.h. */
2342$5
2343int
2344main ()
2345{
2346static $2 ac_aggr;
2347if (sizeof ac_aggr.$3)
2348return 0;
2349 ;
2350 return 0;
2351}
2352_ACEOF
2353if ac_fn_c_try_compile "$LINENO"; then :
2354 eval "$4=yes"
2355else
2356 eval "$4=no"
2357fi
2358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361fi
2362eval ac_res=\$$4
2363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2364$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002365 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002366
2367} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002369This file contains any messages produced by compilers while
2370running configure, to aid debugging if configure makes a mistake.
2371
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002372It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002373generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002374
2375 $ $0 $@
2376
2377_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002379{
2380cat <<_ASUNAME
2381## --------- ##
2382## Platform. ##
2383## --------- ##
2384
2385hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2386uname -m = `(uname -m) 2>/dev/null || echo unknown`
2387uname -r = `(uname -r) 2>/dev/null || echo unknown`
2388uname -s = `(uname -s) 2>/dev/null || echo unknown`
2389uname -v = `(uname -v) 2>/dev/null || echo unknown`
2390
2391/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2392/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2393
2394/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2395/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2396/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002397/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002398/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2399/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2400/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2401
2402_ASUNAME
2403
2404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2405for as_dir in $PATH
2406do
2407 IFS=$as_save_IFS
2408 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 $as_echo "PATH: $as_dir"
2410 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002412
2413} >&5
2414
2415cat >&5 <<_ACEOF
2416
2417
2418## ----------- ##
2419## Core tests. ##
2420## ----------- ##
2421
2422_ACEOF
2423
2424
2425# Keep a trace of the command line.
2426# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002427# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002428# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002429# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002430ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002431ac_configure_args0=
2432ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002433ac_must_keep_next=false
2434for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002435do
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 for ac_arg
2437 do
2438 case $ac_arg in
2439 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2440 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2441 | -silent | --silent | --silen | --sile | --sil)
2442 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002444 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 esac
2446 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002447 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002449 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002450 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002451 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002453 case $ac_arg in
2454 *=* | --config-cache | -C | -disable-* | --disable-* \
2455 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2456 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2457 | -with-* | --with-* | -without-* | --without-* | --x)
2458 case "$ac_configure_args0 " in
2459 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2460 esac
2461 ;;
2462 -* ) ac_must_keep_next=true ;;
2463 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002466 ;;
2467 esac
2468 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002469done
Matthias Kloseb9621712010-04-24 17:59:49 +00002470{ ac_configure_args0=; unset ac_configure_args0;}
2471{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002472
2473# When interrupted or exit'd, cleanup temporary files, and complete
2474# config.log. We remove comments because anyway the quotes in there
2475# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476# WARNING: Use '\'' to represent an apostrophe within the trap.
2477# 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 +00002478trap 'exit_status=$?
2479 # Save into config.log some information that might help in debugging.
2480 {
2481 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002482
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002483 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002484## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 echo
2487 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488(
2489 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2490 eval ac_val=\$$ac_var
2491 case $ac_val in #(
2492 *${as_nl}*)
2493 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2495$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac
2497 case $ac_var in #(
2498 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2500 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 esac ;;
2502 esac
2503 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2506 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 "s/'\''/'\''\\\\'\'''\''/g;
2509 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2510 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002511 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002513 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac |
2515 sort
2516)
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002518
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002519 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002520## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002522 echo
2523 for ac_var in $ac_subst_vars
2524 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 eval ac_val=\$$ac_var
2526 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 done | sort
2531 echo
2532
2533 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002534 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002536## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002537 echo
2538 for ac_var in $ac_subst_files
2539 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 eval ac_val=\$$ac_var
2541 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 done | sort
2546 echo
2547 fi
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002551## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 echo
2556 fi
2557 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 $as_echo "$as_me: caught signal $ac_signal"
2559 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 rm -f core *.core core.conftest.* &&
2562 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002565for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002566 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002567done
2568ac_signal=0
2569
2570# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
Matthias Kloseb9621712010-04-24 17:59:49 +00002573$as_echo "/* confdefs.h */" > confdefs.h
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575# Predefined preprocessor variables.
2576
2577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_NAME "$PACKAGE_NAME"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581cat >>confdefs.h <<_ACEOF
2582#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2583_ACEOF
2584
Martin v. Löwis11437992002-04-12 09:54:03 +00002585cat >>confdefs.h <<_ACEOF
2586#define PACKAGE_VERSION "$PACKAGE_VERSION"
2587_ACEOF
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589cat >>confdefs.h <<_ACEOF
2590#define PACKAGE_STRING "$PACKAGE_STRING"
2591_ACEOF
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593cat >>confdefs.h <<_ACEOF
2594#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2595_ACEOF
2596
Matthias Kloseb9621712010-04-24 17:59:49 +00002597cat >>confdefs.h <<_ACEOF
2598#define PACKAGE_URL "$PACKAGE_URL"
2599_ACEOF
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601
2602# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002603# Prefer an explicitly selected file to automatically selected ones.
2604ac_site_file1=NONE
2605ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002607 # We do not want a PATH search for config.site.
2608 case $CONFIG_SITE in #((
2609 -*) ac_site_file1=./$CONFIG_SITE;;
2610 */*) ac_site_file1=$CONFIG_SITE;;
2611 *) ac_site_file1=./$CONFIG_SITE;;
2612 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 ac_site_file1=$prefix/share/config.site
2615 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616else
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 ac_site_file1=$ac_default_prefix/share/config.site
2618 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002620for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621do
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 test "x$ac_site_file" = xNONE && continue
2623 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2625$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002627 . "$ac_site_file" \
2628 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2629$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2630as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002631See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632 fi
2633done
2634
2635if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 # Some versions of bash will fail to source /dev/null (special files
2637 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2638 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2640$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2643 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 esac
2645 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002646else
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2648$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 >$cache_file
2650fi
2651
2652# Check that the precious variables saved in the cache have kept the same
2653# value.
2654ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2657 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2659 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 case $ac_old_set,$ac_new_set in
2661 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2663$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 +00002664 ac_cache_corrupted=: ;;
2665 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2667$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 ac_cache_corrupted=: ;;
2669 ,);;
2670 *)
2671 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 # differences in whitespace do not lead to failure.
2673 ac_old_val_w=`echo x $ac_old_val`
2674 ac_new_val_w=`echo x $ac_new_val`
2675 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2677$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2678 ac_cache_corrupted=:
2679 else
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2681$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2682 eval $ac_var=\$ac_old_val
2683 fi
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2685$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2687$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 fi;;
2689 esac
2690 # Pass precious variables to config.status.
2691 if test "$ac_new_set" = set; then
2692 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 *) ac_arg=$ac_var=$ac_new_val ;;
2695 esac
2696 case " $ac_configure_args " in
2697 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002698 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002699 esac
2700 fi
2701done
2702if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002703 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2706$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002707 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002709## -------------------- ##
2710## Main body of script. ##
2711## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712
Guido van Rossum7f43da71994-08-01 12:15:30 +00002713ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002714ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002715ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2716ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2717ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002718
Guido van Rossum627b2d71993-12-24 10:39:16 +00002719
Michael W. Hudson54241132001-12-07 15:38:26 +00002720
Trent Nelson4d4ec652012-10-16 08:51:24 -04002721
Christian Heimesff5be6e2018-01-20 13:19:21 +01002722
2723
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002724if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002725 # If we're building out-of-tree, we need to make sure the following
2726 # resources get picked up before their $srcdir counterparts.
2727 # Objects/ -> typeslots.inc
2728 # Include/ -> Python-ast.h, graminit.h
2729 # Python/ -> importlib.h
2730 # (A side effect of this is that these resources will automatically be
2731 # regenerated when building out-of-tree, regardless of whether or not
2732 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2733 # off.)
2734 BASECPPFLAGS="-IObjects -IInclude -IPython"
2735else
2736 BASECPPFLAGS=""
2737fi
2738
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002739
2740
2741
2742
Victor Stinner9ed34a82017-05-02 22:35:58 +02002743if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002744then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002745# Extract the first word of "git", so it can be a program name with args.
2746set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2748$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002749if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002750 $as_echo_n "(cached) " >&6
2751else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752 if test -n "$HAS_GIT"; then
2753 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754else
2755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2756for as_dir in $PATH
2757do
2758 IFS=$as_save_IFS
2759 test -z "$as_dir" && as_dir=.
2760 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2764 break 2
2765 fi
2766done
2767 done
2768IFS=$as_save_IFS
2769
Ned Deily5c4b0d02017-03-04 00:19:55 -05002770 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771fi
2772fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002773HAS_GIT=$ac_cv_prog_HAS_GIT
2774if test -n "$HAS_GIT"; then
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2776$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777else
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2779$as_echo "no" >&6; }
2780fi
2781
2782
2783else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002784HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002785fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002786if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002787then
Xiang Zhang4c855572018-08-20 22:36:19 +08002788 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2789 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2790 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002792 GITVERSION=""
2793 GITTAG=""
2794 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002795fi
2796
2797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002798ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002799
2800
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002801ac_aux_dir=
2802for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2803 if test -f "$ac_dir/install-sh"; then
2804 ac_aux_dir=$ac_dir
2805 ac_install_sh="$ac_aux_dir/install-sh -c"
2806 break
2807 elif 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/shtool"; then
2812 ac_aux_dir=$ac_dir
2813 ac_install_sh="$ac_aux_dir/shtool install -c"
2814 break
2815 fi
2816done
2817if test -z "$ac_aux_dir"; then
2818 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2819fi
2820
2821# These three variables are undocumented and unsupported,
2822# and are intended to be withdrawn in a future Autoconf release.
2823# They can cause serious problems if a builder's source tree is in a directory
2824# whose full name contains unusual characters.
2825ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2826ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2827ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2828
2829
2830# Make sure we can run config.sub.
2831$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2832 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2833
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2835$as_echo_n "checking build system type... " >&6; }
2836if ${ac_cv_build+:} false; then :
2837 $as_echo_n "(cached) " >&6
2838else
2839 ac_build_alias=$build_alias
2840test "x$ac_build_alias" = x &&
2841 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2842test "x$ac_build_alias" = x &&
2843 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2844ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2845 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2846
2847fi
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2849$as_echo "$ac_cv_build" >&6; }
2850case $ac_cv_build in
2851*-*-*) ;;
2852*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2853esac
2854build=$ac_cv_build
2855ac_save_IFS=$IFS; IFS='-'
2856set x $ac_cv_build
2857shift
2858build_cpu=$1
2859build_vendor=$2
2860shift; shift
2861# Remember, the first character of IFS is used to create $*,
2862# except with old shells:
2863build_os=$*
2864IFS=$ac_save_IFS
2865case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2866
2867
2868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2869$as_echo_n "checking host system type... " >&6; }
2870if ${ac_cv_host+:} false; then :
2871 $as_echo_n "(cached) " >&6
2872else
2873 if test "x$host_alias" = x; then
2874 ac_cv_host=$ac_cv_build
2875else
2876 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2877 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2878fi
2879
2880fi
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2882$as_echo "$ac_cv_host" >&6; }
2883case $ac_cv_host in
2884*-*-*) ;;
2885*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2886esac
2887host=$ac_cv_host
2888ac_save_IFS=$IFS; IFS='-'
2889set x $ac_cv_host
2890shift
2891host_cpu=$1
2892host_vendor=$2
2893shift; shift
2894# Remember, the first character of IFS is used to create $*,
2895# except with old shells:
2896host_os=$*
2897IFS=$ac_save_IFS
2898case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2899
2900
2901
doko@python.orga10e4a92013-01-25 18:45:12 +01002902
2903
Ned Deilyfcbc2462014-08-22 13:32:49 -07002904# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2905rm -f pybuilddir.txt
2906
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002907for ac_prog in python$PACKAGE_VERSION python3 python
2908do
2909 # Extract the first word of "$ac_prog", so it can be a program name with args.
2910set dummy $ac_prog; ac_word=$2
2911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2912$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002913if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002914 $as_echo_n "(cached) " >&6
2915else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002916 if test -n "$PYTHON_FOR_REGEN"; then
2917 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918else
2919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2920for as_dir in $PATH
2921do
2922 IFS=$as_save_IFS
2923 test -z "$as_dir" && as_dir=.
2924 for ac_exec_ext in '' $ac_executable_extensions; do
2925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002926 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2928 break 2
2929 fi
2930done
2931 done
2932IFS=$as_save_IFS
2933
2934fi
2935fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002936PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2937if test -n "$PYTHON_FOR_REGEN"; then
2938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2939$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002940else
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2942$as_echo "no" >&6; }
2943fi
2944
2945
Victor Stinnera5c62a82017-05-03 18:21:48 +02002946 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002947done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002948test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002949
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002950
2951
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002952if test "$cross_compiling" = yes; then
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2954$as_echo_n "checking for python interpreter for cross build... " >&6; }
2955 if test -z "$PYTHON_FOR_BUILD"; then
2956 for interp in python$PACKAGE_VERSION python3 python; do
2957 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002958 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 +02002959 break
2960 fi
2961 interp=
2962 done
2963 if test x$interp = x; then
2964 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2965 fi
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2967$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002968 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 +02002969 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002970elif test "$cross_compiling" = maybe; then
2971 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002972else
2973 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2974fi
2975
2976
Martin v. Löwis11437992002-04-12 09:54:03 +00002977
Benjamin Petersond23f8222009-04-05 19:13:16 +00002978if test "$prefix" != "/"; then
2979 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2980fi
2981
2982
Martin v. Löwis11437992002-04-12 09:54:03 +00002983
2984
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002985# We don't use PACKAGE_ variables, and they cause conflicts
2986# with other autoconf-based packages that include Python.h
2987grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2988rm confdefs.h
2989mv confdefs.h.new confdefs.h
2990
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002991
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002992VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002993
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002994# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002995
2996SOVERSION=1.0
2997
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002998# The later defininition of _XOPEN_SOURCE disables certain features
2999# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002
3003
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003004# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3005# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3006# them.
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003009
3010
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003011# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3012# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3013# them.
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003016
3017
Martin v. Löwisd6320502004-08-12 13:45:08 +00003018# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003019# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3020# them.
3021
Matthias Kloseb9621712010-04-24 17:59:49 +00003022$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003023
3024
3025
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003026define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003027
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003028# Arguments passed to configure.
3029
3030CONFIG_ARGS="$ac_configure_args"
3031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3033$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003035if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003036 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037 case $enableval in
3038 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003039 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003040 # information
3041 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003042 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003044 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3045 if test ! -d "${enableval}"
3046 then
3047 enableval=/
3048 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050 ;;
3051 esac
3052 case $enableval in
3053 no)
3054 UNIVERSALSDK=
3055 enable_universalsdk=
3056 ;;
3057 *)
3058 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059 if test ! -d "${UNIVERSALSDK}"
3060 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003061 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003063 ;;
3064 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003065
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066
Thomas Wouters477c8d52006-05-27 19:21:47 +00003067else
3068
3069 UNIVERSALSDK=
3070 enable_universalsdk=
3071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003072fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003073
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003074if test -n "${UNIVERSALSDK}"
3075then
Matthias Kloseb9621712010-04-24 17:59:49 +00003076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3077$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003078else
Matthias Kloseb9621712010-04-24 17:59:49 +00003079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3080$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003081fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003083
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003084
Ned Deily87adb6e2013-10-18 21:09:56 -07003085ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003086
Ned Deilycbfb9a52012-06-23 16:02:19 -07003087# For backward compatibility reasons we prefer to select '32-bit' if available,
3088# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003090if test "`uname -s`" = "Darwin"
3091then
3092 if test -n "${UNIVERSALSDK}"
3093 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003094 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003095 then
3096 UNIVERSAL_ARCHS="intel"
3097 fi
3098 fi
3099fi
3100
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003101
Matthias Kloseb9621712010-04-24 17:59:49 +00003102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3103$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003104
3105# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003106if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003107 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003108 UNIVERSAL_ARCHS="$withval"
3109
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003110fi
3111
Ned Deily87adb6e2013-10-18 21:09:56 -07003112if test -n "${UNIVERSALSDK}"
3113then
3114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3115$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3116else
3117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3118$as_echo "no" >&6; }
3119fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003121
3122# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003123if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003124 withval=$with_framework_name;
3125 PYTHONFRAMEWORK=${withval}
3126 PYTHONFRAMEWORKDIR=${withval}.framework
3127 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3128
3129else
3130
3131 PYTHONFRAMEWORK=Python
3132 PYTHONFRAMEWORKDIR=Python.framework
3133 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3134
3135fi
3136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003138if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003139 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003140 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003141 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003142 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 esac
3144 case $enableval in
3145 no)
3146 PYTHONFRAMEWORK=
3147 PYTHONFRAMEWORKDIR=no-framework
3148 PYTHONFRAMEWORKPREFIX=
3149 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003150 FRAMEWORKINSTALLFIRST=
3151 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003152 FRAMEWORKALTINSTALLFIRST=
3153 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003154 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003155 if test "x${prefix}" = "xNONE"; then
3156 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3157 else
3158 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3159 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003160 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003161 ;;
3162 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003163 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003164 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003165 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003166 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003167 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3168 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003169 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003170 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003171
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003172 if test "x${prefix}" = "xNONE" ; then
3173 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003174
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003175 else
3176 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3177 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003178
3179 case "${enableval}" in
3180 /System*)
3181 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3182 if test "${prefix}" = "NONE" ; then
3183 # See below
3184 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3185 fi
3186 ;;
3187
3188 /Library*)
3189 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3190 ;;
3191
3192 */Library/Frameworks)
3193 MDIR="`dirname "${enableval}"`"
3194 MDIR="`dirname "${MDIR}"`"
3195 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3196
3197 if test "${prefix}" = "NONE"; then
3198 # User hasn't specified the
3199 # --prefix option, but wants to install
3200 # the framework in a non-default location,
3201 # ensure that the compatibility links get
3202 # installed relative to that prefix as well
3203 # instead of in /usr/local.
3204 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3205 fi
3206 ;;
3207
3208 *)
3209 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3210 ;;
3211 esac
3212
Jack Jansen127e56e2001-09-11 14:41:54 +00003213 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003215 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003221 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3222
3223 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3224
Jack Jansene578a632001-08-15 01:27:14 +00003225 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003226
Guido van Rossum563e7081996-09-10 18:20:48 +00003227else
Martin v. Löwis11437992002-04-12 09:54:03 +00003228
Jack Jansene578a632001-08-15 01:27:14 +00003229 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003230 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003231 PYTHONFRAMEWORKPREFIX=
3232 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233 FRAMEWORKINSTALLFIRST=
3234 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003235 FRAMEWORKALTINSTALLFIRST=
3236 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003237 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003238 if test "x${prefix}" = "xNONE" ; then
3239 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3240 else
3241 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3242 fi
Jack Jansene578a632001-08-15 01:27:14 +00003243 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003246fi
3247
Thomas Wouters477c8d52006-05-27 19:21:47 +00003248
3249
Michael W. Hudson54241132001-12-07 15:38:26 +00003250
3251
3252
3253
Jack Jansene578a632001-08-15 01:27:14 +00003254
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003255
3256
3257
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003258
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003259
Ned Deilyb8f944f2013-11-21 22:42:25 -08003260
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003261
3262cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003263#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003264_ACEOF
3265
3266
Jack Jansene578a632001-08-15 01:27:14 +00003267##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003268## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003269## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003270##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271# Set name for machine-dependent library files
3272
Matthias Kloseb9621712010-04-24 17:59:49 +00003273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3274$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275if test -z "$MACHDEP"
3276then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 # avoid using uname for cross builds
3278 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003279 # ac_sys_system and ac_sys_release are used for setting
3280 # a lot of different things including 'define_xopen_source'
3281 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003283 *-*-linux-android*)
3284 ac_sys_system=Linux-android
3285 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 *-*-linux*)
3287 ac_sys_system=Linux
3288 ;;
3289 *-*-cygwin*)
3290 ac_sys_system=Cygwin
3291 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003292 *-*-vxworks*)
3293 ac_sys_system=VxWorks
3294 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003295 *)
3296 # for now, limit cross builds to known configurations
3297 MACHDEP="unknown"
3298 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3299 esac
3300 ac_sys_release=
3301 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003302 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003303 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003304 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003305 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003306 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003307 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003308 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003309 fi
3310 ac_md_system=`echo $ac_sys_system |
3311 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3312 ac_md_release=`echo $ac_sys_release |
3313 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3314 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003315
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003316 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003317 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003318 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003319 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003320 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003321 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003322 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003323fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3325$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003326
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003327
3328if test "$cross_compiling" = yes; then
3329 case "$host" in
3330 *-*-linux*)
3331 case "$host_cpu" in
3332 arm*)
3333 _host_cpu=arm
3334 ;;
3335 *)
3336 _host_cpu=$host_cpu
3337 esac
3338 ;;
3339 *-*-cygwin*)
3340 _host_cpu=
3341 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003342 *-*-vxworks*)
3343 _host_cpu=$host_cpu
3344 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003345 *)
3346 # for now, limit cross builds to known configurations
3347 MACHDEP="unknown"
3348 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3349 esac
3350 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3351fi
3352
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003353# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3354# disable features if it is defined, without any means to access these
3355# features as extensions. For these systems, we skip the definition of
3356# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3357# some feature, make sure there is no alternative way to access this
3358# feature. Also, when using wildcards, make sure you have verified the
3359# need for not defining _XOPEN_SOURCE on all systems matching the
3360# wildcard, and that the wildcard does not include future systems
3361# (which may remove their limitations).
3362case $ac_sys_system/$ac_sys_release in
3363 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3364 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003365 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003366 # In addition, Stefan Krah confirms that issue #1244610 exists through
3367 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003368 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003369 define_xopen_source=no
3370 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3371 # also defined. This can be overridden by defining _BSD_SOURCE
3372 # As this has a different meaning on Linux, only define it on OpenBSD
3373
Matthias Kloseb9621712010-04-24 17:59:49 +00003374$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003375
3376 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003377 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003378 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3379 # also defined. This can be overridden by defining _BSD_SOURCE
3380 # As this has a different meaning on Linux, only define it on OpenBSD
3381
Matthias Kloseb9621712010-04-24 17:59:49 +00003382$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003383
3384 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003385 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3386 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3387 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003388 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 +00003389 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003390 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3391 # request to enable features supported by the standard as a request
3392 # to disable features not supported by the standard. The best way
3393 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3394 # entirely and define __EXTENSIONS__ instead.
3395 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003396 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003397 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3398 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003399 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003400 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003401 define_xopen_source=no;;
3402 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003403 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003404 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003405 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003406 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3407 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3408 # identifies itself as Darwin/7.*
3409 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3410 # disables platform specific features beyond repair.
3411 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3412 # has no effect, don't bother defining them
3413 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003414 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003415 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003416 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003417 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3418 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3419 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003420 AIX/4)
3421 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003422 AIX/5)
3423 if test `uname -r` -eq 1; then
3424 define_xopen_source=no
3425 fi
3426 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003427 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3428 # defining NI_NUMERICHOST.
3429 QNX/6.3.2)
3430 define_xopen_source=no
3431 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003432 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3433 # in network headers still using system V types.
3434 VxWorks/*)
3435 define_xopen_source=no
3436 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003437
Ian Nortona9edf442020-02-14 03:09:11 +00003438 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3439 # chroot() and other functions
3440 hp*|HP*)
3441 define_xopen_source=no
3442 ;;
3443
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003444esac
3445
3446if test $define_xopen_source = yes
3447then
Victor Stinner14d098d2011-09-07 22:29:43 +02003448 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
Victor Stinner14d098d2011-09-07 22:29:43 +02003450$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003451
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003452
3453 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3454 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3455 # several APIs are not declared. Since this is also needed in some
3456 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003457
Matthias Kloseb9621712010-04-24 17:59:49 +00003458$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
3460
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003461
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003462$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003463
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003464fi
3465
Christian Heimes647cd872013-12-07 23:39:33 +01003466# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3467case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003468 hp*|HP*)
3469 define_stdc_a1=yes;;
3470 *)
3471 define_stdc_a1=no;;
3472esac
3473
3474if test $define_stdc_a1 = yes
3475then
Christian Heimes647cd872013-12-07 23:39:33 +01003476
3477$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3478
Christian Heimesb02bcae2013-12-08 15:21:08 +01003479fi
Christian Heimes647cd872013-12-07 23:39:33 +01003480
Jack Jansen6b08a402004-06-03 12:41:45 +00003481# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3482# it may influence the way we can build extensions, so distutils
3483# needs to check it
3484
Thomas Wouters477c8d52006-05-27 19:21:47 +00003485
Jack Jansen6b08a402004-06-03 12:41:45 +00003486CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003487EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003488
Guido van Rossum627b2d71993-12-24 10:39:16 +00003489# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003490
3491# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3492# for debug/optimization stuff. BASECFLAGS is for flags that are required
3493# just to get things to compile and link. Users are free to override OPT
3494# when running configure or make. The build should not break if they do.
3495# BASECFLAGS should generally not be messed with, however.
3496
Guido van Rossum8b131c51995-03-09 14:10:13 +00003497# If the user switches compilers, we can't believe the cache
3498if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3499then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003500 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003501(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003502fi
3503
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003504# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3505# when the compiler supports them, but we don't always want -O2, and
3506# we set -g later.
3507if test -z "$CFLAGS"; then
3508 CFLAGS=
3509fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003510
3511if test "$ac_sys_system" = "Darwin"
3512then
3513 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003514 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003515 # information
3516 if test -z "${CC}"
3517 then
3518 found_gcc=
3519 found_clang=
3520 as_save_IFS=$IFS; IFS=:
3521 for as_dir in $PATH
3522 do
3523 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003524 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003525 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003526 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003527 fi
3528 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003529 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003531 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003532 fi
3533 fi
3534 done
3535 IFS=$as_save_IFS
3536
3537 if test -n "$found_gcc" -a -n "$found_clang"
3538 then
3539 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3540 then
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3542$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3543 CC="$found_clang"
3544 CXX="$found_clang++"
3545 fi
3546
3547
3548 elif test -z "$found_gcc" -a -n "$found_clang"
3549 then
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3551$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3552 CC="$found_clang"
3553 CXX="$found_clang++"
3554
3555 elif test -z "$found_gcc" -a -z "$found_clang"
3556 then
3557 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3558 if test -n "${found_clang}"
3559 then
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3561$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3562 CC="${found_clang}"
3563 CXX="`/usr/bin/xcrun -find clang++`"
3564
3565 # else: use default behaviour
3566 fi
3567 fi
3568 fi
3569fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003570ac_ext=c
3571ac_cpp='$CPP $CPPFLAGS'
3572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3574ac_compiler_gnu=$ac_cv_c_compiler_gnu
3575if test -n "$ac_tool_prefix"; then
3576 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3577set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3579$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003580if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003581 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003582else
3583 if test -n "$CC"; then
3584 ac_cv_prog_CC="$CC" # Let the user override the test.
3585else
Martin v. Löwis11437992002-04-12 09:54:03 +00003586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3587for as_dir in $PATH
3588do
3589 IFS=$as_save_IFS
3590 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 $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 +00003595 break 2
3596 fi
3597done
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003600
Jack Jansendd19cf82001-12-06 22:36:17 +00003601fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003604if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3606$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003607else
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3609$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003610fi
3611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612
Martin v. Löwis11437992002-04-12 09:54:03 +00003613fi
3614if test -z "$ac_cv_prog_CC"; then
3615 ac_ct_CC=$CC
3616 # Extract the first word of "gcc", so it can be a program name with args.
3617set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3619$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003620if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003622else
3623 if test -n "$ac_ct_CC"; then
3624 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3625else
3626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3627for as_dir in $PATH
3628do
3629 IFS=$as_save_IFS
3630 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 $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 +00003635 break 2
3636 fi
3637done
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003640
3641fi
3642fi
3643ac_ct_CC=$ac_cv_prog_ac_ct_CC
3644if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3646$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003647else
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3649$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650fi
3651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652 if test "x$ac_ct_CC" = x; then
3653 CC=""
3654 else
3655 case $cross_compiling:$ac_tool_warned in
3656yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003657{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3658$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659ac_tool_warned=yes ;;
3660esac
3661 CC=$ac_ct_CC
3662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003663else
3664 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003665fi
3666
Jack Jansendd19cf82001-12-06 22:36:17 +00003667if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668 if test -n "$ac_tool_prefix"; then
3669 # 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 +00003670set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3672$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003673if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003675else
3676 if test -n "$CC"; then
3677 ac_cv_prog_CC="$CC" # Let the user override the test.
3678else
Martin v. Löwis11437992002-04-12 09:54:03 +00003679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3680for as_dir in $PATH
3681do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 $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 +00003688 break 2
3689 fi
3690done
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003693
3694fi
3695fi
3696CC=$ac_cv_prog_CC
3697if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3699$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003700else
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3702$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003703fi
3704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003707fi
3708if test -z "$CC"; then
3709 # Extract the first word of "cc", so it can be a program name with args.
3710set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003713if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003715else
3716 if test -n "$CC"; then
3717 ac_cv_prog_CC="$CC" # Let the user override the test.
3718else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003719 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3721for as_dir in $PATH
3722do
3723 IFS=$as_save_IFS
3724 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3728 ac_prog_rejected=yes
3729 continue
3730 fi
3731 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $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 +00003733 break 2
3734 fi
3735done
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003738
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003739if test $ac_prog_rejected = yes; then
3740 # We found a bogon in the path, so make sure we never use it.
3741 set dummy $ac_cv_prog_CC
3742 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744 # We chose a different compiler from the bogus one.
3745 # However, it has the same basename, so the bogon will be chosen
3746 # first if we set CC to just the basename; use the full file name.
3747 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003748 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749 fi
3750fi
3751fi
3752fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003753CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760fi
3761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763fi
3764if test -z "$CC"; then
3765 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 do
3768 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3769set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003772if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003774else
3775 if test -n "$CC"; then
3776 ac_cv_prog_CC="$CC" # Let the user override the test.
3777else
Martin v. Löwis11437992002-04-12 09:54:03 +00003778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779for as_dir in $PATH
3780do
3781 IFS=$as_save_IFS
3782 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 $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 +00003787 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003788 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003789done
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003792
3793fi
3794fi
3795CC=$ac_cv_prog_CC
3796if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3798$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003802fi
3803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 test -n "$CC" && break
3806 done
3807fi
3808if test -z "$CC"; then
3809 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003811do
3812 # Extract the first word of "$ac_prog", so it can be a program name with args.
3813set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3815$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003816if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003818else
3819 if test -n "$ac_ct_CC"; then
3820 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3821else
3822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3823for as_dir in $PATH
3824do
3825 IFS=$as_save_IFS
3826 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003829 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 $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 +00003831 break 2
3832 fi
3833done
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003836
Martin v. Löwis11437992002-04-12 09:54:03 +00003837fi
3838fi
3839ac_ct_CC=$ac_cv_prog_ac_ct_CC
3840if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3842$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003843else
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3845$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003846fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 test -n "$ac_ct_CC" && break
3850done
Michael W. Hudson54241132001-12-07 15:38:26 +00003851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852 if test "x$ac_ct_CC" = x; then
3853 CC=""
3854 else
3855 case $cross_compiling:$ac_tool_warned in
3856yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859ac_tool_warned=yes ;;
3860esac
3861 CC=$ac_ct_CC
3862 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003863fi
3864
3865fi
3866
3867
Matthias Kloseb9621712010-04-24 17:59:49 +00003868test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003870as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003871See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003872
3873# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003874$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3875set X $ac_compile
3876ac_compiler=$2
3877for ac_option in --version -v -V -qversion; do
3878 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879case "(($ac_try" in
3880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3881 *) ac_try_echo=$ac_try;;
3882esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3884$as_echo "$ac_try_echo"; } >&5
3885 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003887 if test -s conftest.err; then
3888 sed '10a\
3889... rest of stderr output deleted ...
3890 10q' conftest.err >conftest.er1
3891 cat conftest.er1 >&5
3892 fi
3893 rm -f conftest.er1 conftest.err
3894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3895 test $ac_status = 0; }
3896done
Martin v. Löwis11437992002-04-12 09:54:03 +00003897
Matthias Kloseb9621712010-04-24 17:59:49 +00003898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003899/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003900
Martin v. Löwis11437992002-04-12 09:54:03 +00003901int
3902main ()
3903{
3904
3905 ;
3906 return 0;
3907}
3908_ACEOF
3909ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003910ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003911# Try to create an executable without -o first, disregard a.out.
3912# It will help us diagnose broken compilers, and finding out an intuition
3913# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3915$as_echo_n "checking whether the C compiler works... " >&6; }
3916ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3917
3918# The possible output files:
3919ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921ac_rmfiles=
3922for ac_file in $ac_files
3923do
3924 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3927 esac
3928done
3929rm -f $ac_rmfiles
3930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932case "(($ac_try" in
3933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3934 *) ac_try_echo=$ac_try;;
3935esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003936eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3937$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3941 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3943# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3944# in a Makefile. We should not override ac_cv_exeext if it was cached,
3945# so that the user can short-circuit this test for compilers unknown to
3946# Autoconf.
3947for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003948do
3949 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003952 ;;
3953 [ab].out )
3954 # We found the default executable, but exeext='' is most
3955 # certainly right.
3956 break;;
3957 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 then :; else
3960 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3961 fi
3962 # We set ac_cv_exeext here because the later test for it is not
3963 # safe: cross compilers may not add the suffix if given an `-o'
3964 # argument, so we may need to know it at that point already.
3965 # Even if this section looks crufty: it has the advantage of
3966 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003967 break;;
3968 * )
3969 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 esac
3971done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972test "$ac_cv_exeext" = no && ac_cv_exeext=
3973
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003974else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 ac_file=''
3976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003977if test -z "$ac_file"; then :
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979$as_echo "no" >&6; }
3980$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003981sed 's/^/| /' conftest.$ac_ext >&5
3982
Matthias Kloseb9621712010-04-24 17:59:49 +00003983{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3984$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003985as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003986See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003987else
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3989$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3992$as_echo_n "checking for C compiler default output file name... " >&6; }
3993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3994$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003995ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996
Matthias Kloseb9621712010-04-24 17:59:49 +00003997rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4000$as_echo_n "checking for suffix of executables... " >&6; }
4001if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002case "(($ac_try" in
4003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004 *) ac_try_echo=$ac_try;;
4005esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4007$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004009 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004010 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4011 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4013# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4014# work properly (i.e., refer to `conftest.exe'), while it won't with
4015# `rm'.
4016for ac_file in conftest.exe conftest conftest.*; do
4017 test -f "$ac_file" || continue
4018 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4021 break;;
4022 * ) break;;
4023 esac
4024done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004025else
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004028as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004029See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004031rm -f conftest conftest$ac_cv_exeext
4032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4033$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034
4035rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004036EXEEXT=$ac_cv_exeext
4037ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4039/* end confdefs.h. */
4040#include <stdio.h>
4041int
4042main ()
4043{
4044FILE *f = fopen ("conftest.out", "w");
4045 return ferror (f) || fclose (f) != 0;
4046
4047 ;
4048 return 0;
4049}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004051ac_clean_files="$ac_clean_files conftest.out"
4052# Check that the compiler produces executables we can run. If not, either
4053# the compiler is broken, or we cross compile.
4054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4055$as_echo_n "checking whether we are cross compiling... " >&6; }
4056if test "$cross_compiling" != yes; then
4057 { { ac_try="$ac_link"
4058case "(($ac_try" in
4059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4060 *) ac_try_echo=$ac_try;;
4061esac
4062eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4063$as_echo "$ac_try_echo"; } >&5
4064 (eval "$ac_link") 2>&5
4065 ac_status=$?
4066 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4067 test $ac_status = 0; }
4068 if { ac_try='./conftest$ac_cv_exeext'
4069 { { case "(($ac_try" in
4070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4071 *) ac_try_echo=$ac_try;;
4072esac
4073eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4074$as_echo "$ac_try_echo"; } >&5
4075 (eval "$ac_try") 2>&5
4076 ac_status=$?
4077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4078 test $ac_status = 0; }; }; then
4079 cross_compiling=no
4080 else
4081 if test "$cross_compiling" = maybe; then
4082 cross_compiling=yes
4083 else
4084 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004086as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004087If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004088See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 fi
4090 fi
4091fi
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4093$as_echo "$cross_compiling" >&6; }
4094
4095rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4096ac_clean_files=$ac_clean_files_save
4097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4098$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004099if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 $as_echo_n "(cached) " >&6
4101else
4102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004103/* end confdefs.h. */
4104
4105int
4106main ()
4107{
4108
4109 ;
4110 return 0;
4111}
4112_ACEOF
4113rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004114if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115case "(($ac_try" in
4116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4117 *) ac_try_echo=$ac_try;;
4118esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4120$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004121 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004122 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4124 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 for ac_file in conftest.o conftest.obj conftest.*; do
4126 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4130 break;;
4131 esac
4132done
4133else
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004135sed 's/^/| /' conftest.$ac_ext >&5
4136
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004139as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004140See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004141fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004142rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4145$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004146OBJEXT=$ac_cv_objext
4147ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4149$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004150if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004152else
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
Martin v. Löwis11437992002-04-12 09:54:03 +00004156int
4157main ()
4158{
4159#ifndef __GNUC__
4160 choke me
4161#endif
4162
4163 ;
4164 return 0;
4165}
4166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004167if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004168 ac_compiler_gnu=yes
4169else
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004173ac_cv_c_compiler_gnu=$ac_compiler_gnu
4174
4175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4177$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4178if test $ac_compiler_gnu = yes; then
4179 GCC=yes
4180else
4181 GCC=
4182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004183ac_test_CFLAGS=${CFLAGS+set}
4184ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4186$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004187if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004189else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004190 ac_save_c_werror_flag=$ac_c_werror_flag
4191 ac_c_werror_flag=yes
4192 ac_cv_prog_cc_g=no
4193 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004196
Martin v. Löwis11437992002-04-12 09:54:03 +00004197int
4198main ()
4199{
4200
4201 ;
4202 return 0;
4203}
4204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004205if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004206 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207else
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 CFLAGS=""
4209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210/* end confdefs.h. */
4211
4212int
4213main ()
4214{
4215
4216 ;
4217 return 0;
4218}
4219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004220if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221
Matthias Kloseb9621712010-04-24 17:59:49 +00004222else
4223 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226/* end confdefs.h. */
4227
4228int
4229main ()
4230{
4231
4232 ;
4233 return 0;
4234}
4235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004236if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4244 ac_c_werror_flag=$ac_save_c_werror_flag
4245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4247$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004248if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004250elif test $ac_cv_prog_cc_g = yes; then
4251 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004252 CFLAGS="-g -O2"
4253 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004254 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255 fi
4256else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004257 if test "$GCC" = yes; then
4258 CFLAGS="-O2"
4259 else
4260 CFLAGS=
4261 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4264$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004265if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004266 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004267else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004269ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004271/* end confdefs.h. */
4272#include <stdarg.h>
4273#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004274struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4276struct buf { int x; };
4277FILE * (*rcsopen) (struct buf *, struct stat *, int);
4278static char *e (p, i)
4279 char **p;
4280 int i;
4281{
4282 return p[i];
4283}
4284static char *f (char * (*g) (char **, int), char **p, ...)
4285{
4286 char *s;
4287 va_list v;
4288 va_start (v,p);
4289 s = g (p, va_arg (v,int));
4290 va_end (v);
4291 return s;
4292}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004293
4294/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4295 function prototypes and stuff, but not '\xHH' hex character constants.
4296 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004298 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4299 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4302
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4304 inside strings and character constants. */
4305#define FOO(x) 'x'
4306int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4307
Skip Montanaro6dead952003-09-25 14:50:04 +00004308int test (int i, double x);
4309struct s1 {int (*f) (int a);};
4310struct s2 {int (*f) (double a);};
4311int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4312int argc;
4313char **argv;
4314int
4315main ()
4316{
4317return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4318 ;
4319 return 0;
4320}
4321_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4323 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004324do
4325 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329rm -f core conftest.err conftest.$ac_objext
4330 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004331done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004333CC=$ac_save_CC
4334
4335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336# AC_CACHE_VAL
4337case "x$ac_cv_prog_cc_c89" in
4338 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4340$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4343$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004344 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4347$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004348esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004349if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004350
Matthias Kloseb9621712010-04-24 17:59:49 +00004351fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004352
Martin v. Löwis11437992002-04-12 09:54:03 +00004353ac_ext=c
4354ac_cpp='$CPP $CPPFLAGS'
4355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4357ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004358
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004359ac_ext=c
4360ac_cpp='$CPP $CPPFLAGS'
4361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4363ac_compiler_gnu=$ac_cv_c_compiler_gnu
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4365$as_echo_n "checking how to run the C preprocessor... " >&6; }
4366# On Suns, sometimes $CPP names a directory.
4367if test -n "$CPP" && test -d "$CPP"; then
4368 CPP=
4369fi
4370if test -z "$CPP"; then
4371 if ${ac_cv_prog_CPP+:} false; then :
4372 $as_echo_n "(cached) " >&6
4373else
4374 # Double quotes because CPP needs to be expanded
4375 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4376 do
4377 ac_preproc_ok=false
4378for ac_c_preproc_warn_flag in '' yes
4379do
4380 # Use a header file that comes with gcc, so configuring glibc
4381 # with a fresh cross-compiler works.
4382 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4383 # <limits.h> exists even on freestanding compilers.
4384 # On the NeXT, cc -E runs the code through the compiler's parser,
4385 # not just through cpp. "Syntax error" is here to catch this case.
4386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4387/* end confdefs.h. */
4388#ifdef __STDC__
4389# include <limits.h>
4390#else
4391# include <assert.h>
4392#endif
4393 Syntax error
4394_ACEOF
4395if ac_fn_c_try_cpp "$LINENO"; then :
4396
4397else
4398 # Broken: fails on valid input.
4399continue
4400fi
4401rm -f conftest.err conftest.i conftest.$ac_ext
4402
4403 # OK, works on sane cases. Now check whether nonexistent headers
4404 # can be detected and how.
4405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4406/* end confdefs.h. */
4407#include <ac_nonexistent.h>
4408_ACEOF
4409if ac_fn_c_try_cpp "$LINENO"; then :
4410 # Broken: success on invalid input.
4411continue
4412else
4413 # Passes both tests.
4414ac_preproc_ok=:
4415break
4416fi
4417rm -f conftest.err conftest.i conftest.$ac_ext
4418
4419done
4420# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4421rm -f conftest.i conftest.err conftest.$ac_ext
4422if $ac_preproc_ok; then :
4423 break
4424fi
4425
4426 done
4427 ac_cv_prog_CPP=$CPP
4428
4429fi
4430 CPP=$ac_cv_prog_CPP
4431else
4432 ac_cv_prog_CPP=$CPP
4433fi
4434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4435$as_echo "$CPP" >&6; }
4436ac_preproc_ok=false
4437for ac_c_preproc_warn_flag in '' yes
4438do
4439 # Use a header file that comes with gcc, so configuring glibc
4440 # with a fresh cross-compiler works.
4441 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4442 # <limits.h> exists even on freestanding compilers.
4443 # On the NeXT, cc -E runs the code through the compiler's parser,
4444 # not just through cpp. "Syntax error" is here to catch this case.
4445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4446/* end confdefs.h. */
4447#ifdef __STDC__
4448# include <limits.h>
4449#else
4450# include <assert.h>
4451#endif
4452 Syntax error
4453_ACEOF
4454if ac_fn_c_try_cpp "$LINENO"; then :
4455
4456else
4457 # Broken: fails on valid input.
4458continue
4459fi
4460rm -f conftest.err conftest.i conftest.$ac_ext
4461
4462 # OK, works on sane cases. Now check whether nonexistent headers
4463 # can be detected and how.
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465/* end confdefs.h. */
4466#include <ac_nonexistent.h>
4467_ACEOF
4468if ac_fn_c_try_cpp "$LINENO"; then :
4469 # Broken: success on invalid input.
4470continue
4471else
4472 # Passes both tests.
4473ac_preproc_ok=:
4474break
4475fi
4476rm -f conftest.err conftest.i conftest.$ac_ext
4477
4478done
4479# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4480rm -f conftest.i conftest.err conftest.$ac_ext
4481if $ac_preproc_ok; then :
4482
4483else
4484 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4485$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4486as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4487See \`config.log' for more details" "$LINENO" 5; }
4488fi
4489
4490ac_ext=c
4491ac_cpp='$CPP $CPPFLAGS'
4492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4494ac_compiler_gnu=$ac_cv_c_compiler_gnu
4495
4496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4497$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4498if ${ac_cv_path_GREP+:} false; then :
4499 $as_echo_n "(cached) " >&6
4500else
4501 if test -z "$GREP"; then
4502 ac_path_GREP_found=false
4503 # Loop through the user's path and test for each of PROGNAME-LIST
4504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4505for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4506do
4507 IFS=$as_save_IFS
4508 test -z "$as_dir" && as_dir=.
4509 for ac_prog in grep ggrep; do
4510 for ac_exec_ext in '' $ac_executable_extensions; do
4511 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4512 as_fn_executable_p "$ac_path_GREP" || continue
4513# Check for GNU ac_path_GREP and select it if it is found.
4514 # Check for GNU $ac_path_GREP
4515case `"$ac_path_GREP" --version 2>&1` in
4516*GNU*)
4517 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4518*)
4519 ac_count=0
4520 $as_echo_n 0123456789 >"conftest.in"
4521 while :
4522 do
4523 cat "conftest.in" "conftest.in" >"conftest.tmp"
4524 mv "conftest.tmp" "conftest.in"
4525 cp "conftest.in" "conftest.nl"
4526 $as_echo 'GREP' >> "conftest.nl"
4527 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4528 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4529 as_fn_arith $ac_count + 1 && ac_count=$as_val
4530 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4531 # Best one so far, save it but keep looking for a better one
4532 ac_cv_path_GREP="$ac_path_GREP"
4533 ac_path_GREP_max=$ac_count
4534 fi
4535 # 10*(2^10) chars as input seems more than enough
4536 test $ac_count -gt 10 && break
4537 done
4538 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4539esac
4540
4541 $ac_path_GREP_found && break 3
4542 done
4543 done
4544 done
4545IFS=$as_save_IFS
4546 if test -z "$ac_cv_path_GREP"; then
4547 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4548 fi
4549else
4550 ac_cv_path_GREP=$GREP
4551fi
4552
4553fi
4554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4555$as_echo "$ac_cv_path_GREP" >&6; }
4556 GREP="$ac_cv_path_GREP"
4557
4558
Łukasz Langaa785c872016-09-09 17:37:37 -07004559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4560$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4561if ${ac_cv_path_SED+:} false; then :
4562 $as_echo_n "(cached) " >&6
4563else
4564 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4565 for ac_i in 1 2 3 4 5 6 7; do
4566 ac_script="$ac_script$as_nl$ac_script"
4567 done
4568 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4569 { ac_script=; unset ac_script;}
4570 if test -z "$SED"; then
4571 ac_path_SED_found=false
4572 # Loop through the user's path and test for each of PROGNAME-LIST
4573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4574for as_dir in $PATH
4575do
4576 IFS=$as_save_IFS
4577 test -z "$as_dir" && as_dir=.
4578 for ac_prog in sed gsed; do
4579 for ac_exec_ext in '' $ac_executable_extensions; do
4580 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4581 as_fn_executable_p "$ac_path_SED" || continue
4582# Check for GNU ac_path_SED and select it if it is found.
4583 # Check for GNU $ac_path_SED
4584case `"$ac_path_SED" --version 2>&1` in
4585*GNU*)
4586 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4587*)
4588 ac_count=0
4589 $as_echo_n 0123456789 >"conftest.in"
4590 while :
4591 do
4592 cat "conftest.in" "conftest.in" >"conftest.tmp"
4593 mv "conftest.tmp" "conftest.in"
4594 cp "conftest.in" "conftest.nl"
4595 $as_echo '' >> "conftest.nl"
4596 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4597 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4598 as_fn_arith $ac_count + 1 && ac_count=$as_val
4599 if test $ac_count -gt ${ac_path_SED_max-0}; then
4600 # Best one so far, save it but keep looking for a better one
4601 ac_cv_path_SED="$ac_path_SED"
4602 ac_path_SED_max=$ac_count
4603 fi
4604 # 10*(2^10) chars as input seems more than enough
4605 test $ac_count -gt 10 && break
4606 done
4607 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4608esac
4609
4610 $ac_path_SED_found && break 3
4611 done
4612 done
4613 done
4614IFS=$as_save_IFS
4615 if test -z "$ac_cv_path_SED"; then
4616 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4617 fi
4618else
4619 ac_cv_path_SED=$SED
4620fi
4621
4622fi
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4624$as_echo "$ac_cv_path_SED" >&6; }
4625 SED="$ac_cv_path_SED"
4626 rm -f conftest.sed
4627
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004628
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004629
4630
Matthias Kloseb9621712010-04-24 17:59:49 +00004631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4632$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004634# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004635if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004636 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004637
4638 case $withval in
4639 no) with_cxx_main=no
4640 MAINCC='$(CC)';;
4641 yes) with_cxx_main=yes
4642 MAINCC='$(CXX)';;
4643 *) with_cxx_main=yes
4644 MAINCC=$withval
4645 if test -z "$CXX"
4646 then
4647 CXX=$withval
4648 fi;;
4649 esac
4650else
4651
4652 with_cxx_main=no
4653 MAINCC='$(CC)'
4654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004655fi
4656
Matthias Kloseb9621712010-04-24 17:59:49 +00004657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4658$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
4660preset_cxx="$CXX"
4661if test -z "$CXX"
4662then
4663 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664 gcc) if test -n "$ac_tool_prefix"; then
4665 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4666set dummy ${ac_tool_prefix}g++; ac_word=$2
4667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4668$as_echo_n "checking for $ac_word... " >&6; }
4669if ${ac_cv_path_CXX+:} false; then :
4670 $as_echo_n "(cached) " >&6
4671else
4672 case $CXX in
4673 [\\/]* | ?:[\\/]*)
4674 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4675 ;;
4676 *)
4677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4678for as_dir in notfound
4679do
4680 IFS=$as_save_IFS
4681 test -z "$as_dir" && as_dir=.
4682 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004684 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4686 break 2
4687 fi
4688done
4689 done
4690IFS=$as_save_IFS
4691
4692 ;;
4693esac
4694fi
4695CXX=$ac_cv_path_CXX
4696if test -n "$CXX"; then
4697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4698$as_echo "$CXX" >&6; }
4699else
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701$as_echo "no" >&6; }
4702fi
4703
4704
4705fi
4706if test -z "$ac_cv_path_CXX"; then
4707 ac_pt_CXX=$CXX
4708 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004709set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4711$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004712if ${ac_cv_path_ac_pt_CXX+:} false; then :
4713 $as_echo_n "(cached) " >&6
4714else
4715 case $ac_pt_CXX in
4716 [\\/]* | ?:[\\/]*)
4717 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4718 ;;
4719 *)
4720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4721for as_dir in notfound
4722do
4723 IFS=$as_save_IFS
4724 test -z "$as_dir" && as_dir=.
4725 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004727 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4729 break 2
4730 fi
4731done
4732 done
4733IFS=$as_save_IFS
4734
4735 ;;
4736esac
4737fi
4738ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4739if test -n "$ac_pt_CXX"; then
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4741$as_echo "$ac_pt_CXX" >&6; }
4742else
4743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4744$as_echo "no" >&6; }
4745fi
4746
4747 if test "x$ac_pt_CXX" = x; then
4748 CXX="g++"
4749 else
4750 case $cross_compiling:$ac_tool_warned in
4751yes:)
4752{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4753$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4754ac_tool_warned=yes ;;
4755esac
4756 CXX=$ac_pt_CXX
4757 fi
4758else
4759 CXX="$ac_cv_path_CXX"
4760fi
4761 ;;
4762 cc) if test -n "$ac_tool_prefix"; then
4763 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4764set dummy ${ac_tool_prefix}c++; ac_word=$2
4765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4766$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004767if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004768 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004769else
4770 case $CXX in
4771 [\\/]* | ?:[\\/]*)
4772 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4773 ;;
4774 *)
4775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776for as_dir in notfound
4777do
4778 IFS=$as_save_IFS
4779 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004780 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004781 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784 break 2
4785 fi
4786done
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004788IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 ;;
4791esac
4792fi
4793CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004794if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4796$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004797else
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004801
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004802
4803fi
4804if test -z "$ac_cv_path_CXX"; then
4805 ac_pt_CXX=$CXX
4806 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4809$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004810if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004814 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004815 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 +00004816 ;;
4817 *)
4818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819for as_dir in notfound
4820do
4821 IFS=$as_save_IFS
4822 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004823 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004827 break 2
4828 fi
4829done
Matthias Kloseb9621712010-04-24 17:59:49 +00004830 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004831IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004832
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833 ;;
4834esac
4835fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4837if test -n "$ac_pt_CXX"; then
4838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4839$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004840else
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4842$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004844
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004845 if test "x$ac_pt_CXX" = x; then
4846 CXX="c++"
4847 else
4848 case $cross_compiling:$ac_tool_warned in
4849yes:)
4850{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4851$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4852ac_tool_warned=yes ;;
4853esac
4854 CXX=$ac_pt_CXX
4855 fi
4856else
4857 CXX="$ac_cv_path_CXX"
4858fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004859 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004860 clang|*/clang) if test -n "$ac_tool_prefix"; then
4861 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4862set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4864$as_echo_n "checking for $ac_word... " >&6; }
4865if ${ac_cv_path_CXX+:} false; then :
4866 $as_echo_n "(cached) " >&6
4867else
4868 case $CXX in
4869 [\\/]* | ?:[\\/]*)
4870 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4871 ;;
4872 *)
4873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874for as_dir in notfound
4875do
4876 IFS=$as_save_IFS
4877 test -z "$as_dir" && as_dir=.
4878 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004879 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004880 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4882 break 2
4883 fi
4884done
4885 done
4886IFS=$as_save_IFS
4887
Ned Deilycbfb9a52012-06-23 16:02:19 -07004888 ;;
4889esac
4890fi
4891CXX=$ac_cv_path_CXX
4892if test -n "$CXX"; then
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4894$as_echo "$CXX" >&6; }
4895else
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4897$as_echo "no" >&6; }
4898fi
4899
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004900
4901fi
4902if test -z "$ac_cv_path_CXX"; then
4903 ac_pt_CXX=$CXX
4904 # Extract the first word of "clang++", so it can be a program name with args.
4905set dummy clang++; ac_word=$2
4906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4907$as_echo_n "checking for $ac_word... " >&6; }
4908if ${ac_cv_path_ac_pt_CXX+:} false; then :
4909 $as_echo_n "(cached) " >&6
4910else
4911 case $ac_pt_CXX in
4912 [\\/]* | ?:[\\/]*)
4913 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4914 ;;
4915 *)
4916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4917for as_dir in notfound
4918do
4919 IFS=$as_save_IFS
4920 test -z "$as_dir" && as_dir=.
4921 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004922 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004923 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4924 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4925 break 2
4926 fi
4927done
4928 done
4929IFS=$as_save_IFS
4930
4931 ;;
4932esac
4933fi
4934ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4935if test -n "$ac_pt_CXX"; then
4936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4937$as_echo "$ac_pt_CXX" >&6; }
4938else
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4940$as_echo "no" >&6; }
4941fi
4942
4943 if test "x$ac_pt_CXX" = x; then
4944 CXX="clang++"
4945 else
4946 case $cross_compiling:$ac_tool_warned in
4947yes:)
4948{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4949$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4950ac_tool_warned=yes ;;
4951esac
4952 CXX=$ac_pt_CXX
4953 fi
4954else
4955 CXX="$ac_cv_path_CXX"
4956fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004957 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004958 icc|*/icc) if test -n "$ac_tool_prefix"; then
4959 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4960set dummy ${ac_tool_prefix}icpc; ac_word=$2
4961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962$as_echo_n "checking for $ac_word... " >&6; }
4963if ${ac_cv_path_CXX+:} false; then :
4964 $as_echo_n "(cached) " >&6
4965else
4966 case $CXX in
4967 [\\/]* | ?:[\\/]*)
4968 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4969 ;;
4970 *)
4971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972for as_dir in notfound
4973do
4974 IFS=$as_save_IFS
4975 test -z "$as_dir" && as_dir=.
4976 for ac_exec_ext in '' $ac_executable_extensions; do
4977 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4978 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4979 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4980 break 2
4981 fi
4982done
4983 done
4984IFS=$as_save_IFS
4985
4986 ;;
4987esac
4988fi
4989CXX=$ac_cv_path_CXX
4990if test -n "$CXX"; then
4991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4992$as_echo "$CXX" >&6; }
4993else
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
4996fi
4997
4998
4999fi
5000if test -z "$ac_cv_path_CXX"; then
5001 ac_pt_CXX=$CXX
5002 # Extract the first word of "icpc", so it can be a program name with args.
5003set dummy icpc; ac_word=$2
5004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005$as_echo_n "checking for $ac_word... " >&6; }
5006if ${ac_cv_path_ac_pt_CXX+:} false; then :
5007 $as_echo_n "(cached) " >&6
5008else
5009 case $ac_pt_CXX in
5010 [\\/]* | ?:[\\/]*)
5011 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5012 ;;
5013 *)
5014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5015for as_dir in notfound
5016do
5017 IFS=$as_save_IFS
5018 test -z "$as_dir" && as_dir=.
5019 for ac_exec_ext in '' $ac_executable_extensions; do
5020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5021 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5023 break 2
5024 fi
5025done
5026 done
5027IFS=$as_save_IFS
5028
5029 ;;
5030esac
5031fi
5032ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5033if test -n "$ac_pt_CXX"; then
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5035$as_echo "$ac_pt_CXX" >&6; }
5036else
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038$as_echo "no" >&6; }
5039fi
5040
5041 if test "x$ac_pt_CXX" = x; then
5042 CXX="icpc"
5043 else
5044 case $cross_compiling:$ac_tool_warned in
5045yes:)
5046{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5047$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5048ac_tool_warned=yes ;;
5049esac
5050 CXX=$ac_pt_CXX
5051 fi
5052else
5053 CXX="$ac_cv_path_CXX"
5054fi
5055 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005056 esac
5057 if test "$CXX" = "notfound"
5058 then
5059 CXX=""
5060 fi
5061fi
5062if test -z "$CXX"
5063then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005064 if test -n "$ac_tool_prefix"; then
5065 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5066 do
5067 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5068set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005071if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005073else
5074 if test -n "$CXX"; then
5075 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005086 break 2
5087 fi
5088done
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005090IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005091
5092fi
5093fi
5094CXX=$ac_cv_prog_CXX
5095if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5097$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005098else
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005101fi
5102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005103
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005104 test -n "$CXX" && break
5105 done
5106fi
5107if test -z "$CXX"; then
5108 ac_ct_CXX=$CXX
5109 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5110do
5111 # Extract the first word of "$ac_prog", so it can be a program name with args.
5112set dummy $ac_prog; ac_word=$2
5113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5114$as_echo_n "checking for $ac_word... " >&6; }
5115if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5116 $as_echo_n "(cached) " >&6
5117else
5118 if test -n "$ac_ct_CXX"; then
5119 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5120else
5121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5122for as_dir in $PATH
5123do
5124 IFS=$as_save_IFS
5125 test -z "$as_dir" && as_dir=.
5126 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005127 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005128 ac_cv_prog_ac_ct_CXX="$ac_prog"
5129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5130 break 2
5131 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005133 done
5134IFS=$as_save_IFS
5135
5136fi
5137fi
5138ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5139if test -n "$ac_ct_CXX"; then
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5141$as_echo "$ac_ct_CXX" >&6; }
5142else
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5144$as_echo "no" >&6; }
5145fi
5146
5147
5148 test -n "$ac_ct_CXX" && break
5149done
5150
5151 if test "x$ac_ct_CXX" = x; then
5152 CXX="notfound"
5153 else
5154 case $cross_compiling:$ac_tool_warned in
5155yes:)
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5157$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5158ac_tool_warned=yes ;;
5159esac
5160 CXX=$ac_ct_CXX
5161 fi
5162fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005163
5164 if test "$CXX" = "notfound"
5165 then
5166 CXX=""
5167 fi
5168fi
5169if test "$preset_cxx" != "$CXX"
5170then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005171 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005172
5173 By default, distutils will build C++ extension modules with \"$CXX\".
5174 If this is not intended, then set CXX on the configure command line.
5175 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005176$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005177
5178 By default, distutils will build C++ extension modules with \"$CXX\".
5179 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005180 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005181fi
5182
5183
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005184MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5185
5186
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5188$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5189cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005190#undef bfin
5191#undef cris
5192#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005193#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005194#undef hppa
5195#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005196#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005197#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005198#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005199#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005200#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005201#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005202 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005203#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204# if defined(__x86_64__) && defined(__LP64__)
5205 x86_64-linux-gnu
5206# elif defined(__x86_64__) && defined(__ILP32__)
5207 x86_64-linux-gnux32
5208# elif defined(__i386__)
5209 i386-linux-gnu
5210# elif defined(__aarch64__) && defined(__AARCH64EL__)
5211# if defined(__ILP32__)
5212 aarch64_ilp32-linux-gnu
5213# else
5214 aarch64-linux-gnu
5215# endif
5216# elif defined(__aarch64__) && defined(__AARCH64EB__)
5217# if defined(__ILP32__)
5218 aarch64_be_ilp32-linux-gnu
5219# else
5220 aarch64_be-linux-gnu
5221# endif
5222# elif defined(__alpha__)
5223 alpha-linux-gnu
5224# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5225# if defined(__ARMEL__)
5226 arm-linux-gnueabihf
5227# else
5228 armeb-linux-gnueabihf
5229# endif
5230# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5231# if defined(__ARMEL__)
5232 arm-linux-gnueabi
5233# else
5234 armeb-linux-gnueabi
5235# endif
5236# elif defined(__hppa__)
5237 hppa-linux-gnu
5238# elif defined(__ia64__)
5239 ia64-linux-gnu
5240# elif defined(__m68k__) && !defined(__mcoldfire__)
5241 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005242# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5243# if _MIPS_SIM == _ABIO32
5244 mipsisa32r6el-linux-gnu
5245# elif _MIPS_SIM == _ABIN32
5246 mipsisa64r6el-linux-gnuabin32
5247# elif _MIPS_SIM == _ABI64
5248 mipsisa64r6el-linux-gnuabi64
5249# else
5250# error unknown platform triplet
5251# endif
5252# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5253# if _MIPS_SIM == _ABIO32
5254 mipsisa32r6-linux-gnu
5255# elif _MIPS_SIM == _ABIN32
5256 mipsisa64r6-linux-gnuabin32
5257# elif _MIPS_SIM == _ABI64
5258 mipsisa64r6-linux-gnuabi64
5259# else
5260# error unknown platform triplet
5261# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005262# elif defined(__mips_hard_float) && defined(_MIPSEL)
5263# if _MIPS_SIM == _ABIO32
5264 mipsel-linux-gnu
5265# elif _MIPS_SIM == _ABIN32
5266 mips64el-linux-gnuabin32
5267# elif _MIPS_SIM == _ABI64
5268 mips64el-linux-gnuabi64
5269# else
5270# error unknown platform triplet
5271# endif
5272# elif defined(__mips_hard_float)
5273# if _MIPS_SIM == _ABIO32
5274 mips-linux-gnu
5275# elif _MIPS_SIM == _ABIN32
5276 mips64-linux-gnuabin32
5277# elif _MIPS_SIM == _ABI64
5278 mips64-linux-gnuabi64
5279# else
5280# error unknown platform triplet
5281# endif
5282# elif defined(__or1k__)
5283 or1k-linux-gnu
5284# elif defined(__powerpc__) && defined(__SPE__)
5285 powerpc-linux-gnuspe
5286# elif defined(__powerpc64__)
5287# if defined(__LITTLE_ENDIAN__)
5288 powerpc64le-linux-gnu
5289# else
5290 powerpc64-linux-gnu
5291# endif
5292# elif defined(__powerpc__)
5293 powerpc-linux-gnu
5294# elif defined(__s390x__)
5295 s390x-linux-gnu
5296# elif defined(__s390__)
5297 s390-linux-gnu
5298# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5299 sh4-linux-gnu
5300# elif defined(__sparc__) && defined(__arch64__)
5301 sparc64-linux-gnu
5302# elif defined(__sparc__)
5303 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005304# elif defined(__riscv)
5305# if __riscv_xlen == 32
5306 riscv32-linux-gnu
5307# elif __riscv_xlen == 64
5308 riscv64-linux-gnu
5309# else
5310# error unknown platform triplet
5311# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005312# else
5313# error unknown platform triplet
5314# endif
5315#elif defined(__FreeBSD_kernel__)
5316# if defined(__LP64__)
5317 x86_64-kfreebsd-gnu
5318# elif defined(__i386__)
5319 i386-kfreebsd-gnu
5320# else
5321# error unknown platform triplet
5322# endif
5323#elif defined(__gnu_hurd__)
5324 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005325#elif defined(__APPLE__)
5326 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005327#elif defined(__VXWORKS__)
5328 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005329#else
5330# error unknown platform triplet
5331#endif
5332
5333EOF
5334
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005335if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005336 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5338$as_echo "$PLATFORM_TRIPLET" >&6; }
5339else
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5341$as_echo "none" >&6; }
5342fi
5343rm -f conftest.c conftest.out
5344
5345if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5346 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5347 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5348 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005349elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5350 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005351fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005352
doko@ubuntu.com55532312016-06-14 08:55:19 +02005353if test x$MULTIARCH != x; then
5354 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5355fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005356
5357
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5359$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5360save_LDFLAGS="$LDFLAGS"
5361LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005362
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5364/* end confdefs.h. */
5365
5366int
5367main ()
5368{
5369
5370 ;
5371 return 0;
5372}
5373_ACEOF
5374if ac_fn_c_try_link "$LINENO"; then :
5375 NO_AS_NEEDED="-Wl,--no-as-needed"
5376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5377$as_echo "yes" >&6; }
5378else
5379 NO_AS_NEEDED=""
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5381$as_echo "no" >&6; }
5382fi
5383rm -f core conftest.err conftest.$ac_objext \
5384 conftest$ac_exeext conftest.$ac_ext
5385LDFLAGS="$save_LDFLAGS"
5386
5387
5388
5389# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390
Matthias Kloseb9621712010-04-24 17:59:49 +00005391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5392$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005393if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395else
5396 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5397 then ac_cv_path_EGREP="$GREP -E"
5398 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 # Loop through the user's path and test for each of PROGNAME-LIST
5402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5404do
5405 IFS=$as_save_IFS
5406 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 for ac_prog in egrep; do
5408 for ac_exec_ext in '' $ac_executable_extensions; do
5409 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005410 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005411# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 # Check for GNU $ac_path_EGREP
5413case `"$ac_path_EGREP" --version 2>&1` in
5414*GNU*)
5415 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5416*)
5417 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419 while :
5420 do
5421 cat "conftest.in" "conftest.in" >"conftest.tmp"
5422 mv "conftest.tmp" "conftest.in"
5423 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5426 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5429 # Best one so far, save it but keep looking for a better one
5430 ac_cv_path_EGREP="$ac_path_EGREP"
5431 ac_path_EGREP_max=$ac_count
5432 fi
5433 # 10*(2^10) chars as input seems more than enough
5434 test $ac_count -gt 10 && break
5435 done
5436 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5437esac
5438
Matthias Kloseb9621712010-04-24 17:59:49 +00005439 $ac_path_EGREP_found && break 3
5440 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005444 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005445 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 +00005446 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447else
5448 ac_cv_path_EGREP=$EGREP
5449fi
5450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451 fi
5452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5454$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005456
5457
Matthias Kloseb9621712010-04-24 17:59:49 +00005458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5459$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005460if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005461 $as_echo_n "(cached) " >&6
5462else
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005464/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005465#include <stdlib.h>
5466#include <stdarg.h>
5467#include <string.h>
5468#include <float.h>
5469
5470int
5471main ()
5472{
5473
5474 ;
5475 return 0;
5476}
5477_ACEOF
5478if ac_fn_c_try_compile "$LINENO"; then :
5479 ac_cv_header_stdc=yes
5480else
5481 ac_cv_header_stdc=no
5482fi
5483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5484
5485if test $ac_cv_header_stdc = yes; then
5486 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5488/* end confdefs.h. */
5489#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005490
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005491_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005493 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005495else
Matthias Kloseb9621712010-04-24 17:59:49 +00005496 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005497fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005498rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499
Matthias Kloseb9621712010-04-24 17:59:49 +00005500fi
5501
5502if test $ac_cv_header_stdc = yes; then
5503 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5505/* end confdefs.h. */
5506#include <stdlib.h>
5507
5508_ACEOF
5509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5510 $EGREP "free" >/dev/null 2>&1; then :
5511
5512else
5513 ac_cv_header_stdc=no
5514fi
5515rm -f conftest*
5516
5517fi
5518
5519if test $ac_cv_header_stdc = yes; then
5520 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5521 if test "$cross_compiling" = yes; then :
5522 :
5523else
5524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5525/* end confdefs.h. */
5526#include <ctype.h>
5527#include <stdlib.h>
5528#if ((' ' & 0x0FF) == 0x020)
5529# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5530# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5531#else
5532# define ISLOWER(c) \
5533 (('a' <= (c) && (c) <= 'i') \
5534 || ('j' <= (c) && (c) <= 'r') \
5535 || ('s' <= (c) && (c) <= 'z'))
5536# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5537#endif
5538
5539#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5540int
5541main ()
5542{
5543 int i;
5544 for (i = 0; i < 256; i++)
5545 if (XOR (islower (i), ISLOWER (i))
5546 || toupper (i) != TOUPPER (i))
5547 return 2;
5548 return 0;
5549}
5550_ACEOF
5551if ac_fn_c_try_run "$LINENO"; then :
5552
5553else
5554 ac_cv_header_stdc=no
5555fi
5556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5557 conftest.$ac_objext conftest.beam conftest.$ac_ext
5558fi
5559
5560fi
5561fi
5562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5563$as_echo "$ac_cv_header_stdc" >&6; }
5564if test $ac_cv_header_stdc = yes; then
5565
5566$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5567
5568fi
5569
5570# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5571for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5572 inttypes.h stdint.h unistd.h
5573do :
5574 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5575ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5576"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005577if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005578 cat >>confdefs.h <<_ACEOF
5579#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5580_ACEOF
5581
5582fi
5583
5584done
5585
5586
5587
5588 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 +02005589if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005590 MINIX=yes
5591else
5592 MINIX=
5593fi
5594
5595
5596 if test "$MINIX" = yes; then
5597
5598$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5599
5600
5601$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5602
5603
5604$as_echo "#define _MINIX 1" >>confdefs.h
5605
5606 fi
5607
5608
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5610$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005611if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005612 $as_echo_n "(cached) " >&6
5613else
5614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5615/* end confdefs.h. */
5616
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005617# define __EXTENSIONS__ 1
5618 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005619int
5620main ()
5621{
5622
5623 ;
5624 return 0;
5625}
5626_ACEOF
5627if ac_fn_c_try_compile "$LINENO"; then :
5628 ac_cv_safe_to_define___extensions__=yes
5629else
5630 ac_cv_safe_to_define___extensions__=no
5631fi
5632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5633fi
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5635$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5636 test $ac_cv_safe_to_define___extensions__ = yes &&
5637 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5638
5639 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5640
5641 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5642
5643 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5644
5645 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5646
5647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648
Xavier de Gaye95750b12016-07-09 11:05:42 +02005649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5650$as_echo_n "checking for the Android API level... " >&6; }
5651cat >> conftest.c <<EOF
5652#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005653android_api = __ANDROID_API__
5654arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005655#else
5656#error not Android
5657#endif
5658EOF
5659
5660if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005661 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5662 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5664$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005665 if test -z "$ANDROID_API_LEVEL"; then
5666 echo 'Fatal: you must define __ANDROID_API__'
5667 exit 1
5668 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005669
5670cat >>confdefs.h <<_ACEOF
5671#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5672_ACEOF
5673
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005674
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5676$as_echo_n "checking for the Android arm ABI... " >&6; }
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5678$as_echo "$_arm_arch" >&6; }
5679 if test "$_arm_arch" = 7; then
5680 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5681 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5682 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005683else
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5685$as_echo "not Android" >&6; }
5686fi
5687rm -f conftest.c conftest.out
5688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689# Check for unsupported systems
5690case $ac_sys_system/$ac_sys_release in
5691atheos*|Linux*/1*)
5692 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5693 echo See README for details.
5694 exit 1;;
5695esac
5696
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5699$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
5701# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005702if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 withval=$with_suffix;
5704 case $withval in
5705 no) EXEEXT=;;
5706 yes) EXEEXT=.exe;;
5707 *) EXEEXT=$withval;;
5708 esac
5709fi
5710
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5712$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
5714# Test whether we're running on a non-case-sensitive system, in which
5715# case we give a warning if no ext is given
5716
Matthias Kloseb9621712010-04-24 17:59:49 +00005717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5718$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719if test ! -d CaseSensitiveTestDir; then
5720mkdir CaseSensitiveTestDir
5721fi
5722
5723if test -d casesensitivetestdir
5724then
Matthias Kloseb9621712010-04-24 17:59:49 +00005725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5726$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727 BUILDEXEEXT=.exe
5728else
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5730$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731 BUILDEXEEXT=$EXEEXT
5732fi
5733rmdir CaseSensitiveTestDir
5734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735case $ac_sys_system in
5736hp*|HP*)
5737 case $CC in
5738 cc|*/cc) CC="$CC -Ae";;
5739 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740esac
5741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742
Matthias Kloseb9621712010-04-24 17:59:49 +00005743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5744$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745if test -z "$LIBRARY"
5746then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005747 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5750$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751
5752# LDLIBRARY is the name of the library to link against (as opposed to the
5753# name of the library into which to insert object files). BLDLIBRARY is also
5754# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5755# is blank as the main program is not linked directly against LDLIBRARY.
5756# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5757# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5758# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5759# DLLLIBRARY is the shared (i.e., DLL) library.
5760#
5761# RUNSHARED is used to run shared python without installed libraries
5762#
5763# INSTSONAME is the name of the shared library that will be use to install
5764# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005765#
5766# LDVERSION is the shared library version number, normally the Python version
5767# with the ABI build flags appended.
5768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770
5771
5772
5773
5774
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776LDLIBRARY="$LIBRARY"
5777BLDLIBRARY='$(LDLIBRARY)'
5778INSTSONAME='$(LDLIBRARY)'
5779DLLLIBRARY=''
5780LDLIBRARYDIR=''
5781RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005782LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784# LINKCC is the command that links the python executable -- default is $(CC).
5785# If CXX is set, and if it is needed to link a main function that was
5786# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5787# python might then depend on the C++ runtime
5788# This is altered for AIX in order to build the export list before
5789# linking.
5790
Matthias Kloseb9621712010-04-24 17:59:49 +00005791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5792$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793if test -z "$LINKCC"
5794then
5795 LINKCC='$(PURIFY) $(MAINCC)'
5796 case $ac_sys_system in
5797 AIX*)
5798 exp_extra="\"\""
5799 if test $ac_sys_release -ge 5 -o \
5800 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5801 exp_extra="."
5802 fi
5803 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804 QNX*)
5805 # qcc must be used because the other compilers do not
5806 # support -N.
5807 LINKCC=qcc;;
5808 esac
5809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5811$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812
5813# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5814# make sure we default having it set to "no": this is used by
5815# distutils.unixccompiler to know if it should add --enable-new-dtags
5816# to linker command lines, and failing to detect GNU ld simply results
5817# in the same bahaviour as before.
5818
Matthias Kloseb9621712010-04-24 17:59:49 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5820$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821ac_prog=ld
5822if test "$GCC" = yes; then
5823 ac_prog=`$CC -print-prog-name=ld`
5824fi
5825case `"$ac_prog" -V 2>&1 < /dev/null` in
5826 *GNU*)
5827 GNULD=yes;;
5828 *)
5829 GNULD=no;;
5830esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5832$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833
Matthias Kloseb9621712010-04-24 17:59:49 +00005834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5835$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005837if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838 enableval=$enable_shared;
5839fi
5840
5841
5842if test -z "$enable_shared"
5843then
5844 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005845 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846 enable_shared="yes";;
5847 *)
5848 enable_shared="no";;
5849 esac
5850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5852$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853
Matthias Kloseb9621712010-04-24 17:59:49 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5855$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005857if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005858 enableval=$enable_profiling;
5859fi
5860
5861if test "x$enable_profiling" = xyes; then
5862 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005863 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865/* end confdefs.h. */
5866int main() { return 0; }
5867_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868if ac_fn_c_try_link "$LINENO"; then :
5869
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005873rm -f core conftest.err conftest.$ac_objext \
5874 conftest$ac_exeext conftest.$ac_ext
5875 CC="$ac_save_cc"
5876else
5877 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5880$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881
doko@ubuntu.comba015832012-06-30 16:52:05 +02005882if test "x$enable_profiling" = xyes; then
5883 BASECFLAGS="-pg $BASECFLAGS"
5884 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885fi
5886
Matthias Kloseb9621712010-04-24 17:59:49 +00005887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5888$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889
5890# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5891# library that we build, but we do not want to link against it (we
5892# will find it with a -framework option). For this reason there is an
5893# extra variable BLDLIBRARY against which Python and the extension
5894# modules are linked, BLDLIBRARY. This is normally the same as
5895# LDLIBRARY, but empty for MacOSX framework builds.
5896if test "$enable_framework"
5897then
5898 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005899 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 BLDLIBRARY=''
5901else
5902 BLDLIBRARY='$(LDLIBRARY)'
5903fi
5904
5905# Other platforms follow
5906if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005907 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
Matthias Kloseb9621712010-04-24 17:59:49 +00005909$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910
5911 case $ac_sys_system in
5912 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).dll.a'
5914 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
5916 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).so'
5918 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005919 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005921 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005922 then
5923 PY3LIBRARY=libpython3.so
5924 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005926 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).so'
5928 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005929 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005931 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005932 then
5933 PY3LIBRARY=libpython3.so
5934 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
5936 hp*|HP*)
5937 case `uname -m` in
5938 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ;;
5944 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005945 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005946 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 LDLIBRARY='libpython$(LDVERSION).dylib'
5950 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005951 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005953 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005954 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005955 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005956 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957
5958 esac
5959else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005960 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 case $ac_sys_system in
5962 CYGWIN*)
5963 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005964 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ;;
5966 esac
5967fi
5968
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005969if test "$cross_compiling" = yes; then
5970 RUNSHARED=
5971fi
5972
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5974$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005977if test -n "$ac_tool_prefix"; then
5978 for ac_prog in ar aal
5979 do
5980 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5981set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005984if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986else
5987 if test -n "$AR"; then
5988 ac_cv_prog_AR="$AR" # Let the user override the test.
5989else
5990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993 IFS=$as_save_IFS
5994 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005997 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999 break 2
6000 fi
6001done
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003IFS=$as_save_IFS
6004
6005fi
6006fi
6007AR=$ac_cv_prog_AR
6008if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6010$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011else
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6013$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014fi
6015
6016
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006017 test -n "$AR" && break
6018 done
6019fi
6020if test -z "$AR"; then
6021 ac_ct_AR=$AR
6022 for ac_prog in ar aal
6023do
6024 # Extract the first word of "$ac_prog", so it can be a program name with args.
6025set dummy $ac_prog; ac_word=$2
6026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6027$as_echo_n "checking for $ac_word... " >&6; }
6028if ${ac_cv_prog_ac_ct_AR+:} false; then :
6029 $as_echo_n "(cached) " >&6
6030else
6031 if test -n "$ac_ct_AR"; then
6032 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6033else
6034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035for as_dir in $PATH
6036do
6037 IFS=$as_save_IFS
6038 test -z "$as_dir" && as_dir=.
6039 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006041 ac_cv_prog_ac_ct_AR="$ac_prog"
6042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6043 break 2
6044 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006046 done
6047IFS=$as_save_IFS
6048
6049fi
6050fi
6051ac_ct_AR=$ac_cv_prog_ac_ct_AR
6052if test -n "$ac_ct_AR"; then
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6054$as_echo "$ac_ct_AR" >&6; }
6055else
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6057$as_echo "no" >&6; }
6058fi
6059
6060
6061 test -n "$ac_ct_AR" && break
6062done
6063
6064 if test "x$ac_ct_AR" = x; then
6065 AR="ar"
6066 else
6067 case $cross_compiling:$ac_tool_warned in
6068yes:)
6069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6071ac_tool_warned=yes ;;
6072esac
6073 AR=$ac_ct_AR
6074 fi
6075fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076
6077
6078# tweak ARFLAGS only if the user didn't set it on the command line
6079
6080if test -z "$ARFLAGS"
6081then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006082 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083fi
6084
doko@ubuntu.com58844492012-06-30 18:25:32 +02006085if test -n "$ac_tool_prefix"; then
6086 for ac_prog in readelf
6087 do
6088 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6089set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6091$as_echo_n "checking for $ac_word... " >&6; }
6092if ${ac_cv_prog_READELF+:} false; then :
6093 $as_echo_n "(cached) " >&6
6094else
6095 if test -n "$READELF"; then
6096 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6097else
6098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6099for as_dir in $PATH
6100do
6101 IFS=$as_save_IFS
6102 test -z "$as_dir" && as_dir=.
6103 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006105 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6107 break 2
6108 fi
6109done
6110 done
6111IFS=$as_save_IFS
6112
6113fi
6114fi
6115READELF=$ac_cv_prog_READELF
6116if test -n "$READELF"; then
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6118$as_echo "$READELF" >&6; }
6119else
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6121$as_echo "no" >&6; }
6122fi
6123
6124
6125 test -n "$READELF" && break
6126 done
6127fi
6128if test -z "$READELF"; then
6129 ac_ct_READELF=$READELF
6130 for ac_prog in readelf
6131do
6132 # Extract the first word of "$ac_prog", so it can be a program name with args.
6133set dummy $ac_prog; ac_word=$2
6134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6135$as_echo_n "checking for $ac_word... " >&6; }
6136if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6137 $as_echo_n "(cached) " >&6
6138else
6139 if test -n "$ac_ct_READELF"; then
6140 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6141else
6142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6143for as_dir in $PATH
6144do
6145 IFS=$as_save_IFS
6146 test -z "$as_dir" && as_dir=.
6147 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006148 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006149 ac_cv_prog_ac_ct_READELF="$ac_prog"
6150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6151 break 2
6152 fi
6153done
6154 done
6155IFS=$as_save_IFS
6156
6157fi
6158fi
6159ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6160if test -n "$ac_ct_READELF"; then
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6162$as_echo "$ac_ct_READELF" >&6; }
6163else
6164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6165$as_echo "no" >&6; }
6166fi
6167
6168
6169 test -n "$ac_ct_READELF" && break
6170done
6171
6172 if test "x$ac_ct_READELF" = x; then
6173 READELF=":"
6174 else
6175 case $cross_compiling:$ac_tool_warned in
6176yes:)
6177{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6178$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6179ac_tool_warned=yes ;;
6180esac
6181 READELF=$ac_ct_READELF
6182 fi
6183fi
6184
6185if test "$cross_compiling" = yes; then
6186 case "$READELF" in
6187 readelf|:)
6188 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6189 ;;
6190 esac
6191fi
6192
6193
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006196hp*|HP*)
6197 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198 if test -z "$INSTALL"
6199 then
6200 INSTALL="${srcdir}/install-sh -c"
6201 fi
6202esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203# Find a good install program. We prefer a C program (faster),
6204# so one script is as good as another. But avoid the broken or
6205# incompatible versions:
6206# SysV /etc/install, /usr/sbin/install
6207# SunOS /usr/etc/install
6208# IRIX /sbin/install
6209# AIX /bin/install
6210# AmigaOS /C/install, which installs bootblocks on floppy discs
6211# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6212# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6213# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6214# OS/2's system install, which has a completely different semantic
6215# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006216# Reject install programs that cannot install multiple files.
6217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6218$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006220if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006221 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222else
6223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6224for as_dir in $PATH
6225do
6226 IFS=$as_save_IFS
6227 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006228 # Account for people who put trailing slashes in PATH elements.
6229case $as_dir/ in #((
6230 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006232 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233 /usr/ucb/* ) ;;
6234 *)
6235 # OSF1 and SCO ODT 3.0 have their own names for install.
6236 # Don't use installbsd from OSF since it installs stuff as root
6237 # by default.
6238 for ac_prog in ginstall scoinst install; do
6239 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006240 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241 if test $ac_prog = install &&
6242 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6243 # AIX install. It has an incompatible calling convention.
6244 :
6245 elif test $ac_prog = install &&
6246 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6247 # program-specific install script used by HP pwplus--don't use.
6248 :
6249 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006250 rm -rf conftest.one conftest.two conftest.dir
6251 echo one > conftest.one
6252 echo two > conftest.two
6253 mkdir conftest.dir
6254 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6255 test -s conftest.one && test -s conftest.two &&
6256 test -s conftest.dir/conftest.one &&
6257 test -s conftest.dir/conftest.two
6258 then
6259 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6260 break 3
6261 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262 fi
6263 fi
6264 done
6265 done
6266 ;;
6267esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006268
6269 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270IFS=$as_save_IFS
6271
Matthias Kloseb9621712010-04-24 17:59:49 +00006272rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273
6274fi
6275 if test "${ac_cv_path_install+set}" = set; then
6276 INSTALL=$ac_cv_path_install
6277 else
6278 # As a last resort, use the slow shell script. Don't cache a
6279 # value for INSTALL within a source directory, because that will
6280 # break other packages using the cache if that directory is
6281 # removed, or if the value is a relative name.
6282 INSTALL=$ac_install_sh
6283 fi
6284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6286$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287
6288# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6289# It thinks the first close brace ends the variable substitution.
6290test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6291
6292test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6293
6294test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6295
Matthias Klose93a0ef12012-03-15 18:08:34 +01006296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6297$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6298if test -z "$MKDIR_P"; then
6299 if ${ac_cv_path_mkdir+:} false; then :
6300 $as_echo_n "(cached) " >&6
6301else
6302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6303for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6304do
6305 IFS=$as_save_IFS
6306 test -z "$as_dir" && as_dir=.
6307 for ac_prog in mkdir gmkdir; do
6308 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006309 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006310 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6311 'mkdir (GNU coreutils) '* | \
6312 'mkdir (coreutils) '* | \
6313 'mkdir (fileutils) '4.1*)
6314 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6315 break 3;;
6316 esac
6317 done
6318 done
6319 done
6320IFS=$as_save_IFS
6321
6322fi
6323
6324 test -d ./--version && rmdir ./--version
6325 if test "${ac_cv_path_mkdir+set}" = set; then
6326 MKDIR_P="$ac_cv_path_mkdir -p"
6327 else
6328 # As a last resort, use the slow shell script. Don't cache a
6329 # value for MKDIR_P within a source directory, because that will
6330 # break other packages using the cache if that directory is
6331 # removed, or if the value is a relative name.
6332 MKDIR_P="$ac_install_sh -d"
6333 fi
6334fi
6335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6336$as_echo "$MKDIR_P" >&6; }
6337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338
6339# Not every filesystem supports hard links
6340
6341if test -z "$LN" ; then
6342 case $ac_sys_system in
6343 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344 *) LN=ln;;
6345 esac
6346fi
6347
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006348# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006349
6350ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006351
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6354$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006355
6356# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006357if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006358 withval=$with_pydebug;
6359if test "$withval" != no
6360then
6361
Matthias Kloseb9621712010-04-24 17:59:49 +00006362$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363
Matthias Kloseb9621712010-04-24 17:59:49 +00006364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6365$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006366 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006367 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006368else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006370fi
6371else
Matthias Kloseb9621712010-04-24 17:59:49 +00006372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6373$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374fi
6375
6376
Victor Stinnerf4e47032019-04-25 00:56:28 +02006377# Check for --with-trace-refs
6378# --with-trace-refs
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6380$as_echo_n "checking for --with-trace-refs... " >&6; }
6381
6382# Check whether --with-trace-refs was given.
6383if test "${with_trace_refs+set}" = set; then :
6384 withval=$with_trace_refs;
6385else
6386 with_trace_refs=no
6387fi
6388
6389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6390$as_echo "$with_trace_refs" >&6; }
6391
6392if test "$with_trace_refs" = "yes"
6393then
6394
6395$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6396
6397fi
6398
6399# Check for --with-assertions.
6400# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006401assertions='false'
6402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6403$as_echo_n "checking for --with-assertions... " >&6; }
6404
6405# Check whether --with-assertions was given.
6406if test "${with_assertions+set}" = set; then :
6407 withval=$with_assertions;
6408if test "$withval" != no
6409then
6410 assertions='true'
6411fi
6412fi
6413
6414if test "$assertions" = 'true'; then
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6416$as_echo "yes" >&6; }
6417elif test "$Py_DEBUG" = 'true'; then
6418 assertions='true'
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6420$as_echo "implied by --with-pydebug" >&6; }
6421else
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
Brett Cannon63d98bc2016-09-06 17:12:40 -07006426# Enable optimization flags
6427
6428
6429Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6431$as_echo_n "checking for --enable-optimizations... " >&6; }
6432# Check whether --enable-optimizations was given.
6433if test "${enable_optimizations+set}" = set; then :
6434 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006435if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006436then
6437 Py_OPT='true'
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6439$as_echo "yes" >&6; };
6440else
6441 Py_OPT='false'
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6443$as_echo "no" >&6; };
6444fi
6445else
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6447$as_echo "no" >&6; }
6448fi
6449
6450if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006451 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6452 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006453 # 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 +00006454 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006455 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006456 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006457 DEF_MAKE_RULE="build_all"
6458else
6459 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006460 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006461 DEF_MAKE_RULE="all"
6462fi
6463
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006464
6465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6466$as_echo_n "checking PROFILE_TASK... " >&6; }
6467if test -z "$PROFILE_TASK"
6468then
6469 PROFILE_TASK='-m test --pgo'
6470fi
6471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6472$as_echo "$PROFILE_TASK" >&6; }
6473
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006474# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6475# normal names in the default $PATH (ie: Ubuntu). They exist under the
6476# non-suffixed name in their versioned llvm directory.
6477
6478llvm_bin_dir=''
6479llvm_path="${PATH}"
6480if test "${CC}" = "clang"
6481then
6482 clang_bin=`which clang`
6483 # Some systems install clang elsewhere as a symlink to the real path
6484 # which is where the related llvm tools are located.
6485 if test -L "${clang_bin}"
6486 then
6487 clang_dir=`dirname "${clang_bin}"`
6488 clang_bin=`readlink "${clang_bin}"`
6489 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6490 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6491 fi
6492fi
6493
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006494# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6496$as_echo_n "checking for --with-lto... " >&6; }
6497
6498# Check whether --with-lto was given.
6499if test "${with_lto+set}" = set; then :
6500 withval=$with_lto;
6501if test "$withval" != no
6502then
6503 Py_LTO='true'
6504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6505$as_echo "yes" >&6; };
6506else
6507 Py_LTO='false'
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509$as_echo "no" >&6; };
6510fi
6511else
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6513$as_echo "no" >&6; }
6514fi
6515
6516if test "$Py_LTO" = 'true' ; then
6517 case $CC in
6518 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006519
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006520 if test -n "$ac_tool_prefix"; then
6521 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6522set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524$as_echo_n "checking for $ac_word... " >&6; }
6525if ${ac_cv_path_LLVM_AR+:} false; then :
6526 $as_echo_n "(cached) " >&6
6527else
6528 case $LLVM_AR in
6529 [\\/]* | ?:[\\/]*)
6530 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6531 ;;
6532 *)
6533 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6534for as_dir in ${llvm_path}
6535do
6536 IFS=$as_save_IFS
6537 test -z "$as_dir" && as_dir=.
6538 for ac_exec_ext in '' $ac_executable_extensions; do
6539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6540 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6542 break 2
6543 fi
6544done
6545 done
6546IFS=$as_save_IFS
6547
6548 ;;
6549esac
6550fi
6551LLVM_AR=$ac_cv_path_LLVM_AR
6552if test -n "$LLVM_AR"; then
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6554$as_echo "$LLVM_AR" >&6; }
6555else
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6557$as_echo "no" >&6; }
6558fi
6559
6560
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006561fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006562if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006563 ac_pt_LLVM_AR=$LLVM_AR
6564 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006565set dummy llvm-ar; ac_word=$2
6566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6567$as_echo_n "checking for $ac_word... " >&6; }
6568if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6569 $as_echo_n "(cached) " >&6
6570else
6571 case $ac_pt_LLVM_AR in
6572 [\\/]* | ?:[\\/]*)
6573 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6574 ;;
6575 *)
6576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6577for as_dir in ${llvm_path}
6578do
6579 IFS=$as_save_IFS
6580 test -z "$as_dir" && as_dir=.
6581 for ac_exec_ext in '' $ac_executable_extensions; do
6582 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6583 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6585 break 2
6586 fi
6587done
6588 done
6589IFS=$as_save_IFS
6590
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006591 ;;
6592esac
6593fi
6594ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6595if test -n "$ac_pt_LLVM_AR"; then
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6597$as_echo "$ac_pt_LLVM_AR" >&6; }
6598else
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600$as_echo "no" >&6; }
6601fi
6602
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006603 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006604 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006605 else
6606 case $cross_compiling:$ac_tool_warned in
6607yes:)
6608{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6609$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6610ac_tool_warned=yes ;;
6611esac
6612 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006613 fi
6614else
6615 LLVM_AR="$ac_cv_path_LLVM_AR"
6616fi
6617
6618
6619 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6620 then
6621 LLVM_AR_FOUND="found"
6622 else
6623 LLVM_AR_FOUND="not-found"
6624 fi
6625 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6626 then
6627 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6628 if test -n "${found_llvm_ar}"
6629 then
6630 LLVM_AR='/usr/bin/xcrun llvm-ar'
6631 LLVM_AR_FOUND=found
6632 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6633$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6634 fi
6635 fi
6636 if test $LLVM_AR_FOUND = not-found
6637 then
6638 LLVM_PROFR_ERR=yes
6639 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6640 else
6641 LLVM_AR_ERR=no
6642 fi
6643 AR="${LLVM_AR}"
6644 case $ac_sys_system in
6645 Darwin*)
6646 # Any changes made here should be reflected in the GCC+Darwin case below
6647 LTOFLAGS="-flto -Wl,-export_dynamic"
6648 ;;
6649 *)
6650 LTOFLAGS="-flto"
6651 ;;
6652 esac
6653 ;;
6654 *gcc*)
6655 case $ac_sys_system in
6656 Darwin*)
6657 LTOFLAGS="-flto -Wl,-export_dynamic"
6658 ;;
6659 *)
6660 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6661 ;;
6662 esac
6663 ;;
6664 esac
6665
6666 if test "$ac_cv_prog_cc_g" = "yes"
6667 then
6668 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6669 # to get debug symbols.
6670 LTOFLAGS="$LTOFLAGS -g"
6671 fi
6672
stratakisf92c7aa2018-12-04 15:54:01 +01006673 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006674 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006675fi
6676
6677# Enable PGO flags.
6678
6679
6680
6681
6682
6683
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006684if test -n "$ac_tool_prefix"; then
6685 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6686set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6688$as_echo_n "checking for $ac_word... " >&6; }
6689if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6690 $as_echo_n "(cached) " >&6
6691else
6692 case $LLVM_PROFDATA in
6693 [\\/]* | ?:[\\/]*)
6694 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6695 ;;
6696 *)
6697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006699do
6700 IFS=$as_save_IFS
6701 test -z "$as_dir" && as_dir=.
6702 for ac_exec_ext in '' $ac_executable_extensions; do
6703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006704 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6706 break 2
6707 fi
6708done
6709 done
6710IFS=$as_save_IFS
6711
Gregory P. Smith799520c2016-09-07 16:10:00 -07006712 ;;
6713esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006714fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006715LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6716if test -n "$LLVM_PROFDATA"; then
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6718$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006719else
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006725fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006726if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006727 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6728 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006729set dummy llvm-profdata; ac_word=$2
6730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6731$as_echo_n "checking for $ac_word... " >&6; }
6732if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6733 $as_echo_n "(cached) " >&6
6734else
6735 case $ac_pt_LLVM_PROFDATA in
6736 [\\/]* | ?:[\\/]*)
6737 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6738 ;;
6739 *)
6740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6741for as_dir in ${llvm_path}
6742do
6743 IFS=$as_save_IFS
6744 test -z "$as_dir" && as_dir=.
6745 for ac_exec_ext in '' $ac_executable_extensions; do
6746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6747 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6749 break 2
6750 fi
6751done
6752 done
6753IFS=$as_save_IFS
6754
Gregory P. Smith799520c2016-09-07 16:10:00 -07006755 ;;
6756esac
6757fi
6758ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6759if test -n "$ac_pt_LLVM_PROFDATA"; then
6760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6761$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6762else
6763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6764$as_echo "no" >&6; }
6765fi
6766
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006767 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006768 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006769 else
6770 case $cross_compiling:$ac_tool_warned in
6771yes:)
6772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6774ac_tool_warned=yes ;;
6775esac
6776 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006777 fi
6778else
6779 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6780fi
6781
6782
6783if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6784then
6785 LLVM_PROF_FOUND="found"
6786else
6787 LLVM_PROF_FOUND="not-found"
6788fi
6789if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6790then
6791 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6792 if test -n "${found_llvm_profdata}"
6793 then
6794 # llvm-profdata isn't directly in $PATH in some cases.
6795 # https://apple.stackexchange.com/questions/197053/
6796 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6797 LLVM_PROF_FOUND=found
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6799$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6800 fi
6801fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006802LLVM_PROF_ERR=no
6803case $CC in
6804 *clang*)
6805 # Any changes made here should be reflected in the GCC+Darwin case below
6806 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6807 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006808 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006809 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6810 if test $LLVM_PROF_FOUND = not-found
6811 then
6812 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006813 if test "${REQUIRE_PGO}" = "yes"
6814 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006815 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 -07006816 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006817 fi
6818 ;;
6819 *gcc*)
6820 case $ac_sys_system in
6821 Darwin*)
6822 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6823 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006824 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006826 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006827 then
6828 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006829 if test "${REQUIRE_PGO}" = "yes"
6830 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006831 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 -07006832 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006833 fi
6834 ;;
6835 *)
6836 PGO_PROF_GEN_FLAG="-fprofile-generate"
6837 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6838 LLVM_PROF_MERGER="true"
6839 LLVM_PROF_FILE=""
6840 ;;
6841 esac
6842 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006843 *icc*)
6844 PGO_PROF_GEN_FLAG="-prof-gen"
6845 PGO_PROF_USE_FLAG="-prof-use"
6846 LLVM_PROF_MERGER="true"
6847 LLVM_PROF_FILE=""
6848 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006849esac
6850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6852# merged with this chunk of code?
6853
6854# Optimizer/debugger flags
6855# ------------------------
6856# (The following bit of code is complicated enough - please keep things
6857# indented properly. Just pretend you're editing Python code. ;-)
6858
6859# There are two parallel sets of case statements below, one that checks to
6860# see if OPT was set and one that does BASECFLAGS setting based upon
6861# compiler and platform. BASECFLAGS tweaks need to be made even if the
6862# user set OPT.
6863
Victor Stinner23a683a2019-04-12 21:27:37 +02006864case $CC in
6865 *clang*)
6866 cc_is_clang=1
6867 ;;
6868 *)
6869 if $CC --version 2>&1 | grep -q clang
6870 then
6871 cc_is_clang=1
6872 else
6873 cc_is_clang=
6874 fi
6875esac
6876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877# tweak OPT based on compiler and platform, only if the user didn't set
6878# it on the command line
6879
Victor Stinner9ed34a82017-05-02 22:35:58 +02006880
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006881if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882then
6883 case $GCC in
6884 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6886 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6887 WRAP="-fwrapv"
6888 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006889
Victor Stinner35f3d242017-04-21 12:35:24 +02006890 if test -n "${cc_is_clang}"
6891 then
6892 # Clang also needs -fwrapv
6893 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006894 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6895 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006896 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006897 fi
6898
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899 case $ac_cv_prog_cc_g in
6900 yes)
6901 if test "$Py_DEBUG" = 'true' ; then
6902 # Optimization messes up debuggers, so turn it off for
6903 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006904 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006905 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006906 else
Victor Stinner28205b22017-04-21 11:24:34 +02006907 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006908 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909 else
Victor Stinner28205b22017-04-21 11:24:34 +02006910 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911 fi
6912 ;;
6913 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006914 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915 ;;
6916 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006917
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006918 case $ac_sys_system in
6919 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6920 ;;
6921 esac
6922 ;;
6923
6924 *)
6925 OPT="-O"
6926 ;;
6927 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928fi
6929
6930
6931
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006932
stratakiscf10a752018-12-19 18:19:01 +01006933
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006934# The -arch flags for universal builds on OSX
6935UNIVERSAL_ARCH_FLAGS=
6936
6937
6938# tweak BASECFLAGS based on compiler and platform
6939case $GCC in
6940yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006941 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006942
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6944$as_echo_n "checking for -Wextra... " >&6; }
6945 ac_save_cc="$CC"
6946 CC="$CC -Wextra -Werror"
6947 if ${ac_cv_extra_warnings+:} false; then :
6948 $as_echo_n "(cached) " >&6
6949else
6950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951/* end confdefs.h. */
6952
6953
6954int
6955main ()
6956{
6957
6958 ;
6959 return 0;
6960}
6961
6962_ACEOF
6963if ac_fn_c_try_compile "$LINENO"; then :
6964
6965 ac_cv_extra_warnings=yes
6966
6967else
6968
6969 ac_cv_extra_warnings=no
6970
6971fi
6972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6973fi
6974
6975 CC="$ac_save_cc"
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6977$as_echo "$ac_cv_extra_warnings" >&6; }
6978
6979 if test $ac_cv_extra_warnings = yes
6980 then
6981 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6982 fi
6983
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984 # Python doesn't violate C99 aliasing rules, but older versions of
6985 # GCC produce warnings for legal Python code. Enable
6986 # -fno-strict-aliasing on versions of GCC that support but produce
6987 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6989$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006990 ac_save_cc="$CC"
6991 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006992 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006993 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006995else
Matthias Kloseb9621712010-04-24 17:59:49 +00006996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006998
Matthias Kloseb159a552010-04-25 21:00:44 +00006999
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007000int
7001main ()
7002{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007003
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007004 ;
7005 return 0;
7006}
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007009if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007010
7011 CC="$ac_save_cc -fstrict-aliasing"
7012 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007014/* end confdefs.h. */
7015
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007016 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007017int
7018main ()
7019{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007020double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021 ;
7022 return 0;
7023}
Matthias Kloseb159a552010-04-25 21:00:44 +00007024
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007026if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007027
7028 ac_cv_no_strict_aliasing=no
7029
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007030else
Matthias Kloseb159a552010-04-25 21:00:44 +00007031
7032 ac_cv_no_strict_aliasing=yes
7033
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007034fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007036
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007037else
Matthias Kloseb159a552010-04-25 21:00:44 +00007038
7039 ac_cv_no_strict_aliasing=no
7040
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007041fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007043fi
7044
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007045 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007046 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7048$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007049 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007050 then
7051 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7052 fi
7053
Zachary Ware5af85642015-12-21 12:09:17 -06007054 # ICC doesn't recognize the option, but only emits a warning
7055 ## XXX does it emit an unused result warning and can it be disabled?
7056 case "$CC" in
7057 *icc*)
7058 ac_cv_disable_unused_result_warning=no
7059 ;;
7060 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7062$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7063 ac_save_cc="$CC"
7064 CC="$CC -Wunused-result -Werror"
7065 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007066 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007067 $as_echo_n "(cached) " >&6
7068else
7069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7070/* end confdefs.h. */
7071
7072
7073int
7074main ()
7075{
7076
7077 ;
7078 return 0;
7079}
7080
7081_ACEOF
7082if ac_fn_c_try_compile "$LINENO"; then :
7083
7084 ac_cv_disable_unused_result_warning=yes
7085
7086else
7087
7088 ac_cv_disable_unused_result_warning=no
7089
7090fi
7091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7092fi
7093
7094 CFLAGS="$save_CFLAGS"
7095 CC="$ac_save_cc"
7096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7097$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007098 ;;
7099 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007100
7101 if test $ac_cv_disable_unused_result_warning = yes
7102 then
7103 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007104 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7105 fi
7106
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7108$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7109 ac_save_cc="$CC"
7110 CC="$CC -Wunused-parameter -Werror"
7111 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7112 $as_echo_n "(cached) " >&6
7113else
7114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7115/* end confdefs.h. */
7116
7117
7118int
7119main ()
7120{
7121
7122 ;
7123 return 0;
7124}
7125
7126_ACEOF
7127if ac_fn_c_try_compile "$LINENO"; then :
7128
7129 ac_cv_disable_unused_parameter_warning=yes
7130
7131else
7132
7133 ac_cv_disable_unused_parameter_warning=no
7134
7135fi
7136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7137fi
7138
7139 CC="$ac_save_cc"
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7141$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7142
7143 if test $ac_cv_disable_unused_parameter_warning = yes
7144 then
7145 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7146 fi
7147
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7149$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7150 ac_save_cc="$CC"
7151 CC="$CC -Wmissing-field-initializers -Werror"
7152 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7153 $as_echo_n "(cached) " >&6
7154else
7155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7156/* end confdefs.h. */
7157
7158
7159int
7160main ()
7161{
7162
7163 ;
7164 return 0;
7165}
7166
7167_ACEOF
7168if ac_fn_c_try_compile "$LINENO"; then :
7169
7170 ac_cv_disable_missing_field_initializers=yes
7171
7172else
7173
7174 ac_cv_disable_missing_field_initializers=no
7175
7176fi
7177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7178fi
7179
7180 CC="$ac_save_cc"
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7182$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7183
7184 if test $ac_cv_disable_missing_field_initializers = yes
7185 then
7186 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007187 fi
7188
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7190$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7191 ac_save_cc="$CC"
7192 CC="$CC -Wsign-compare"
7193 save_CFLAGS="$CFLAGS"
7194 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7195 $as_echo_n "(cached) " >&6
7196else
7197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7198/* end confdefs.h. */
7199
7200
7201int
7202main ()
7203{
7204
7205 ;
7206 return 0;
7207}
7208
7209_ACEOF
7210if ac_fn_c_try_compile "$LINENO"; then :
7211
7212 ac_cv_enable_sign_compare_warning=yes
7213
7214else
7215
7216 ac_cv_enable_sign_compare_warning=no
7217
7218fi
7219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7220fi
7221
7222 CFLAGS="$save_CFLAGS"
7223 CC="$ac_save_cc"
7224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7225$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7226
7227 if test $ac_cv_enable_sign_compare_warning = yes
7228 then
7229 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7230 fi
7231
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7233$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7234 ac_save_cc="$CC"
7235 CC="$CC -Wunreachable-code"
7236 save_CFLAGS="$CFLAGS"
7237 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7238 $as_echo_n "(cached) " >&6
7239else
7240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7241/* end confdefs.h. */
7242
7243
7244int
7245main ()
7246{
7247
7248 ;
7249 return 0;
7250}
7251
7252_ACEOF
7253if ac_fn_c_try_compile "$LINENO"; then :
7254
7255 ac_cv_enable_unreachable_code_warning=yes
7256
7257else
7258
7259 ac_cv_enable_unreachable_code_warning=no
7260
7261fi
7262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7263fi
7264
7265 CFLAGS="$save_CFLAGS"
7266 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007267
7268 # Don't enable unreachable code warning in debug mode, since it usually
7269 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007270 # Issue #24324: Unfortunately, the unreachable code warning does not work
7271 # correctly on gcc and has been silently removed from the compiler.
7272 # It is supported on clang but on OS X systems gcc may be an alias
7273 # for clang. Try to determine if the compiler is not really gcc and,
7274 # if so, only then enable the warning.
7275 if test $ac_cv_enable_unreachable_code_warning = yes && \
7276 test "$Py_DEBUG" != "true" && \
7277 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007278 then
7279 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007280 else
7281 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007282 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7284$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007285
INADA Naokie3364842018-06-05 20:40:53 +09007286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7287$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7288 ac_save_cc="$CC"
7289 CC="$CC -Werror -Wstrict-prototypes"
7290 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7291 $as_echo_n "(cached) " >&6
7292else
7293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7294/* end confdefs.h. */
7295
7296
7297int
7298main ()
7299{
7300
7301 ;
7302 return 0;
7303}
7304
7305_ACEOF
7306if ac_fn_c_try_compile "$LINENO"; then :
7307
7308 ac_cv_enable_strict_prototypes_warning=yes
7309
7310else
7311
7312 ac_cv_enable_strict_prototypes_warning=no
7313
7314fi
7315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7316fi
7317
7318 CC="$ac_save_cc"
7319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7320$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7321
7322 if test $ac_cv_enable_strict_prototypes_warning = yes
7323 then
7324 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7325 fi
7326
Victor Stinner193ee0a2017-02-06 14:24:00 +01007327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7328$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7329 ac_save_cc="$CC"
7330 CC="$CC -Werror=implicit-function-declaration"
7331 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7332 $as_echo_n "(cached) " >&6
7333else
7334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7335/* end confdefs.h. */
7336
7337
7338int
7339main ()
7340{
7341
7342 ;
7343 return 0;
7344}
7345
7346_ACEOF
7347if ac_fn_c_try_compile "$LINENO"; then :
7348
7349 ac_cv_enable_implicit_function_declaration_error=yes
7350
7351else
7352
7353 ac_cv_enable_implicit_function_declaration_error=no
7354
7355fi
7356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7357fi
7358
7359 CC="$ac_save_cc"
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7361$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7362
7363 if test $ac_cv_enable_implicit_function_declaration_error = yes
7364 then
7365 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7366 fi
7367
Vinay Sajip0b60f642019-10-15 08:26:12 +01007368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7369$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7370 ac_save_cc="$CC"
7371 CC="$CC -fvisibility=hidden"
7372 if ${ac_cv_enable_visibility+:} false; then :
7373 $as_echo_n "(cached) " >&6
7374else
7375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7376/* end confdefs.h. */
7377
7378
7379int
7380main ()
7381{
7382
7383 ;
7384 return 0;
7385}
7386
7387_ACEOF
7388if ac_fn_c_try_compile "$LINENO"; then :
7389
7390 ac_cv_enable_visibility=yes
7391
7392else
7393
7394 ac_cv_enable_visibility=no
7395
7396fi
7397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7398fi
7399
7400 CC="$ac_save_cc"
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7402$as_echo "$ac_cv_enable_visibility" >&6; }
7403
7404 if test $ac_cv_enable_visibility = yes
7405 then
7406 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7407 fi
7408
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007409 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7410 # support. Without this, treatment of subnormals doesn't follow
7411 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007412 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413 alpha*)
7414 BASECFLAGS="$BASECFLAGS -mieee"
7415 ;;
7416 esac
7417
7418 case $ac_sys_system in
7419 SCO_SV*)
7420 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7421 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007422
Ned Deily87adb6e2013-10-18 21:09:56 -07007423 Darwin*)
7424 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7425 # used to be here, but non-Apple gcc doesn't accept them.
7426 if test "${CC}" = gcc
7427 then
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007429$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007430 case "${UNIVERSALSDK}" in
7431 */MacOSX10.4u.sdk)
7432 # Build using 10.4 SDK, force usage of gcc when the
7433 # compiler is gcc, otherwise the user will get very
7434 # confusing error messages when building on OSX 10.6
7435 CC=gcc-4.0
7436 CPP=cpp-4.0
7437 ;;
7438 esac
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007440$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007441 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442
Ned Deily87adb6e2013-10-18 21:09:56 -07007443 if test "${enable_universalsdk}"
7444 then
7445 case "$UNIVERSAL_ARCHS" in
7446 32-bit)
7447 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7448 LIPO_32BIT_FLAGS=""
7449 ARCH_RUN_32BIT=""
7450 ;;
7451 64-bit)
7452 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7453 LIPO_32BIT_FLAGS=""
7454 ARCH_RUN_32BIT="true"
7455 ;;
7456 all)
7457 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7458 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7459 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7460 ;;
7461 intel)
7462 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7463 LIPO_32BIT_FLAGS="-extract i386"
7464 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7465 ;;
7466 intel-32)
7467 UNIVERSAL_ARCH_FLAGS="-arch i386"
7468 LIPO_32BIT_FLAGS=""
7469 ARCH_RUN_32BIT=""
7470 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007471 intel-64)
7472 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7473 LIPO_32BIT_FLAGS=""
7474 ARCH_RUN_32BIT="true"
7475 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007476 3-way)
7477 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7478 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7479 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7480 ;;
7481 *)
7482 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7483 ;;
7484 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485
Ned Deily87adb6e2013-10-18 21:09:56 -07007486 if test "${UNIVERSALSDK}" != "/"
7487 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007488 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7489 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007490 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007491 else
7492 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7493 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007494 fi
7495 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496
Ned Deily87adb6e2013-10-18 21:09:56 -07007497 # Calculate an appropriate deployment target for this build:
7498 # The deployment target value is used explicitly to enable certain
7499 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007500 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007501 # component of the string returned by distutils.get_platform().
7502 #
7503 # Use the value from:
7504 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7505 # 2. the operating system version of the build machine if >= 10.6
7506 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7507 # below to pick either 10.3, 10.4, or 10.5 as the target.
7508 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509
Ned Deily87adb6e2013-10-18 21:09:56 -07007510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7511$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007512 cur_target_major=`sw_vers -productVersion | \
7513 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7514 cur_target_minor=`sw_vers -productVersion | \
7515 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7516 cur_target="${cur_target_major}.${cur_target_minor}"
7517 if test ${cur_target_major} -eq 10 && \
7518 test ${cur_target_minor} -ge 3 && \
7519 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007520 then
Ned Deily36820b62014-06-25 13:44:22 -07007521 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007522 cur_target=10.3
7523 if test ${enable_universalsdk}
7524 then
7525 case "$UNIVERSAL_ARCHS" in
7526 all|3-way|intel|64-bit)
7527 # These configurations were first supported in 10.5
7528 cur_target='10.5'
7529 ;;
7530 esac
7531 else
7532 if test `/usr/bin/arch` = "i386"
7533 then
7534 # 10.4 was the first release to support Intel archs
7535 cur_target="10.4"
7536 fi
7537 fi
7538 fi
7539 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007540
Ned Deily87adb6e2013-10-18 21:09:56 -07007541 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7542 # environment with a value that is the same as what we'll use
7543 # in the Makefile to ensure that we'll get the same compiler
7544 # environment during configure and build time.
7545 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7546 export MACOSX_DEPLOYMENT_TARGET
7547 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7549$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007550
Ned Deily87adb6e2013-10-18 21:09:56 -07007551 # end of Darwin* tests
7552 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553 esac
7554 ;;
7555
7556*)
7557 case $ac_sys_system in
7558 OpenUNIX*|UnixWare*)
7559 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7560 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561 SCO_SV*)
7562 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7563 ;;
7564 esac
7565 ;;
7566esac
7567
Zachary Ware5af85642015-12-21 12:09:17 -06007568# ICC needs -fp-model strict or floats behave badly
7569case "$CC" in
7570*icc*)
7571 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7572 ;;
7573esac
7574
T. Woutersddbfa2c2017-05-23 01:30:49 +02007575if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576 :
7577else
7578 OPT="-DNDEBUG $OPT"
7579fi
7580
7581if test "$ac_arch_flags"
7582then
7583 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7584fi
7585
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586# On some compilers, pthreads are available without further options
7587# (e.g. MacOS X). On some of these systems, the compiler will not
7588# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7589# So we have to see first whether pthreads are available without
7590# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7592$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007593if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595else
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597 ac_cv_pthread_is_default=no
7598else
Matthias Kloseb9621712010-04-24 17:59:49 +00007599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007600/* end confdefs.h. */
7601
Stefan Krah7dba5942012-11-22 22:49:11 +01007602#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603#include <pthread.h>
7604
7605void* routine(void* p){return NULL;}
7606
7607int main(){
7608 pthread_t p;
7609 if(pthread_create(&p,NULL,routine,NULL)!=0)
7610 return 1;
7611 (void)pthread_detach(p);
7612 return 0;
7613}
7614
7615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007616if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617
7618 ac_cv_pthread_is_default=yes
7619 ac_cv_kthread=no
7620 ac_cv_pthread=no
7621
7622else
Matthias Kloseb9621712010-04-24 17:59:49 +00007623 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7626 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627fi
7628
7629
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630fi
7631
Matthias Kloseb9621712010-04-24 17:59:49 +00007632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7633$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634
7635
7636if test $ac_cv_pthread_is_default = yes
7637then
7638 ac_cv_kpthread=no
7639else
7640# -Kpthread, if available, provides the right #defines
7641# and linker options to make pthread_create available
7642# Some compilers won't report that they do not support -Kpthread,
7643# so we need to run a program to see whether it really made the
7644# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7646$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007647if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007648 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649else
7650 ac_save_cc="$CC"
7651CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007652if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653 ac_cv_kpthread=no
7654else
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656/* end confdefs.h. */
7657
Stefan Krah7dba5942012-11-22 22:49:11 +01007658#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659#include <pthread.h>
7660
7661void* routine(void* p){return NULL;}
7662
7663int main(){
7664 pthread_t p;
7665 if(pthread_create(&p,NULL,routine,NULL)!=0)
7666 return 1;
7667 (void)pthread_detach(p);
7668 return 0;
7669}
7670
7671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007672if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007673 ac_cv_kpthread=yes
7674else
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7678 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679fi
7680
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681CC="$ac_save_cc"
7682fi
7683
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7685$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686fi
7687
7688if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7689then
7690# -Kthread, if available, provides the right #defines
7691# and linker options to make pthread_create available
7692# Some compilers won't report that they do not support -Kthread,
7693# so we need to run a program to see whether it really made the
7694# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7696$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007697if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699else
7700 ac_save_cc="$CC"
7701CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007702if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703 ac_cv_kthread=no
7704else
Matthias Kloseb9621712010-04-24 17:59:49 +00007705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706/* end confdefs.h. */
7707
Stefan Krah7dba5942012-11-22 22:49:11 +01007708#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709#include <pthread.h>
7710
7711void* routine(void* p){return NULL;}
7712
7713int main(){
7714 pthread_t p;
7715 if(pthread_create(&p,NULL,routine,NULL)!=0)
7716 return 1;
7717 (void)pthread_detach(p);
7718 return 0;
7719}
7720
7721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007722if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723 ac_cv_kthread=yes
7724else
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729fi
7730
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731CC="$ac_save_cc"
7732fi
7733
Matthias Kloseb9621712010-04-24 17:59:49 +00007734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7735$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736fi
7737
7738if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7739then
7740# -pthread, if available, provides the right #defines
7741# and linker options to make pthread_create available
7742# Some compilers won't report that they do not support -pthread,
7743# so we need to run a program to see whether it really made the
7744# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7746$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007747if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749else
7750 ac_save_cc="$CC"
7751CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007752if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007753 ac_cv_pthread=no
7754else
Matthias Kloseb9621712010-04-24 17:59:49 +00007755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007756/* end confdefs.h. */
7757
Stefan Krah7dba5942012-11-22 22:49:11 +01007758#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759#include <pthread.h>
7760
7761void* routine(void* p){return NULL;}
7762
7763int main(){
7764 pthread_t p;
7765 if(pthread_create(&p,NULL,routine,NULL)!=0)
7766 return 1;
7767 (void)pthread_detach(p);
7768 return 0;
7769}
7770
7771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007772if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007773 ac_cv_pthread=yes
7774else
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779fi
7780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781CC="$ac_save_cc"
7782fi
7783
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7785$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786fi
7787
7788# If we have set a CC compiler flag for thread support then
7789# check if it works for CXX, too.
7790ac_cv_cxx_thread=no
7791if test ! -z "$CXX"
7792then
Matthias Kloseb9621712010-04-24 17:59:49 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7794$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007795ac_save_cxx="$CXX"
7796
7797if test "$ac_cv_kpthread" = "yes"
7798then
7799 CXX="$CXX -Kpthread"
7800 ac_cv_cxx_thread=yes
7801elif test "$ac_cv_kthread" = "yes"
7802then
7803 CXX="$CXX -Kthread"
7804 ac_cv_cxx_thread=yes
7805elif test "$ac_cv_pthread" = "yes"
7806then
7807 CXX="$CXX -pthread"
7808 ac_cv_cxx_thread=yes
7809fi
7810
7811if test $ac_cv_cxx_thread = yes
7812then
7813 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7814 $CXX -c conftest.$ac_ext 2>&5
7815 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7816 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7817 then
7818 ac_cv_cxx_thread=yes
7819 else
7820 ac_cv_cxx_thread=no
7821 fi
7822 rm -fr conftest*
7823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7825$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007826fi
7827CXX="$ac_save_cxx"
7828
7829
7830# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7832$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007833if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007837/* end confdefs.h. */
7838#include <stdlib.h>
7839#include <stdarg.h>
7840#include <string.h>
7841#include <float.h>
7842
7843int
7844main ()
7845{
7846
7847 ;
7848 return 0;
7849}
7850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007851if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007852 ac_cv_header_stdc=yes
7853else
Matthias Kloseb9621712010-04-24 17:59:49 +00007854 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007855fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7857
7858if test $ac_cv_header_stdc = yes; then
7859 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007861/* end confdefs.h. */
7862#include <string.h>
7863
7864_ACEOF
7865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 $EGREP "memchr" >/dev/null 2>&1; then :
7867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007868else
7869 ac_cv_header_stdc=no
7870fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007871rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007872
7873fi
7874
7875if test $ac_cv_header_stdc = yes; then
7876 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007878/* end confdefs.h. */
7879#include <stdlib.h>
7880
7881_ACEOF
7882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 $EGREP "free" >/dev/null 2>&1; then :
7884
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007885else
7886 ac_cv_header_stdc=no
7887fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007888rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007889
7890fi
7891
7892if test $ac_cv_header_stdc = yes; then
7893 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007895 :
7896else
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007898/* end confdefs.h. */
7899#include <ctype.h>
7900#include <stdlib.h>
7901#if ((' ' & 0x0FF) == 0x020)
7902# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7903# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7904#else
7905# define ISLOWER(c) \
7906 (('a' <= (c) && (c) <= 'i') \
7907 || ('j' <= (c) && (c) <= 'r') \
7908 || ('s' <= (c) && (c) <= 'z'))
7909# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7910#endif
7911
7912#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7913int
7914main ()
7915{
7916 int i;
7917 for (i = 0; i < 256; i++)
7918 if (XOR (islower (i), ISLOWER (i))
7919 || toupper (i) != TOUPPER (i))
7920 return 2;
7921 return 0;
7922}
7923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007924if ac_fn_c_try_run "$LINENO"; then :
7925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007926else
Matthias Kloseb9621712010-04-24 17:59:49 +00007927 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7930 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007931fi
7932
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007933fi
7934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7936$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007937if test $ac_cv_header_stdc = yes; then
7938
Matthias Kloseb9621712010-04-24 17:59:49 +00007939$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007940
7941fi
7942
stratakise768c862018-01-23 16:11:24 +01007943for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007944fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007945ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007946sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007947utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007948poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007949sys/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 +01007950sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007951sys/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 +01007952sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007953sys/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 -07007954libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007955linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007956sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007957do :
7958 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7959ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007960if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007962#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007963_ACEOF
7964
7965fi
7966
Guido van Rossum627b2d71993-12-24 10:39:16 +00007967done
7968
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007969ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007970for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007971 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7973$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007974if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007976else
Matthias Kloseb9621712010-04-24 17:59:49 +00007977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007979#include <sys/types.h>
7980#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007981
Martin v. Löwis11437992002-04-12 09:54:03 +00007982int
7983main ()
7984{
7985if ((DIR *) 0)
7986return 0;
7987 ;
7988 return 0;
7989}
7990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007991if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007993else
Matthias Kloseb9621712010-04-24 17:59:49 +00007994 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998eval ac_res=\$$as_ac_Header
7999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8000$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008001if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008003#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008004_ACEOF
8005
8006ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008007fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008009done
8010# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8011if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8013$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008014if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008015 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008016else
Martin v. Löwis11437992002-04-12 09:54:03 +00008017 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021/* Override any GCC internal prototype to avoid an error.
8022 Use char because int might match the return type of a GCC
8023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008024#ifdef __cplusplus
8025extern "C"
8026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008027char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008028int
8029main ()
8030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ;
8033 return 0;
8034}
8035_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036for ac_lib in '' dir; do
8037 if test -z "$ac_lib"; then
8038 ac_res="none required"
8039 else
8040 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008041 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008046rm -f core conftest.err conftest.$ac_objext \
8047 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008048 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051done
Victor Stinnere0be4232011-10-25 13:06:09 +02008052if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054else
8055 ac_cv_search_opendir=no
8056fi
8057rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008058LIBS=$ac_func_search_save_LIBS
8059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8061$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008063if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008066fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008067
Michael W. Hudson54241132001-12-07 15:38:26 +00008068else
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8070$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008071if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008073else
8074 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078/* Override any GCC internal prototype to avoid an error.
8079 Use char because int might match the return type of a GCC
8080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008081#ifdef __cplusplus
8082extern "C"
8083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008084char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008085int
8086main ()
8087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008088return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008089 ;
8090 return 0;
8091}
8092_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008093for ac_lib in '' x; do
8094 if test -z "$ac_lib"; then
8095 ac_res="none required"
8096 else
8097 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008098 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008100 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008103rm -f core conftest.err conftest.$ac_objext \
8104 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008105 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108done
Victor Stinnere0be4232011-10-25 13:06:09 +02008109if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008111else
8112 ac_cv_search_opendir=no
8113fi
8114rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008115LIBS=$ac_func_search_save_LIBS
8116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8118$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008120if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008122
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008123fi
8124
8125fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8128$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008129if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008131else
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008133/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008134#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008135int
8136main ()
8137{
8138return makedev(0, 0);
8139 ;
8140 return 0;
8141}
8142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008144 ac_cv_header_sys_types_h_makedev=yes
8145else
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008148rm -f core conftest.err conftest.$ac_objext \
8149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008150
8151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8153$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008154
8155if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008156ac_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 +02008157if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008158
Matthias Kloseb9621712010-04-24 17:59:49 +00008159$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008160
8161fi
8162
8163
8164
8165 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008166 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 +02008167if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008170
8171fi
8172
8173
8174 fi
8175fi
8176
Michael W. Hudson54241132001-12-07 15:38:26 +00008177
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008178# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8179# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8180SAVE_CFLAGS=$CFLAGS
8181CFLAGS="-std=c99 $CFLAGS"
8182for ac_header in bluetooth/bluetooth.h
8183do :
8184 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8185if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8186 cat >>confdefs.h <<_ACEOF
8187#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8188_ACEOF
8189
8190fi
8191
8192done
8193
8194CFLAGS=$SAVE_CFLAGS
8195
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008196# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8197for ac_header in net/if.h
8198do :
8199 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8200#ifdef STDC_HEADERS
8201# include <stdlib.h>
8202# include <stddef.h>
8203#else
8204# ifdef HAVE_STDLIB_H
8205# include <stdlib.h>
8206# endif
8207#endif
8208#ifdef HAVE_SYS_SOCKET_H
8209# include <sys/socket.h>
8210#endif
8211
8212"
Victor Stinnere0be4232011-10-25 13:06:09 +02008213if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008214 cat >>confdefs.h <<_ACEOF
8215#define HAVE_NET_IF_H 1
8216_ACEOF
8217
8218fi
8219
8220done
8221
8222
Martin v. Löwis11017b12006-01-14 18:12:57 +00008223# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008224for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008225do :
8226 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 +00008227#ifdef HAVE_ASM_TYPES_H
8228#include <asm/types.h>
8229#endif
8230#ifdef HAVE_SYS_SOCKET_H
8231#include <sys/socket.h>
8232#endif
8233
Matthias Kloseb9621712010-04-24 17:59:49 +00008234"
Victor Stinnere0be4232011-10-25 13:06:09 +02008235if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008236 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008237#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008238_ACEOF
8239
8240fi
8241
8242done
8243
8244
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008245# On Linux, qrtr.h requires asm/types.h
8246for ac_header in linux/qrtr.h
8247do :
8248 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8249#ifdef HAVE_ASM_TYPES_H
8250#include <asm/types.h>
8251#endif
8252#ifdef HAVE_SYS_SOCKET_H
8253#include <sys/socket.h>
8254#endif
8255
8256"
8257if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8258 cat >>confdefs.h <<_ACEOF
8259#define HAVE_LINUX_QRTR_H 1
8260_ACEOF
8261
8262fi
8263
8264done
8265
8266
caaveryeffc12f2017-09-06 18:18:10 -04008267for ac_header in linux/vm_sockets.h
8268do :
8269 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8270#ifdef HAVE_SYS_SOCKET_H
8271#include <sys/socket.h>
8272#endif
8273
8274"
8275if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8276 cat >>confdefs.h <<_ACEOF
8277#define HAVE_LINUX_VM_SOCKETS_H 1
8278_ACEOF
8279
8280fi
8281
8282done
8283
8284
Charles-François Natali47413c12011-10-06 19:47:44 +02008285# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008286for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008287do :
8288 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8289ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8290#ifdef HAVE_SYS_SOCKET_H
8291#include <sys/socket.h>
8292#endif
8293
8294"
8295if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8296 cat >>confdefs.h <<_ACEOF
8297#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8298_ACEOF
8299
8300fi
8301
8302done
8303
8304
Guido van Rossum627b2d71993-12-24 10:39:16 +00008305# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008306was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8308$as_echo_n "checking for clock_t in time.h... " >&6; }
8309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008310/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008311#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008312
8313_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008316 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008317else
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
8319
Matthias Kloseb9621712010-04-24 17:59:49 +00008320$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008321
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008322
Guido van Rossum627b2d71993-12-24 10:39:16 +00008323fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008324rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008325
Matthias Kloseb9621712010-04-24 17:59:49 +00008326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8327$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008328
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8330$as_echo_n "checking for makedev... " >&6; }
8331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008332/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008333
Jesus Cea740f53a2010-04-28 11:35:30 +00008334#if defined(MAJOR_IN_MKDEV)
8335#include <sys/mkdev.h>
8336#elif defined(MAJOR_IN_SYSMACROS)
8337#include <sys/sysmacros.h>
8338#else
8339#include <sys/types.h>
8340#endif
8341
Neal Norwitz11690112002-07-30 01:08:28 +00008342int
8343main ()
8344{
Jesus Cea740f53a2010-04-28 11:35:30 +00008345
8346 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008347 ;
8348 return 0;
8349}
Matthias Kloseb159a552010-04-25 21:00:44 +00008350
Neal Norwitz11690112002-07-30 01:08:28 +00008351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008352if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008353 ac_cv_has_makedev=yes
8354else
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008357rm -f core conftest.err conftest.$ac_objext \
8358 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8360$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008361if test "$ac_cv_has_makedev" = "yes"; then
8362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008364
8365fi
8366
Christian Heimes985ecdc2013-11-20 11:46:18 +01008367# byte swapping
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8369$as_echo_n "checking for le64toh... " >&6; }
8370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8371/* end confdefs.h. */
8372
8373#ifdef HAVE_ENDIAN_H
8374#include <endian.h>
8375#elif defined(HAVE_SYS_ENDIAN_H)
8376#include <sys/endian.h>
8377#endif
8378
8379int
8380main ()
8381{
8382
8383 le64toh(1)
8384 ;
8385 return 0;
8386}
8387
8388_ACEOF
8389if ac_fn_c_try_link "$LINENO"; then :
8390 ac_cv_has_le64toh=yes
8391else
8392 ac_cv_has_le64toh=no
8393fi
8394rm -f core conftest.err conftest.$ac_objext \
8395 conftest$ac_exeext conftest.$ac_ext
8396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8397$as_echo "$ac_cv_has_le64toh" >&6; }
8398if test "$ac_cv_has_le64toh" = "yes"; then
8399
8400$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8401
8402fi
8403
Martin v. Löwis399a6892002-10-04 10:22:02 +00008404use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008405# Don't use largefile support for GNU/Hurd
8406case $ac_sys_system in GNU*)
8407 use_lfs=no
8408esac
8409
Martin v. Löwis399a6892002-10-04 10:22:02 +00008410if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008411# Two defines needed to enable largefile support on various platforms
8412# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008413case $ac_sys_system/$ac_sys_release in
8414AIX*)
8415
8416$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8417
8418 ;;
8419esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008420
Matthias Kloseb9621712010-04-24 17:59:49 +00008421$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008422
8423
Matthias Kloseb9621712010-04-24 17:59:49 +00008424$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008425
Martin v. Löwis399a6892002-10-04 10:22:02 +00008426fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008427
Guido van Rossum84e7b241996-08-19 21:59:00 +00008428# Add some code to confdefs.h so that the test for off_t works on SCO
8429cat >> confdefs.h <<\EOF
8430#if defined(SCO_DS)
8431#undef _OFF_T
8432#endif
8433EOF
8434
Guido van Rossumef2255b2000-03-10 22:30:29 +00008435# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008436ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008437if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008439else
Martin v. Löwis11437992002-04-12 09:54:03 +00008440
8441cat >>confdefs.h <<_ACEOF
8442#define mode_t int
8443_ACEOF
8444
8445fi
8446
Matthias Kloseb9621712010-04-24 17:59:49 +00008447ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008448if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008449
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008450else
Martin v. Löwis11437992002-04-12 09:54:03 +00008451
8452cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008454_ACEOF
8455
8456fi
8457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008459if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008461else
Martin v. Löwis11437992002-04-12 09:54:03 +00008462
8463cat >>confdefs.h <<_ACEOF
8464#define pid_t int
8465_ACEOF
8466
8467fi
8468
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008469
Martin v. Löwis11437992002-04-12 09:54:03 +00008470cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008471#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008472_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008473
Matthias Kloseb9621712010-04-24 17:59:49 +00008474ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008475if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008476
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008477else
Martin v. Löwis11437992002-04-12 09:54:03 +00008478
8479cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008481_ACEOF
8482
8483fi
8484
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8486$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008487if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008489else
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008491/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008492#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008493
8494_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008497 ac_cv_type_uid_t=yes
8498else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008499 ac_cv_type_uid_t=no
8500fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008501rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008502
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8505$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008506if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008507
Matthias Kloseb9621712010-04-24 17:59:49 +00008508$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008509
8510
Matthias Kloseb9621712010-04-24 17:59:49 +00008511$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008512
8513fi
8514
Mark Dickinson983bc162012-12-02 12:11:38 +00008515
Matthias Kloseb9621712010-04-24 17:59:49 +00008516ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008517if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518
Matthias Kloseb9621712010-04-24 17:59:49 +00008519$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008520
8521fi
8522
Stefan Krah1919b7e2012-03-21 18:25:23 +01008523ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8524if test "x$ac_cv_type___uint128_t" = xyes; then :
8525
8526$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8527
8528fi
8529
Jack Jansendd19cf82001-12-06 22:36:17 +00008530
Michael W. Hudson54241132001-12-07 15:38:26 +00008531# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008532# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008533# The cast to long int works around a bug in the HP C Compiler
8534# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8535# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8536# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8538$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008539if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008541else
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 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 +00008543
Martin v. Löwis11437992002-04-12 09:54:03 +00008544else
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 if test "$ac_cv_type_int" = yes; then
8546 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8547$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008548as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008549See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550 else
8551 ac_cv_sizeof_int=0
8552 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008554
Martin v. Löwis11437992002-04-12 09:54:03 +00008555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8557$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558
8559
8560
Martin v. Löwis11437992002-04-12 09:54:03 +00008561cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008562#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008563_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008564
8565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566# The cast to long int works around a bug in the HP C Compiler
8567# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8568# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8569# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8571$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008572if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008574else
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 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 +00008576
Martin v. Löwis11437992002-04-12 09:54:03 +00008577else
Matthias Kloseb9621712010-04-24 17:59:49 +00008578 if test "$ac_cv_type_long" = yes; then
8579 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8580$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008581as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008582See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583 else
8584 ac_cv_sizeof_long=0
8585 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8590$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591
8592
8593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008595#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008596_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008597
8598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599# The cast to long int works around a bug in the HP C Compiler
8600# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8601# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8602# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8604$as_echo_n "checking size of long long... " >&6; }
8605if ${ac_cv_sizeof_long_long+:} false; then :
8606 $as_echo_n "(cached) " >&6
8607else
8608 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8609
8610else
8611 if test "$ac_cv_type_long_long" = yes; then
8612 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8614as_fn_error 77 "cannot compute sizeof (long long)
8615See \`config.log' for more details" "$LINENO" 5; }
8616 else
8617 ac_cv_sizeof_long_long=0
8618 fi
8619fi
8620
8621fi
8622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8623$as_echo "$ac_cv_sizeof_long_long" >&6; }
8624
8625
8626
8627cat >>confdefs.h <<_ACEOF
8628#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8629_ACEOF
8630
8631
8632# The cast to long int works around a bug in the HP C Compiler
8633# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8634# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8635# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8637$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008638if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008640else
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 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 +00008642
Martin v. Löwis11437992002-04-12 09:54:03 +00008643else
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 if test "$ac_cv_type_void_p" = yes; then
8645 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008647as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008648See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649 else
8650 ac_cv_sizeof_void_p=0
8651 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8656$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657
8658
8659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008661#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008662_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008663
8664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665# The cast to long int works around a bug in the HP C Compiler
8666# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8667# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8668# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8670$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008671if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008672 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008673else
Matthias Kloseb9621712010-04-24 17:59:49 +00008674 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 +00008675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676else
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 if test "$ac_cv_type_short" = yes; then
8678 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008680as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008681See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682 else
8683 ac_cv_sizeof_short=0
8684 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008686
Martin v. Löwis11437992002-04-12 09:54:03 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8689$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008690
8691
8692
Martin v. Löwis11437992002-04-12 09:54:03 +00008693cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008694#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008695_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008696
8697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008698# The cast to long int works around a bug in the HP C Compiler
8699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8701# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8703$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008704if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 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 +00008708
Martin v. Löwis11437992002-04-12 09:54:03 +00008709else
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 if test "$ac_cv_type_float" = yes; then
8711 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008713as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008714See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715 else
8716 ac_cv_sizeof_float=0
8717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719
Martin v. Löwis11437992002-04-12 09:54:03 +00008720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8722$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723
8724
8725
Martin v. Löwis11437992002-04-12 09:54:03 +00008726cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008727#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008728_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008729
8730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731# The cast to long int works around a bug in the HP C Compiler
8732# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8733# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8734# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8736$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008737if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 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 +00008741
Martin v. Löwis11437992002-04-12 09:54:03 +00008742else
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 if test "$ac_cv_type_double" = yes; then
8744 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8745$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008746as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008747See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008748 else
8749 ac_cv_sizeof_double=0
8750 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008752
Martin v. Löwis11437992002-04-12 09:54:03 +00008753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8755$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756
8757
8758
Martin v. Löwis11437992002-04-12 09:54:03 +00008759cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008760#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008761_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008762
8763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764# The cast to long int works around a bug in the HP C Compiler
8765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8769$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008770if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 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 +00008774
Martin v. Löwis11437992002-04-12 09:54:03 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 if test "$ac_cv_type_fpos_t" = yes; then
8777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008779as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008780See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008781 else
8782 ac_cv_sizeof_fpos_t=0
8783 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785
Martin v. Löwis11437992002-04-12 09:54:03 +00008786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8788$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789
8790
8791
Martin v. Löwis11437992002-04-12 09:54:03 +00008792cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008793#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008794_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008795
Michael W. Hudson54241132001-12-07 15:38:26 +00008796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008797# The cast to long int works around a bug in the HP C Compiler
8798# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8799# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8800# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8802$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008803if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008805else
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 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 +00008807
Martin v. Löwis18e16552006-02-15 17:27:45 +00008808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 if test "$ac_cv_type_size_t" = yes; then
8810 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008812as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008813See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008814 else
8815 ac_cv_sizeof_size_t=0
8816 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008818
Martin v. Löwis18e16552006-02-15 17:27:45 +00008819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8821$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822
8823
8824
Martin v. Löwis18e16552006-02-15 17:27:45 +00008825cat >>confdefs.h <<_ACEOF
8826#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8827_ACEOF
8828
8829
Christian Heimes400adb02008-02-01 08:12:03 +00008830# The cast to long int works around a bug in the HP C Compiler
8831# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8832# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8833# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8835$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008836if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 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 +00008840
Christian Heimes400adb02008-02-01 08:12:03 +00008841else
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 if test "$ac_cv_type_pid_t" = yes; then
8843 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008845as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008846See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008847 else
8848 ac_cv_sizeof_pid_t=0
8849 fi
8850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008851
Christian Heimes400adb02008-02-01 08:12:03 +00008852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8854$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008855
8856
8857
8858cat >>confdefs.h <<_ACEOF
8859#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8860_ACEOF
8861
8862
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008863# The cast to long int works around a bug in the HP C Compiler
8864# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8865# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8866# This bug is HP SR number 8606223364.
8867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8868$as_echo_n "checking size of uintptr_t... " >&6; }
8869if ${ac_cv_sizeof_uintptr_t+:} false; then :
8870 $as_echo_n "(cached) " >&6
8871else
8872 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8873
8874else
8875 if test "$ac_cv_type_uintptr_t" = yes; then
8876 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8878as_fn_error 77 "cannot compute sizeof (uintptr_t)
8879See \`config.log' for more details" "$LINENO" 5; }
8880 else
8881 ac_cv_sizeof_uintptr_t=0
8882 fi
8883fi
8884
8885fi
8886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8887$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8888
8889
8890
8891cat >>confdefs.h <<_ACEOF
8892#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8893_ACEOF
8894
8895
Michael W. Hudson54241132001-12-07 15:38:26 +00008896
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008897
Eitan Adler3055c942018-05-15 22:58:09 -07008898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8899$as_echo_n "checking for long double... " >&6; }
8900if ${ac_cv_type_long_double+:} false; then :
8901 $as_echo_n "(cached) " >&6
8902else
8903 if test "$GCC" = yes; then
8904 ac_cv_type_long_double=yes
8905 else
8906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8907/* end confdefs.h. */
8908/* The Stardent Vistra knows sizeof (long double), but does
8909 not support it. */
8910 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008911int
8912main ()
8913{
Eitan Adler3055c942018-05-15 22:58:09 -07008914static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8915 sizeof (double) <= sizeof (long double))];
8916test_array [0] = 0;
8917return test_array [0];
8918
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008919 ;
8920 return 0;
8921}
8922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008923if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008924 ac_cv_type_long_double=yes
8925else
8926 ac_cv_type_long_double=no
8927fi
8928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8929 fi
8930fi
8931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8932$as_echo "$ac_cv_type_long_double" >&6; }
8933 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008934
Matthias Kloseb9621712010-04-24 17:59:49 +00008935$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008936
Eitan Adler3055c942018-05-15 22:58:09 -07008937 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008938
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008939# The cast to long int works around a bug in the HP C Compiler
8940# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8941# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8942# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8944$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008945if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008947else
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 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 +00008949
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008950else
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 if test "$ac_cv_type_long_double" = yes; then
8952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008954as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008955See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008956 else
8957 ac_cv_sizeof_long_double=0
8958 fi
8959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008960
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8963$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008964
8965
8966
8967cat >>confdefs.h <<_ACEOF
8968#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8969_ACEOF
8970
8971
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973# The cast to long int works around a bug in the HP C Compiler
8974# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8975# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8976# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8978$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008979if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008980 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008981else
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 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 +00008983
Thomas Woutersb2137042007-02-01 18:02:27 +00008984else
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 if test "$ac_cv_type__Bool" = yes; then
8986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008988as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008989See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990 else
8991 ac_cv_sizeof__Bool=0
8992 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008994
Thomas Woutersb2137042007-02-01 18:02:27 +00008995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8997$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998
8999
9000
Thomas Woutersb2137042007-02-01 18:02:27 +00009001cat >>confdefs.h <<_ACEOF
9002#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9003_ACEOF
9004
9005
Thomas Woutersb2137042007-02-01 18:02:27 +00009006
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009007# The cast to long int works around a bug in the HP C Compiler
9008# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9009# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9010# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9012$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009013if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009015else
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009017#ifdef HAVE_SYS_TYPES_H
9018#include <sys/types.h>
9019#endif
9020
Matthias Kloseb9621712010-04-24 17:59:49 +00009021"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009022
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009023else
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 if test "$ac_cv_type_off_t" = yes; then
9025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009027as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009028See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009029 else
9030 ac_cv_sizeof_off_t=0
9031 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009033
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9036$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009037
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009038
9039
Martin v. Löwis11437992002-04-12 09:54:03 +00009040cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009041#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009042_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009043
Michael W. Hudson54241132001-12-07 15:38:26 +00009044
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009045
Matthias Kloseb9621712010-04-24 17:59:49 +00009046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9047$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009048if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009049 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009050
Matthias Kloseb9621712010-04-24 17:59:49 +00009051$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009052
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9054$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009055else
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9057$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009058fi
9059
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009060# The cast to long int works around a bug in the HP C Compiler
9061# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9062# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9063# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9065$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009066if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009067 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009068else
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009070#ifdef HAVE_SYS_TYPES_H
9071#include <sys/types.h>
9072#endif
9073#ifdef HAVE_TIME_H
9074#include <time.h>
9075#endif
9076
Matthias Kloseb9621712010-04-24 17:59:49 +00009077"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009078
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009079else
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 if test "$ac_cv_type_time_t" = yes; then
9081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009083as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009084See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009085 else
9086 ac_cv_sizeof_time_t=0
9087 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009089
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9092$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009093
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009094
9095
Martin v. Löwis11437992002-04-12 09:54:03 +00009096cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009097#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009098_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009099
Michael W. Hudson54241132001-12-07 15:38:26 +00009100
9101
Trent Mick635f6fb2000-08-23 21:33:05 +00009102# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009103ac_save_cc="$CC"
9104if test "$ac_cv_kpthread" = "yes"
9105then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009106elif test "$ac_cv_kthread" = "yes"
9107then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009108elif test "$ac_cv_pthread" = "yes"
9109then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009110fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009111
Matthias Kloseb9621712010-04-24 17:59:49 +00009112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9113$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009114have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009116/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009117
9118 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009119int
9120main ()
9121{
Guido van Rossum12580492000-09-24 16:47:19 +00009122pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 ;
9124 return 0;
9125}
Matthias Kloseb159a552010-04-25 21:00:44 +00009126
Martin v. Löwis11437992002-04-12 09:54:03 +00009127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009128if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009129 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9133$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009134if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9138# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9140$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009141if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009142 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009143else
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009145#ifdef HAVE_PTHREAD_H
9146#include <pthread.h>
9147#endif
9148
Matthias Kloseb9621712010-04-24 17:59:49 +00009149"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009151else
Matthias Kloseb9621712010-04-24 17:59:49 +00009152 if test "$ac_cv_type_pthread_t" = yes; then
9153 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009155as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009156See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009157 else
9158 ac_cv_sizeof_pthread_t=0
9159 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009161
Trent Mick635f6fb2000-08-23 21:33:05 +00009162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9164$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009165
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009166
9167
Martin v. Löwis11437992002-04-12 09:54:03 +00009168cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009169#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009170_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009171
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009172
Trent Mick635f6fb2000-08-23 21:33:05 +00009173fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009174
9175# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9176# This checking will be unnecessary after removing deprecated TLS API.
9177# The cast to long int works around a bug in the HP C Compiler
9178# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9179# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9180# This bug is HP SR number 8606223364.
9181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9182$as_echo_n "checking size of pthread_key_t... " >&6; }
9183if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9184 $as_echo_n "(cached) " >&6
9185else
9186 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9187"; then :
9188
9189else
9190 if test "$ac_cv_type_pthread_key_t" = yes; then
9191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9193as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9194See \`config.log' for more details" "$LINENO" 5; }
9195 else
9196 ac_cv_sizeof_pthread_key_t=0
9197 fi
9198fi
9199
9200fi
9201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9202$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9203
9204
9205
9206cat >>confdefs.h <<_ACEOF
9207#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9208_ACEOF
9209
9210
9211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9212$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9213if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9215/* end confdefs.h. */
9216#include <pthread.h>
9217int
9218main ()
9219{
9220pthread_key_t k; k * 1;
9221 ;
9222 return 0;
9223}
9224_ACEOF
9225if ac_fn_c_try_compile "$LINENO"; then :
9226 ac_pthread_key_t_is_arithmetic_type=yes
9227else
9228 ac_pthread_key_t_is_arithmetic_type=no
9229
9230fi
9231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9233$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9234 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9235
9236$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9237
9238 fi
9239else
9240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9241$as_echo "no" >&6; }
9242fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009243CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009244
Michael W. Hudson54241132001-12-07 15:38:26 +00009245
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009246case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009247 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009248 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9249 ;;
9250 Darwin/*)
9251 OTHER_LIBTOOL_OPT=""
9252 ;;
9253esac
9254
9255
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009256
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009257case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009258 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009259 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9260 if test "${enable_universalsdk}"; then
9261 :
9262 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009263 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009264 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009265 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009266 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009267 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009268 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009269 if test ${gcc_version} '<' 4.0
9270 then
9271 LIBTOOL_CRUFT="-lcc_dynamic"
9272 else
9273 LIBTOOL_CRUFT=""
9274 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009276 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009277else
Matthias Kloseb9621712010-04-24 17:59:49 +00009278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009279/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009280
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009281 #include <unistd.h>
9282 int main(int argc, char*argv[])
9283 {
9284 if (sizeof(long) == 4) {
9285 return 0;
9286 } else {
9287 return 1;
9288 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009289 }
9290
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009292if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009293 ac_osx_32bit=yes
9294else
Matthias Kloseb9621712010-04-24 17:59:49 +00009295 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9298 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009299fi
9300
9301
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009302 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009303 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009304 i386)
9305 MACOSX_DEFAULT_ARCH="i386"
9306 ;;
9307 ppc)
9308 MACOSX_DEFAULT_ARCH="ppc"
9309 ;;
9310 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009311 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009312 ;;
9313 esac
9314 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009315 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009316 i386)
9317 MACOSX_DEFAULT_ARCH="x86_64"
9318 ;;
9319 ppc)
9320 MACOSX_DEFAULT_ARCH="ppc64"
9321 ;;
9322 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009323 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009324 ;;
9325 esac
9326
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009327 fi
9328
9329 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009330 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009331 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009332esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9334$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009335if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009336then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009337 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009338 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009339 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009340
Matthias Kloseb9621712010-04-24 17:59:49 +00009341$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009342
Matthias Kloseb9621712010-04-24 17:59:49 +00009343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9344$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009345 if test $enable_shared = "yes"
9346 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009347 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 +00009348 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009349else
Matthias Kloseb9621712010-04-24 17:59:49 +00009350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9351$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009352fi
9353
Matthias Kloseb9621712010-04-24 17:59:49 +00009354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9355$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009356case $ac_sys_system/$ac_sys_release in
9357 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009358
Matthias Kloseb9621712010-04-24 17:59:49 +00009359$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009360
Matthias Kloseb9621712010-04-24 17:59:49 +00009361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9362$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009363 ;;
9364 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9366$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009367 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009368esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009369
Guido van Rossum0a516c91994-09-12 10:58:40 +00009370# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009371
Michael W. Hudson54241132001-12-07 15:38:26 +00009372
9373
9374
9375
Benjamin Peterson99f03762010-04-11 22:15:28 +00009376
Thomas Wouters477c8d52006-05-27 19:21:47 +00009377
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009378# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9379# -- usually .so, .sl on HP-UX, .dll on Cygwin
9380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9381$as_echo_n "checking the extension of shared libraries... " >&6; }
9382if test -z "$SHLIB_SUFFIX"; then
9383 case $ac_sys_system in
9384 hp*|HP*)
9385 case `uname -m` in
9386 ia64) SHLIB_SUFFIX=.so;;
9387 *) SHLIB_SUFFIX=.sl;;
9388 esac
9389 ;;
9390 CYGWIN*) SHLIB_SUFFIX=.dll;;
9391 *) SHLIB_SUFFIX=.so;;
9392 esac
9393fi
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9395$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009396
Guido van Rossum0a516c91994-09-12 10:58:40 +00009397# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009398# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009399# (Shared libraries in this instance are shared modules to be loaded into
9400# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9402$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009403if test -z "$LDSHARED"
9404then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009405 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009406 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009407 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009408 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009409 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009410 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009411 if test "$GCC" = "yes" ; then
9412 LDSHARED='$(CC) -shared'
9413 LDCXXSHARED='$(CXX) -shared'
9414 else
9415 LDSHARED='$(CC) -G'
9416 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009417 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009418 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009419 if test "$GCC" = "yes" ; then
9420 LDSHARED='$(CC) -shared'
9421 LDCXXSHARED='$(CXX) -shared'
9422 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009423 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009424 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009425 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009426 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009427 LDSHARED='$(CC) -bundle'
9428 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009429 if test "$enable_framework" ; then
9430 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009431 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9432 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009433 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009434 else
9435 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009436 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009437 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009438 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009439 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009440 LDSHARED='$(CC) -bundle'
9441 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009442 if test "$enable_framework" ; then
9443 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009444 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9445 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009446 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009447 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009448 # No framework, use the Python app as bundle-loader
9449 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009450 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009451 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009452 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009453 Darwin/*)
9454 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9455 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009456
Ned Deily36820b62014-06-25 13:44:22 -07009457 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9458 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9459 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9460 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9461 if test ${dep_target_major} -eq 10 && \
9462 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009463 then
Ned Deily36820b62014-06-25 13:44:22 -07009464 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009465 LDSHARED='$(CC) -bundle'
9466 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009467 if test "$enable_framework" ; then
9468 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009469 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9470 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009471 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009472 else
9473 # No framework, use the Python app as bundle-loader
9474 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9475 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009476 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009477 fi
Ned Deily36820b62014-06-25 13:44:22 -07009478 else
9479 # building for OS X 10.3 and later
9480 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9481 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9482 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009483 fi
9484 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009485 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009486 LDSHARED='$(CC) -shared'
9487 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009488 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009489 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009490 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009491 LDSHARED='$(CC) -shared'
9492 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009493 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009494 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009495 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009496 OpenBSD*)
9497 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9498 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009499 LDSHARED='$(CC) -shared $(CCSHARED)'
9500 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009501 else
9502 case `uname -r` in
9503 [01].* | 2.[0-7] | 2.[0-7].*)
9504 LDSHARED="ld -Bshareable ${LDFLAGS}"
9505 ;;
9506 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009507 LDSHARED='$(CC) -shared $(CCSHARED)'
9508 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009509 ;;
9510 esac
9511 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009512 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009513 LDSHARED='$(CC) -shared'
9514 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009515 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009516 if test "$GCC" = "yes" ; then
9517 LDSHARED='$(CC) -shared'
9518 LDCXXSHARED='$(CXX) -shared'
9519 else
9520 LDSHARED='$(CC) -G'
9521 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009522 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009523 SCO_SV*)
9524 LDSHARED='$(CC) -Wl,-G,-Bexport'
9525 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9526 CYGWIN*)
9527 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9528 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009529 *) LDSHARED="ld";;
9530 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9533$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009534LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009535BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009536# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009537# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9539$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009540if test -z "$CCSHARED"
9541then
Guido van Rossum07397971997-04-29 21:49:50 +00009542 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009543 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009544 then CCSHARED="-fPIC";
9545 elif test `uname -p` = sparc;
9546 then CCSHARED="-xcode=pic32";
9547 else CCSHARED="-Kpic";
9548 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009549 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009550 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009551 else CCSHARED="+z";
9552 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009553 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009554 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009555 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009556 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009557 if test "$GCC" = "yes"
9558 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009559 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009560 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009561 SCO_SV*)
9562 if test "$GCC" = "yes"
9563 then CCSHARED="-fPIC"
9564 else CCSHARED="-Kpic -belf"
9565 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009566 VxWorks*)
9567 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009568 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9571$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009572# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009573# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9575$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009576if test -z "$LINKFORSHARED"
9577then
Guido van Rossum07397971997-04-29 21:49:50 +00009578 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009579 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009580 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009581 LINKFORSHARED="-Wl,-E -Wl,+s";;
9582# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009583 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009584 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009585 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009587 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009588
9589 # Issue #18075: the default maximum stack size (8MBytes) is too
9590 # small for the default recursion limit. Increase the stack size
9591 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009592 # Note: This matches the value of THREAD_STACK_SIZE in
9593 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009594 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9595
Jack Jansene578a632001-08-15 01:27:14 +00009596 if test "$enable_framework"
9597 then
Jack Jansenda49e192005-01-07 13:08:22 +00009598 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009599 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009600 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009601 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009602 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009603 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009604 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009605 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9606 then
9607 LINKFORSHARED="-Wl,--export-dynamic"
9608 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009609 SunOS/5*) case $CC in
9610 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009611 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009612 then
9613 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009614 fi;;
9615 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009616 CYGWIN*)
9617 if test $enable_shared = "no"
9618 then
9619 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9620 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009621 QNX*)
9622 # -Wl,-E causes the symbols to be added to the dynamic
9623 # symbol table so that they can be found when a module
9624 # is loaded. -N 2048K causes the stack size to be set
9625 # to 2048 kilobytes so that the stack doesn't overflow
9626 # when running test_compile.py.
9627 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009628 VxWorks*)
9629 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009630 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9633$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009634
Michael W. Hudson54241132001-12-07 15:38:26 +00009635
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009636
Matthias Kloseb9621712010-04-24 17:59:49 +00009637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9638$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009639if test ! "$LIBRARY" = "$LDLIBRARY"
9640then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009641 case $ac_sys_system in
9642 CYGWIN*)
9643 # Cygwin needs CCSHARED when building extension DLLs
9644 # but not when building the interpreter DLL.
9645 CFLAGSFORSHARED='';;
9646 *)
9647 CFLAGSFORSHARED='$(CCSHARED)'
9648 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9651$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009652
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009653# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9654# library (with --enable-shared).
9655# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009656# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9657# if it is not required, since it creates a dependency of the shared library
9658# to LIBS. This, in turn, means that applications linking the shared libpython
9659# don't need to link LIBS explicitly. The default should be only changed
9660# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009661
Matthias Kloseb9621712010-04-24 17:59:49 +00009662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9663$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009664case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009665 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009666 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009667esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9669$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009670
9671
Guido van Rossum627b2d71993-12-24 10:39:16 +00009672# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9674$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009675if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009676 $as_echo_n "(cached) " >&6
9677else
9678 ac_check_lib_save_LIBS=$LIBS
9679LIBS="-lsendfile $LIBS"
9680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9681/* end confdefs.h. */
9682
9683/* Override any GCC internal prototype to avoid an error.
9684 Use char because int might match the return type of a GCC
9685 builtin and then its argument prototype would still apply. */
9686#ifdef __cplusplus
9687extern "C"
9688#endif
9689char sendfile ();
9690int
9691main ()
9692{
9693return sendfile ();
9694 ;
9695 return 0;
9696}
9697_ACEOF
9698if ac_fn_c_try_link "$LINENO"; then :
9699 ac_cv_lib_sendfile_sendfile=yes
9700else
9701 ac_cv_lib_sendfile_sendfile=no
9702fi
9703rm -f core conftest.err conftest.$ac_objext \
9704 conftest$ac_exeext conftest.$ac_ext
9705LIBS=$ac_check_lib_save_LIBS
9706fi
9707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9708$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009709if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009710 cat >>confdefs.h <<_ACEOF
9711#define HAVE_LIBSENDFILE 1
9712_ACEOF
9713
9714 LIBS="-lsendfile $LIBS"
9715
9716fi
9717
Matthias Kloseb9621712010-04-24 17:59:49 +00009718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9719$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009720if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009722else
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009724LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728/* Override any GCC internal prototype to avoid an error.
9729 Use char because int might match the return type of a GCC
9730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009731#ifdef __cplusplus
9732extern "C"
9733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009734char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009735int
9736main ()
9737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ;
9740 return 0;
9741}
9742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009745else
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748rm -f core conftest.err conftest.$ac_objext \
9749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009750LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9753$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009754if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 cat >>confdefs.h <<_ACEOF
9756#define HAVE_LIBDL 1
9757_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009758
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009759 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009760
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009761fi
9762 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9764$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009765if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009766 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009767else
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009769LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773/* Override any GCC internal prototype to avoid an error.
9774 Use char because int might match the return type of a GCC
9775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009776#ifdef __cplusplus
9777extern "C"
9778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009779char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009780int
9781main ()
9782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009784 ;
9785 return 0;
9786}
9787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009790else
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009793rm -f core conftest.err conftest.$ac_objext \
9794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9798$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009799if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 cat >>confdefs.h <<_ACEOF
9801#define HAVE_LIBDLD 1
9802_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009803
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009804 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009806fi
9807 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009808
Michael Felt0d3ccb42017-12-30 22:39:20 +01009809# checks for uuid.h location
9810for ac_header in uuid/uuid.h uuid.h
9811do :
9812 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9813ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9814if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9815 cat >>confdefs.h <<_ACEOF
9816#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9817_ACEOF
9818
9819fi
9820
9821done
9822
9823
Berker Peksag9a10ff42017-11-08 23:09:16 +03009824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9825$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9827/* end confdefs.h. */
9828#include <uuid/uuid.h>
9829int
9830main ()
9831{
9832
9833#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009834void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009835#endif
9836
9837 ;
9838 return 0;
9839}
9840_ACEOF
9841if ac_fn_c_try_compile "$LINENO"; then :
9842
9843$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9844
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9846$as_echo "yes" >&6; }
9847else
9848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9849$as_echo "no" >&6; }
9850
9851fi
9852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9853
Michael Felt0d3ccb42017-12-30 22:39:20 +01009854# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009855# FreeBSD and OpenBSD provides support as well
9856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9857$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9859/* end confdefs.h. */
9860#include <uuid.h>
9861int
9862main ()
9863{
9864
9865#ifndef uuid_create
9866void *x = uuid_create
9867#endif
9868
9869 ;
9870 return 0;
9871}
9872_ACEOF
9873if ac_fn_c_try_compile "$LINENO"; then :
9874
9875$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9876
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9878$as_echo "yes" >&6; }
9879else
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
9882
9883fi
9884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9885
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009886# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9887# stream in big-endian byte-order
9888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9889$as_echo_n "checking for uuid_enc_be... " >&6; }
9890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9891/* end confdefs.h. */
9892#include <uuid.h>
9893int
9894main ()
9895{
9896
9897#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009898void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009899#endif
9900
9901 ;
9902 return 0;
9903}
9904_ACEOF
9905if ac_fn_c_try_compile "$LINENO"; then :
9906
9907$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9908
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9910$as_echo "yes" >&6; }
9911else
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913$as_echo "no" >&6; }
9914
9915fi
9916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9917
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009918# 'Real Time' functions on Solaris
9919# posix4 on Solaris 2.6
9920# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009922$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009923if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009925else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009926 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930/* Override any GCC internal prototype to avoid an error.
9931 Use char because int might match the return type of a GCC
9932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009933#ifdef __cplusplus
9934extern "C"
9935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009936char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009937int
9938main ()
9939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009940return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009941 ;
9942 return 0;
9943}
9944_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009945for ac_lib in '' pthread rt posix4; do
9946 if test -z "$ac_lib"; then
9947 ac_res="none required"
9948 else
9949 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009950 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009951 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009955rm -f core conftest.err conftest.$ac_objext \
9956 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009957 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009958 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009960done
Victor Stinnere0be4232011-10-25 13:06:09 +02009961if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009963else
9964 ac_cv_search_sem_init=no
9965fi
9966rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009967LIBS=$ac_func_search_save_LIBS
9968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9970$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009972if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009973 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009974
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009975fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009976
Martin v. Löwis519adae2003-09-20 10:47:47 +00009977
Martin v. Löwis19d17342003-06-14 21:03:05 +00009978# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9980$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009981if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009983else
9984 ac_check_lib_save_LIBS=$LIBS
9985LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009987/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009989/* Override any GCC internal prototype to avoid an error.
9990 Use char because int might match the return type of a GCC
9991 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009992#ifdef __cplusplus
9993extern "C"
9994#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009995char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009996int
9997main ()
9998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009999return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010000 ;
10001 return 0;
10002}
10003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010005 ac_cv_lib_intl_textdomain=yes
10006else
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010009rm -f core conftest.err conftest.$ac_objext \
10010 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010011LIBS=$ac_check_lib_save_LIBS
10012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10014$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010015if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010016
Matthias Kloseb9621712010-04-24 17:59:49 +000010017$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010018
Brett Cannonc6d936e2009-06-07 20:09:53 +000010019 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010020fi
10021
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010022
10023# checks for system dependent C++ extensions support
10024case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010025 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10026$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010028/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010029
Georg Brandl59e87bd2011-02-15 19:48:59 +000010030 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010031int
10032main ()
10033{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010034loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010035 ;
10036 return 0;
10037}
Matthias Kloseb159a552010-04-25 21:00:44 +000010038
Martin v. Löwis11437992002-04-12 09:54:03 +000010039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010040if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010041
Matthias Kloseb159a552010-04-25 21:00:44 +000010042
Matthias Kloseb9621712010-04-24 17:59:49 +000010043$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010044
Matthias Kloseb159a552010-04-25 21:00:44 +000010045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010046$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010047
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010048else
Matthias Kloseb159a552010-04-25 21:00:44 +000010049
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010051$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010052
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010054rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010055 conftest$ac_exeext conftest.$ac_ext
10056# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10057# of the AIX system used to build/package Python executable. This tag serves
10058# as a baseline for bdist module packages
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10060$as_echo_n "checking for the system builddate... " >&6; }
10061 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10062
10063cat >>confdefs.h <<_ACEOF
10064#define AIX_BUILDDATE $AIX_BUILDDATE
10065_ACEOF
10066
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10068$as_echo "$AIX_BUILDDATE" >&6; }
10069 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010070 *) ;;
10071esac
10072
Christian Heimes985ecdc2013-11-20 11:46:18 +010010073# check for systems that require aligned memory access
10074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10075$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010076if ${ac_cv_aligned_required+:} false; then :
10077 $as_echo_n "(cached) " >&6
10078else
10079 if test "$cross_compiling" = yes; then :
10080 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010081else
10082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10083/* end confdefs.h. */
10084
10085int main()
10086{
10087 char s[16];
10088 int i, *p1, *p2;
10089 for (i=0; i < 16; i++)
10090 s[i] = i;
10091 p1 = (int*)(s+1);
10092 p2 = (int*)(s+2);
10093 if (*p1 == *p2)
10094 return 1;
10095 return 0;
10096}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010097_ACEOF
10098if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010099 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010100else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010101 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010102fi
10103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10104 conftest.$ac_objext conftest.beam conftest.$ac_ext
10105fi
10106
10107
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010108fi
10109
10110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10111$as_echo "$ac_cv_aligned_required" >&6; }
10112if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010113
10114$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10115
10116fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010117
10118# str, bytes and memoryview hash algorithm
10119
10120
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10122$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10123
10124# Check whether --with-hash_algorithm was given.
10125if test "${with_hash_algorithm+set}" = set; then :
10126 withval=$with_hash_algorithm;
10127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10128$as_echo "$withval" >&6; }
10129case "$withval" in
10130 siphash24)
10131 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10132
10133 ;;
10134 fnv)
10135 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10136
10137 ;;
10138 *)
10139 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10140 ;;
10141esac
10142
10143else
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10145$as_echo "default" >&6; }
10146fi
10147
10148
Charles-François Natalid30b0222014-05-08 23:08:51 +010010149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10150$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10151
10152# Check whether --with-address_sanitizer was given.
10153if test "${with_address_sanitizer+set}" = set; then :
10154 withval=$with_address_sanitizer;
10155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10156$as_echo "$withval" >&6; }
10157BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10158LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010159# ASan works by controlling memory allocation, our own malloc interferes.
10160with_pymalloc="no"
10161
10162else
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10164$as_echo "no" >&6; }
10165fi
10166
10167
10168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10169$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10170
10171# Check whether --with-memory_sanitizer was given.
10172if test "${with_memory_sanitizer+set}" = set; then :
10173 withval=$with_memory_sanitizer;
10174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10175$as_echo "$withval" >&6; }
10176BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10177LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10178# MSan works by controlling memory allocation, our own malloc interferes.
10179with_pymalloc="no"
10180
10181else
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10183$as_echo "no" >&6; }
10184fi
10185
10186
10187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10188$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10189
10190# Check whether --with-undefined_behavior_sanitizer was given.
10191if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10192 withval=$with_undefined_behavior_sanitizer;
10193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10194$as_echo "$withval" >&6; }
10195BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10196LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010197
10198else
10199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10200$as_echo "no" >&6; }
10201fi
10202
10203
Guido van Rossum70c7f481998-03-26 18:44:10 +000010204# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10206$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010207if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010209else
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010211LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215/* Override any GCC internal prototype to avoid an error.
10216 Use char because int might match the return type of a GCC
10217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010218#ifdef __cplusplus
10219extern "C"
10220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010221char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010222int
10223main ()
10224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010225return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 ;
10227 return 0;
10228}
10229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010230if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010231 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010232else
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010235rm -f core conftest.err conftest.$ac_objext \
10236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010237LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10240$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010241if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010242 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010243fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010244 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10246$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010247if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010249else
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010251LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255/* Override any GCC internal prototype to avoid an error.
10256 Use char because int might match the return type of a GCC
10257 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010258#ifdef __cplusplus
10259extern "C"
10260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010261char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010262int
10263main ()
10264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ;
10267 return 0;
10268}
10269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010270if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010272else
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010275rm -f core conftest.err conftest.$ac_objext \
10276 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010277LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10280$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010281if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010282 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010283fi
10284 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010285
Matthias Kloseb9621712010-04-24 17:59:49 +000010286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10287$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010290if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10293$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010294LIBS="$withval $LIBS"
10295
10296else
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299fi
10300
Guido van Rossum7f43da71994-08-01 12:15:30 +000010301
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010302
10303
10304
10305
10306
10307
Victor Stinnerb477d192020-01-22 22:48:16 +010010308
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010309if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10310 if test -n "$ac_tool_prefix"; then
10311 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10312set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10314$as_echo_n "checking for $ac_word... " >&6; }
10315if ${ac_cv_path_PKG_CONFIG+:} false; then :
10316 $as_echo_n "(cached) " >&6
10317else
10318 case $PKG_CONFIG in
10319 [\\/]* | ?:[\\/]*)
10320 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10321 ;;
10322 *)
10323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10324for as_dir in $PATH
10325do
10326 IFS=$as_save_IFS
10327 test -z "$as_dir" && as_dir=.
10328 for ac_exec_ext in '' $ac_executable_extensions; do
10329 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10330 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10331 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10332 break 2
10333 fi
10334done
10335 done
10336IFS=$as_save_IFS
10337
10338 ;;
10339esac
10340fi
10341PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10342if test -n "$PKG_CONFIG"; then
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10344$as_echo "$PKG_CONFIG" >&6; }
10345else
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347$as_echo "no" >&6; }
10348fi
10349
10350
10351fi
10352if test -z "$ac_cv_path_PKG_CONFIG"; then
10353 ac_pt_PKG_CONFIG=$PKG_CONFIG
10354 # Extract the first word of "pkg-config", so it can be a program name with args.
10355set dummy pkg-config; ac_word=$2
10356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10357$as_echo_n "checking for $ac_word... " >&6; }
10358if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10359 $as_echo_n "(cached) " >&6
10360else
10361 case $ac_pt_PKG_CONFIG in
10362 [\\/]* | ?:[\\/]*)
10363 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10364 ;;
10365 *)
10366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10367for as_dir in $PATH
10368do
10369 IFS=$as_save_IFS
10370 test -z "$as_dir" && as_dir=.
10371 for ac_exec_ext in '' $ac_executable_extensions; do
10372 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10373 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10374 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10375 break 2
10376 fi
10377done
10378 done
10379IFS=$as_save_IFS
10380
10381 ;;
10382esac
10383fi
10384ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10385if test -n "$ac_pt_PKG_CONFIG"; then
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10387$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10388else
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
10391fi
10392
10393 if test "x$ac_pt_PKG_CONFIG" = x; then
10394 PKG_CONFIG=""
10395 else
10396 case $cross_compiling:$ac_tool_warned in
10397yes:)
10398{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10399$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10400ac_tool_warned=yes ;;
10401esac
10402 PKG_CONFIG=$ac_pt_PKG_CONFIG
10403 fi
10404else
10405 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10406fi
10407
10408fi
10409if test -n "$PKG_CONFIG"; then
10410 _pkg_min_version=0.9.0
10411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10412$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10413 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10415$as_echo "yes" >&6; }
10416 else
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
10419 PKG_CONFIG=""
10420 fi
10421fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010422
10423# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10425$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010426
10427# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010428if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010429 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010430else
10431 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010432fi
10433
10434
Matthias Kloseb9621712010-04-24 17:59:49 +000010435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10436$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010437
10438# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10440$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010441
10442# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010444 withval=$with_system_ffi;
10445fi
10446
10447
Zachary Waref40d4dd2016-09-17 01:25:24 -050010448if test "$ac_sys_system" = "Darwin"
10449then
10450 case "$with_system_ffi" in
10451 "")
10452 with_system_ffi="no"
10453 ;;
10454 yes|no)
10455 ;;
10456 *)
10457 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10458 ;;
10459 esac
10460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10461$as_echo "$with_system_ffi" >&6; }
10462else
10463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10464$as_echo "yes" >&6; }
10465 if test "$with_system_ffi" != ""
10466 then
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10468$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10469 fi
10470 with_system_ffi="yes"
10471fi
Zachary Ware935043d2016-09-09 17:01:21 -070010472
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010473if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010474 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10475else
10476 LIBFFI_INCLUDEDIR=""
10477fi
10478
10479
Stefan Krah60187b52012-03-23 19:06:27 +010010480# Check for use of the system libmpdec library
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10482$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10483
10484# Check whether --with-system_libmpdec was given.
10485if test "${with_system_libmpdec+set}" = set; then :
10486 withval=$with_system_libmpdec;
10487else
10488 with_system_libmpdec="no"
10489fi
10490
10491
10492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10493$as_echo "$with_system_libmpdec" >&6; }
10494
Stefan Krah815280e2020-02-29 19:43:42 +010010495# Check whether _decimal should use a coroutine-local or thread-local context
10496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10497$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10498
10499# Check whether --with-decimal_contextvar was given.
10500if test "${with_decimal_contextvar+set}" = set; then :
10501 withval=$with_decimal_contextvar;
10502else
10503 with_decimal_contextvar="yes"
10504fi
10505
10506
10507if test "$with_decimal_contextvar" != "no"
10508then
10509
10510$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10511
10512fi
10513
10514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10515$as_echo "$with_decimal_contextvar" >&6; }
10516
Benjamin Peterson076ed002010-10-31 17:11:02 +000010517# Check for support for loadable sqlite extensions
10518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10519$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10520# Check whether --enable-loadable-sqlite-extensions was given.
10521if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10522 enableval=$enable_loadable_sqlite_extensions;
10523else
10524 enable_loadable_sqlite_extensions="no"
10525fi
10526
10527
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10529$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10530
Ned Deilyd819b932013-09-06 01:07:05 -070010531# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10532
10533
10534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10535$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10536
10537# Check whether --with-tcltk-includes was given.
10538if test "${with_tcltk_includes+set}" = set; then :
10539 withval=$with_tcltk_includes;
10540else
10541 with_tcltk_includes="default"
10542fi
10543
10544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10545$as_echo "$with_tcltk_includes" >&6; }
10546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10547$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10548
10549# Check whether --with-tcltk-libs was given.
10550if test "${with_tcltk_libs+set}" = set; then :
10551 withval=$with_tcltk_libs;
10552else
10553 with_tcltk_libs="default"
10554fi
10555
10556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10557$as_echo "$with_tcltk_libs" >&6; }
10558if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10559then
10560 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10561 then
10562 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10563 fi
10564 TCLTK_INCLUDES=""
10565 TCLTK_LIBS=""
10566else
10567 TCLTK_INCLUDES="$with_tcltk_includes"
10568 TCLTK_LIBS="$with_tcltk_libs"
10569fi
10570
Matthias Klose55708cc2009-04-30 08:06:49 +000010571# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10573$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010574
10575# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010576if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010577 withval=$with_dbmliborder;
10578if test x$with_dbmliborder = xyes
10579then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010580as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010581else
10582 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10583 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10584 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010585 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010586 fi
10587 done
10588fi
10589fi
10590
Matthias Kloseb9621712010-04-24 17:59:49 +000010591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10592$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010593
Martin v. Löwis11437992002-04-12 09:54:03 +000010594# Templates for things AC_DEFINEd more than once.
10595# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010596
10597
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010598if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010599then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010600 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010602
10603 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010604 if test "$ac_sys_system" = "SunOS"; then
10605 CFLAGS="$CFLAGS -D_REENTRANT"
10606 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010607elif test "$ac_cv_kpthread" = "yes"
10608then
10609 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010610 if test "$ac_cv_cxx_thread" = "yes"; then
10611 CXX="$CXX -Kpthread"
10612 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010613 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010614elif test "$ac_cv_kthread" = "yes"
10615then
10616 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010617 if test "$ac_cv_cxx_thread" = "yes"; then
10618 CXX="$CXX -Kthread"
10619 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010620 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010621elif test "$ac_cv_pthread" = "yes"
10622then
10623 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010624 if test "$ac_cv_cxx_thread" = "yes"; then
10625 CXX="$CXX -pthread"
10626 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010627 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010628else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010629 if test ! -z "$withval" -a -d "$withval"
10630 then LDFLAGS="$LDFLAGS -L$withval"
10631 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010632
10633 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010634 # define _POSIX_THREADS in unistd.h. Some apparently don't
10635 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10637$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010639/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010640
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010641#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010642#ifdef _POSIX_THREADS
10643yes
10644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010645
10646_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010647if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010649 unistd_defines_pthreads=yes
10650else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010651 unistd_defines_pthreads=no
10652fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010653rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010654
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10656$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010659
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010660 # Just looking for pthread_create in libpthread is not enough:
10661 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10662 # So we really have to include pthread.h, and then link.
10663 _libs=$LIBS
10664 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10666$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010668/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010669
10670#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010671#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010672
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010673void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010674int
10675main ()
10676{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010677
10678pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 ;
10680 return 0;
10681}
10682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010684
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10686$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010687 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010688
Guido van Rossum02a1c402000-02-25 19:26:31 +000010689else
Martin v. Löwis11437992002-04-12 09:54:03 +000010690
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010691 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010693if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010694
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010695 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010696
Guido van Rossumad678af1998-10-02 14:42:15 +000010697else
Guido van Rossumad678af1998-10-02 14:42:15 +000010698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10700$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010701if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010703else
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010705LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709/* Override any GCC internal prototype to avoid an error.
10710 Use char because int might match the return type of a GCC
10711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010712#ifdef __cplusplus
10713extern "C"
10714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010715char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010716int
10717main ()
10718{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010720 ;
10721 return 0;
10722}
10723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010725 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010726else
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010729rm -f core conftest.err conftest.$ac_objext \
10730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010731LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10734$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010735if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010736
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010737 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010738 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010739
Greg Steinadf63d62000-07-05 10:38:09 +000010740else
Greg Steinadf63d62000-07-05 10:38:09 +000010741
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10743$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010744if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010746else
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010748LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752/* Override any GCC internal prototype to avoid an error.
10753 Use char because int might match the return type of a GCC
10754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010755#ifdef __cplusplus
10756extern "C"
10757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010758char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010759int
10760main ()
10761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 ;
10764 return 0;
10765}
10766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010768 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010769else
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010772rm -f core conftest.err conftest.$ac_objext \
10773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010774LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10777$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010778if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010779
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010780 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010781 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010782
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010783else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010784
Matthias Kloseb9621712010-04-24 17:59:49 +000010785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10786$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010787if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010789else
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010791LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795/* Override any GCC internal prototype to avoid an error.
10796 Use char because int might match the return type of a GCC
10797 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010798#ifdef __cplusplus
10799extern "C"
10800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010801char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010802int
10803main ()
10804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010805return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010806 ;
10807 return 0;
10808}
10809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010810if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010811 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010812else
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010815rm -f core conftest.err conftest.$ac_objext \
10816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010817LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10820$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010821if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010822
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010823 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010824 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010825
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010826else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10829$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010830if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010832else
Martin v. Löwis11437992002-04-12 09:54:03 +000010833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010834LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010838/* Override any GCC internal prototype to avoid an error.
10839 Use char because int might match the return type of a GCC
10840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010841#ifdef __cplusplus
10842extern "C"
10843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010844char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010845int
10846main ()
10847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010848return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010849 ;
10850 return 0;
10851}
10852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010854 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010855else
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010858rm -f core conftest.err conftest.$ac_objext \
10859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010860LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10863$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010864if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010865
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010866 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010867 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010868
Guido van Rossumb93a8621998-05-07 13:27:32 +000010869else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010870
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010871 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10872
Guido van Rossum2d38f911996-06-26 19:47:01 +000010873fi
10874
Guido van Rossum627b2d71993-12-24 10:39:16 +000010875
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010876fi
10877
Guido van Rossum0be3e491997-05-22 20:33:33 +000010878fi
10879
Guido van Rossum49545951997-12-02 19:28:29 +000010880fi
10881
Guido van Rossumb93a8621998-05-07 13:27:32 +000010882fi
10883
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010885rm -f core conftest.err conftest.$ac_objext \
10886 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010887
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10889$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010890if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010891 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010892else
Martin v. Löwis11437992002-04-12 09:54:03 +000010893 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010894LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010898/* Override any GCC internal prototype to avoid an error.
10899 Use char because int might match the return type of a GCC
10900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010901#ifdef __cplusplus
10902extern "C"
10903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010904char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010905int
10906main ()
10907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010908return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 ;
10910 return 0;
10911}
10912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010913if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010914 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010915else
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010918rm -f core conftest.err conftest.$ac_objext \
10919 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010920LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10923$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010924if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010925
Martin v. Löwis130fb172001-07-19 11:00:41 +000010926 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010927
Guido van Rossum627b2d71993-12-24 10:39:16 +000010928fi
10929
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010930
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010931fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010932
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010933if test "$posix_threads" = "yes"; then
10934 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010937
10938 fi
10939
10940 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10941 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010942 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010943$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010944
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010945 ;;
10946 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010947$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010948
10949 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010950 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010951$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010952
10953 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010954 esac
10955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10957$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010958 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010960else
Matthias Kloseb9621712010-04-24 17:59:49 +000010961 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010962 ac_cv_pthread_system_supported=no
10963else
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010965/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010966
10967 #include <stdio.h>
10968 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010969 void *foo(void *parm) {
10970 return NULL;
10971 }
10972 main() {
10973 pthread_attr_t attr;
10974 pthread_t id;
10975 if (pthread_attr_init(&attr)) exit(-1);
10976 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10977 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10978 exit(0);
10979 }
10980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010981if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010982 ac_cv_pthread_system_supported=yes
10983else
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10987 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010988fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990
Guido van Rossum627b2d71993-12-24 10:39:16 +000010991fi
10992
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10994$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010995 if test "$ac_cv_pthread_system_supported" = "yes"; then
10996
Matthias Kloseb9621712010-04-24 17:59:49 +000010997$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010998
10999 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 for ac_func in pthread_sigmask
11001do :
11002 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011003if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011004 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011005#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011006_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011007 case $ac_sys_system in
11008 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011009
Matthias Kloseb9621712010-04-24 17:59:49 +000011010$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011011
11012 ;;
11013 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011014fi
11015done
11016
pdoxe14679c2017-10-05 00:01:56 -070011017 for ac_func in pthread_getcpuclockid
11018do :
11019 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11020if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11021 cat >>confdefs.h <<_ACEOF
11022#define HAVE_PTHREAD_GETCPUCLOCKID 1
11023_ACEOF
11024
11025fi
11026done
11027
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011028fi
11029
11030
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011032
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11034$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011035# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011036if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011038 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11040$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011041 ipv6=no
11042 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11044$as_echo "yes" >&6; }
11045 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046
11047 ipv6=yes
11048 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050else
Martin v. Löwis11437992002-04-12 09:54:03 +000011051
Matthias Kloseb9621712010-04-24 17:59:49 +000011052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011053/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011054 /* AF_INET6 available check */
11055#include <sys/types.h>
11056#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011057int
11058main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011060int domain = AF_INET6;
11061 ;
11062 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011063}
Martin v. Löwis11437992002-04-12 09:54:03 +000011064_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011065if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011066
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11068$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011069 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011070
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071else
Matthias Kloseb159a552010-04-25 21:00:44 +000011072
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11074$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011076
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011077fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011079
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011080if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11082$as_echo_n "checking if RFC2553 API is available... " >&6; }
11083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011084/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011085
11086 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011087#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011088int
11089main ()
11090{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011091struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011092 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011093 ;
11094 return 0;
11095}
Matthias Kloseb159a552010-04-25 21:00:44 +000011096
Martin v. Löwis11437992002-04-12 09:54:03 +000011097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011098if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011099
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011101$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011102 ipv6=yes
11103
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011104else
Matthias Kloseb159a552010-04-25 21:00:44 +000011105
11106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011107$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011108 ipv6=no
11109
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011112fi
11113
11114if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011116
11117fi
11118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011119fi
11120
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121
11122ipv6type=unknown
11123ipv6lib=none
11124ipv6trylibc=no
11125
11126if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11128$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011129 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11130 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131 case $i in
11132 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011134/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011135
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011136#include <netinet/in.h>
11137#ifdef IPV6_INRIA_VERSION
11138yes
11139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011140_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011142 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011143 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011145rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011146
11147 ;;
11148 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011150/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011151
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011152#include <netinet/in.h>
11153#ifdef __KAME__
11154yes
11155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011156_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011159 ipv6type=$i;
11160 ipv6lib=inet6
11161 ipv6libdir=/usr/local/v6/lib
11162 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011163fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011164rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011165
11166 ;;
11167 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011169/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011170
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011171#include <features.h>
11172#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11173yes
11174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011175_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011177 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011178 ipv6type=$i;
11179 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011180fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011181rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011182
11183 ;;
11184 linux-inet6)
11185 if test -d /usr/inet6; then
11186 ipv6type=$i
11187 ipv6lib=inet6
11188 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011189 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011190 fi
11191 ;;
11192 solaris)
11193 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011194 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011195 ipv6type=$i
11196 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011197 fi
11198 fi
11199 ;;
11200 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011202/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011203
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011204#include <sys/param.h>
11205#ifdef _TOSHIBA_INET6
11206yes
11207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011208_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011209if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011211 ipv6type=$i;
11212 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011213 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011214fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011215rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011216
11217 ;;
11218 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011221
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011222#include </usr/local/v6/include/sys/v6config.h>
11223#ifdef __V6D__
11224yes
11225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011226_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011228 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011229 ipv6type=$i;
11230 ipv6lib=v6;
11231 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011232 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011233fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011234rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011235
11236 ;;
11237 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011239/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011240
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011241#include <sys/param.h>
11242#ifdef _ZETA_MINAMI_INET6
11243yes
11244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011245_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011248 ipv6type=$i;
11249 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011250 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011251fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011252rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011253
11254 ;;
11255 esac
11256 if test "$ipv6type" != "unknown"; then
11257 break
11258 fi
11259 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11261$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011262fi
11263
11264if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11265 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11266 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11267 echo "using lib$ipv6lib"
11268 else
11269 if test $ipv6trylibc = "yes"; then
11270 echo "using libc"
11271 else
11272 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11273 echo "You need to fetch lib$ipv6lib.a from appropriate"
11274 echo 'ipv6 kit and compile beforehand.'
11275 exit 1
11276 fi
11277 fi
11278fi
11279
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11281$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11283/* end confdefs.h. */
11284 /* CAN_RAW_FD_FRAMES available check */
11285#include <linux/can/raw.h>
11286int
11287main ()
11288{
11289int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294if ac_fn_c_try_compile "$LINENO"; then :
11295
11296
11297$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11298
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11300$as_echo "yes" >&6; }
11301
11302else
11303
11304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305$as_echo "no" >&6; }
11306
11307fi
11308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11309
Zackery Spytz97e0de02020-04-09 06:03:49 -060011310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11311$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11313/* end confdefs.h. */
11314
11315#include <linux/can/raw.h>
11316int
11317main ()
11318{
11319int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11320 ;
11321 return 0;
11322}
11323_ACEOF
11324if ac_fn_c_try_compile "$LINENO"; then :
11325
11326
11327$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11328
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11330$as_echo "yes" >&6; }
11331
11332else
11333
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
11336
11337fi
11338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11339
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011340# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11342$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011344# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011345if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011346 withval=$with_doc_strings;
11347fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011348
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011349
11350if test -z "$with_doc_strings"
11351then with_doc_strings="yes"
11352fi
11353if test "$with_doc_strings" != "no"
11354then
11355
Matthias Kloseb9621712010-04-24 17:59:49 +000011356$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011357
11358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11360$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011361
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011362# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11364$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011367if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011368 withval=$with_pymalloc;
11369fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011370
Neil Schemenauera35c6882001-02-27 04:45:05 +000011371
Neil Schemenauer16c22972002-03-22 15:34:49 +000011372if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011373then
11374 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011375fi
11376if test "$with_pymalloc" != "no"
11377then
Martin v. Löwis11437992002-04-12 09:54:03 +000011378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011380
11381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11383$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011384
Nick Coghlan6ea41862017-06-11 13:16:15 +100011385# Check for --with-c-locale-coercion
11386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11387$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11388
11389# Check whether --with-c-locale-coercion was given.
11390if test "${with_c_locale_coercion+set}" = set; then :
11391 withval=$with_c_locale_coercion;
11392fi
11393
11394
11395if test -z "$with_c_locale_coercion"
11396then
11397 with_c_locale_coercion="yes"
11398fi
11399if test "$with_c_locale_coercion" != "no"
11400then
11401
11402$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11403
11404fi
11405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11406$as_echo "$with_c_locale_coercion" >&6; }
11407
Benjamin Peterson05159c42009-12-03 03:01:27 +000011408# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11410$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011411
11412# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011413if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011414 withval=$with_valgrind;
11415else
11416 with_valgrind=no
11417fi
11418
Matthias Kloseb9621712010-04-24 17:59:49 +000011419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11420$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011421if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011422 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 +020011423if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011424
Matthias Kloseb9621712010-04-24 17:59:49 +000011425$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011426
11427else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011428 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011429
11430fi
11431
11432
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011433 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011434fi
11435
Łukasz Langaa785c872016-09-09 17:37:37 -070011436# Check for DTrace support
11437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11438$as_echo_n "checking for --with-dtrace... " >&6; }
11439
11440# Check whether --with-dtrace was given.
11441if test "${with_dtrace+set}" = set; then :
11442 withval=$with_dtrace;
11443else
11444 with_dtrace=no
11445fi
11446
11447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11448$as_echo "$with_dtrace" >&6; }
11449
11450
11451
11452
11453
11454DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011455DTRACE_HEADERS=
11456DTRACE_OBJS=
11457
11458if test "$with_dtrace" = "yes"
11459then
11460 # Extract the first word of "dtrace", so it can be a program name with args.
11461set dummy dtrace; ac_word=$2
11462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11463$as_echo_n "checking for $ac_word... " >&6; }
11464if ${ac_cv_path_DTRACE+:} false; then :
11465 $as_echo_n "(cached) " >&6
11466else
11467 case $DTRACE in
11468 [\\/]* | ?:[\\/]*)
11469 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11470 ;;
11471 *)
11472 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11473for as_dir in $PATH
11474do
11475 IFS=$as_save_IFS
11476 test -z "$as_dir" && as_dir=.
11477 for ac_exec_ext in '' $ac_executable_extensions; do
11478 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11479 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11480 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11481 break 2
11482 fi
11483done
11484 done
11485IFS=$as_save_IFS
11486
11487 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11488 ;;
11489esac
11490fi
11491DTRACE=$ac_cv_path_DTRACE
11492if test -n "$DTRACE"; then
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11494$as_echo "$DTRACE" >&6; }
11495else
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11497$as_echo "no" >&6; }
11498fi
11499
11500
11501 if test "$DTRACE" = "not found"; then
11502 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11503 fi
11504
11505$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11506
11507 DTRACE_HEADERS="Include/pydtrace_probes.h"
11508
11509 # On OS X, DTrace providers do not need to be explicitly compiled and
11510 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11511 # generation flag '-G'. We check for presence of this flag, rather than
11512 # hardcoding support by OS, in the interest of robustness.
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11514$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11515if ${ac_cv_dtrace_link+:} false; then :
11516 $as_echo_n "(cached) " >&6
11517else
11518 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011519 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011520 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011521 ac_cv_dtrace_link=yes
11522
11523fi
11524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11525$as_echo "$ac_cv_dtrace_link" >&6; }
11526 if test "$ac_cv_dtrace_link" = "yes"; then
11527 DTRACE_OBJS="Python/pydtrace.o"
11528 fi
11529fi
11530
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011531# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011532
Guido van Rossum98935bf2001-09-05 19:13:16 +000011533DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011534
Guido van Rossume97ee181999-12-20 21:27:22 +000011535# the dlopen() function means we might want to use dynload_shlib.o. some
11536# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011537for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011538do :
11539 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011540if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011542#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011543_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011544
Guido van Rossume97ee181999-12-20 21:27:22 +000011545fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011546done
Guido van Rossume97ee181999-12-20 21:27:22 +000011547
Michael W. Hudson54241132001-12-07 15:38:26 +000011548
Guido van Rossume97ee181999-12-20 21:27:22 +000011549# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11550# loading of modules.
11551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11553$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011554if test -z "$DYNLOADFILE"
11555then
11556 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011557 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11558 if test "$ac_cv_func_dlopen" = yes
11559 then DYNLOADFILE="dynload_shlib.o"
11560 else DYNLOADFILE="dynload_aix.o"
11561 fi
11562 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011563 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011564 *)
11565 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11566 # out any dynamic loading
11567 if test "$ac_cv_func_dlopen" = yes
11568 then DYNLOADFILE="dynload_shlib.o"
11569 else DYNLOADFILE="dynload_stub.o"
11570 fi
11571 ;;
11572 esac
11573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11575$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011576if test "$DYNLOADFILE" != "dynload_stub.o"
11577then
Martin v. Löwis11437992002-04-12 09:54:03 +000011578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011580
11581fi
11582
Neil Schemenauer4e425612001-06-19 15:44:15 +000011583# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11584
Michael W. Hudson54241132001-12-07 15:38:26 +000011585
Matthias Kloseb9621712010-04-24 17:59:49 +000011586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11587$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011588if test -z "$MACHDEP_OBJS"
11589then
Jack Jansene578a632001-08-15 01:27:14 +000011590 MACHDEP_OBJS=$extra_machdep_objs
11591else
11592 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011593fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011594if test -z "$MACHDEP_OBJS"; then
11595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11596$as_echo "none" >&6; }
11597else
11598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11599$as_echo "$MACHDEP_OBJS" >&6; }
11600fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011601
Guido van Rossum627b2d71993-12-24 10:39:16 +000011602# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011603for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011604 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11605 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011606 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011607 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011608 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011609 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011610 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011611 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011612 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011613 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011614 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011615 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011616 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011617 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011618 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011619 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011620 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011621 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11622 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011623 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011624 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011625 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011626 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011627 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011628do :
11629 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11630ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011631if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011632 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011633#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011634_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011635
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011636fi
11637done
11638
Michael W. Hudson54241132001-12-07 15:38:26 +000011639
Benjamin Peterson40caa052018-09-12 15:52:40 -070011640# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11641# links. Some libc implementations have a stub lchmod implementation that always
11642# returns an error.
11643if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011644 for ac_func in lchmod
11645do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011646 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11647if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011648 cat >>confdefs.h <<_ACEOF
11649#define HAVE_LCHMOD 1
11650_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011651
11652fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011653done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011654
11655fi
11656
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011657ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11658 #include <dirent.h>
11659"
11660if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11661
11662$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11663
11664fi
11665
11666
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011667# For some functions, having a definition is not sufficient, since
11668# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11670$as_echo_n "checking for chroot... " >&6; }
11671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011672/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011673#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011674int
11675main ()
11676{
11677void *x=chroot
11678 ;
11679 return 0;
11680}
11681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011682if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011685
Matthias Kloseb159a552010-04-25 21:00:44 +000011686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011687$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011688else
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11690$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011691
11692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11695$as_echo_n "checking for link... " >&6; }
11696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011697/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011698#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011699int
11700main ()
11701{
11702void *x=link
11703 ;
11704 return 0;
11705}
11706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011710
Matthias Kloseb159a552010-04-25 21:00:44 +000011711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011712$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011713else
Matthias Kloseb9621712010-04-24 17:59:49 +000011714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11715$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011716
11717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11720$as_echo_n "checking for symlink... " >&6; }
11721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011722/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011723#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011724int
11725main ()
11726{
11727void *x=symlink
11728 ;
11729 return 0;
11730}
11731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011733
Matthias Kloseb9621712010-04-24 17:59:49 +000011734$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011735
Matthias Kloseb159a552010-04-25 21:00:44 +000011736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011737$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011738else
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11740$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011741
11742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11745$as_echo_n "checking for fchdir... " >&6; }
11746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011747/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011748#include <unistd.h>
11749int
11750main ()
11751{
11752void *x=fchdir
11753 ;
11754 return 0;
11755}
11756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011757if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011758
Matthias Kloseb9621712010-04-24 17:59:49 +000011759$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011760
Matthias Kloseb159a552010-04-25 21:00:44 +000011761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011762$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011763else
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11765$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011766
11767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11770$as_echo_n "checking for fsync... " >&6; }
11771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011772/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011773#include <unistd.h>
11774int
11775main ()
11776{
11777void *x=fsync
11778 ;
11779 return 0;
11780}
11781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011782if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011785
Matthias Kloseb159a552010-04-25 21:00:44 +000011786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011787$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11790$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011791
11792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11795$as_echo_n "checking for fdatasync... " >&6; }
11796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011797/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011798#include <unistd.h>
11799int
11800main ()
11801{
11802void *x=fdatasync
11803 ;
11804 return 0;
11805}
11806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011808
Matthias Kloseb9621712010-04-24 17:59:49 +000011809$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011810
Matthias Kloseb159a552010-04-25 21:00:44 +000011811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011812$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011813else
Matthias Kloseb9621712010-04-24 17:59:49 +000011814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11815$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011816
11817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11820$as_echo_n "checking for epoll... " >&6; }
11821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011822/* end confdefs.h. */
11823#include <sys/epoll.h>
11824int
11825main ()
11826{
11827void *x=epoll_create
11828 ;
11829 return 0;
11830}
11831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011832if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011833
Matthias Kloseb9621712010-04-24 17:59:49 +000011834$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011835
Matthias Kloseb159a552010-04-25 21:00:44 +000011836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011837$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011838else
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11840$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011841
11842fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11845$as_echo_n "checking for epoll_create1... " >&6; }
11846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11847/* end confdefs.h. */
11848#include <sys/epoll.h>
11849int
11850main ()
11851{
11852void *x=epoll_create1
11853 ;
11854 return 0;
11855}
11856_ACEOF
11857if ac_fn_c_try_compile "$LINENO"; then :
11858
11859$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11860
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11862$as_echo "yes" >&6; }
11863else
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11865$as_echo "no" >&6; }
11866
11867fi
11868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11870$as_echo_n "checking for kqueue... " >&6; }
11871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011872/* end confdefs.h. */
11873
11874#include <sys/types.h>
11875#include <sys/event.h>
11876
11877int
11878main ()
11879{
11880int x=kqueue()
11881 ;
11882 return 0;
11883}
11884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011885if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011886
Matthias Kloseb9621712010-04-24 17:59:49 +000011887$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011888
Matthias Kloseb159a552010-04-25 21:00:44 +000011889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011890$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011891else
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11893$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011894
11895fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11898$as_echo_n "checking for prlimit... " >&6; }
11899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11900/* end confdefs.h. */
11901
11902#include <sys/time.h>
11903#include <sys/resource.h>
11904
11905int
11906main ()
11907{
11908void *x=prlimit
11909 ;
11910 return 0;
11911}
11912_ACEOF
11913if ac_fn_c_try_compile "$LINENO"; then :
11914
11915$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11916
11917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11918$as_echo "yes" >&6; }
11919else
11920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11921$as_echo "no" >&6; }
11922
11923fi
11924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11925
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11927$as_echo_n "checking for memfd_create... " >&6; }
11928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11929/* end confdefs.h. */
11930
11931#ifdef HAVE_SYS_MMAN_H
11932#include <sys/mman.h>
11933#endif
11934#ifdef HAVE_SYS_MEMFD_H
11935#include <sys/memfd.h>
11936#endif
11937
11938int
11939main ()
11940{
11941void *x=memfd_create
11942 ;
11943 return 0;
11944}
11945_ACEOF
11946if ac_fn_c_try_compile "$LINENO"; then :
11947
11948$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11949
11950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11951$as_echo "yes" >&6; }
11952else
11953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11954$as_echo "no" >&6; }
11955
11956fi
11957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11958
Martin v. Löwisd5843682002-11-21 20:41:28 +000011959# On some systems (eg. FreeBSD 5), we would find a definition of the
11960# functions ctermid_r, setgroups in the library, but no prototype
11961# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11962# address to avoid compiler warnings and potential miscompilations
11963# because of the missing prototypes.
11964
Matthias Kloseb9621712010-04-24 17:59:49 +000011965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11966$as_echo_n "checking for ctermid_r... " >&6; }
11967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011968/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011969
Martin v. Löwisd5843682002-11-21 20:41:28 +000011970#include <stdio.h>
11971
Martin v. Löwisd5843682002-11-21 20:41:28 +000011972int
11973main ()
11974{
11975void* p = ctermid_r
11976 ;
11977 return 0;
11978}
11979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011980if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011981
Matthias Kloseb9621712010-04-24 17:59:49 +000011982$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011983
Matthias Kloseb159a552010-04-25 21:00:44 +000011984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011985$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011986else
Matthias Kloseb9621712010-04-24 17:59:49 +000011987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11988$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011989
11990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11992
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11994$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011995if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011996 $as_echo_n "(cached) " >&6
11997else
11998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011999/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012000#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012001int
12002main ()
12003{
12004void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012005
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012006 ;
12007 return 0;
12008}
12009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012010if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012011 ac_cv_flock_decl=yes
12012else
12013 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012014
12015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012017
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012018fi
12019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12020$as_echo "$ac_cv_flock_decl" >&6; }
12021if test "x${ac_cv_flock_decl}" = xyes; then
12022 for ac_func in flock
12023do :
12024 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012025if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012026 cat >>confdefs.h <<_ACEOF
12027#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012028_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012029
Antoine Pitroua3000072010-09-07 14:52:42 +000012030else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012032$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012033if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012034 $as_echo_n "(cached) " >&6
12035else
12036 ac_check_lib_save_LIBS=$LIBS
12037LIBS="-lbsd $LIBS"
12038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12039/* end confdefs.h. */
12040
12041/* Override any GCC internal prototype to avoid an error.
12042 Use char because int might match the return type of a GCC
12043 builtin and then its argument prototype would still apply. */
12044#ifdef __cplusplus
12045extern "C"
12046#endif
12047char flock ();
12048int
12049main ()
12050{
12051return flock ();
12052 ;
12053 return 0;
12054}
12055_ACEOF
12056if ac_fn_c_try_link "$LINENO"; then :
12057 ac_cv_lib_bsd_flock=yes
12058else
12059 ac_cv_lib_bsd_flock=no
12060fi
12061rm -f core conftest.err conftest.$ac_objext \
12062 conftest$ac_exeext conftest.$ac_ext
12063LIBS=$ac_check_lib_save_LIBS
12064fi
12065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12066$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012067if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012068 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012069
12070
12071$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12072
12073
12074fi
12075
12076
12077fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012078done
12079
Antoine Pitroua3000072010-09-07 14:52:42 +000012080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012081
Matthias Kloseb9621712010-04-24 17:59:49 +000012082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12083$as_echo_n "checking for getpagesize... " >&6; }
12084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012085/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012086
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012087#include <unistd.h>
12088
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012089int
12090main ()
12091{
12092void* p = getpagesize
12093 ;
12094 return 0;
12095}
12096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012097if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012098
Matthias Kloseb9621712010-04-24 17:59:49 +000012099$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012100
Matthias Kloseb159a552010-04-25 21:00:44 +000012101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012102$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012103else
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12105$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012106
12107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012109
Victor Stinner984890f2011-11-24 13:53:38 +010012110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12111$as_echo_n "checking for broken unsetenv... " >&6; }
12112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12113/* end confdefs.h. */
12114
12115#include <stdlib.h>
12116
12117int
12118main ()
12119{
12120int res = unsetenv("DUMMY")
12121 ;
12122 return 0;
12123}
12124_ACEOF
12125if ac_fn_c_try_compile "$LINENO"; then :
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12127$as_echo "no" >&6; }
12128else
12129
12130$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12131
12132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12133$as_echo "yes" >&6; }
12134
12135fi
12136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12137
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012138for ac_prog in true
12139do
12140 # Extract the first word of "$ac_prog", so it can be a program name with args.
12141set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12143$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012146else
12147 if test -n "$TRUE"; then
12148 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12149else
12150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12151for as_dir in $PATH
12152do
12153 IFS=$as_save_IFS
12154 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012156 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012157 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 $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 +000012159 break 2
12160 fi
12161done
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012163IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012164
12165fi
12166fi
12167TRUE=$ac_cv_prog_TRUE
12168if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12170$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012171else
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12173$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012174fi
12175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012177 test -n "$TRUE" && break
12178done
12179test -n "$TRUE" || TRUE="/bin/true"
12180
12181
Matthias Kloseb9621712010-04-24 17:59:49 +000012182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12183$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012184if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012186else
12187 ac_check_lib_save_LIBS=$LIBS
12188LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012190/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012192/* Override any GCC internal prototype to avoid an error.
12193 Use char because int might match the return type of a GCC
12194 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012195#ifdef __cplusplus
12196extern "C"
12197#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012198char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012199int
12200main ()
12201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012202return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012203 ;
12204 return 0;
12205}
12206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012207if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012208 ac_cv_lib_c_inet_aton=yes
12209else
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012212rm -f core conftest.err conftest.$ac_objext \
12213 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012214LIBS=$ac_check_lib_save_LIBS
12215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12217$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012218if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012219 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012220else
Matthias Kloseb9621712010-04-24 17:59:49 +000012221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12222$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012223if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012224 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012225else
12226 ac_check_lib_save_LIBS=$LIBS
12227LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012229/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231/* Override any GCC internal prototype to avoid an error.
12232 Use char because int might match the return type of a GCC
12233 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012234#ifdef __cplusplus
12235extern "C"
12236#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012237char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012238int
12239main ()
12240{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012242 ;
12243 return 0;
12244}
12245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012247 ac_cv_lib_resolv_inet_aton=yes
12248else
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012251rm -f core conftest.err conftest.$ac_objext \
12252 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012253LIBS=$ac_check_lib_save_LIBS
12254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12256$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012257if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012258 cat >>confdefs.h <<_ACEOF
12259#define HAVE_LIBRESOLV 1
12260_ACEOF
12261
12262 LIBS="-lresolv $LIBS"
12263
12264fi
12265
12266
12267fi
12268
12269
Christian Heimesd0764e22007-12-04 15:00:33 +000012270# On Tru64, chflags seems to be present, but calling it will
12271# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12273$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012274if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012276else
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012278 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012279else
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012281/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012282
Christian Heimesd0764e22007-12-04 15:00:33 +000012283#include <sys/stat.h>
12284#include <unistd.h>
12285int main(int argc, char*argv[])
12286{
12287 if(chflags(argv[0], 0) != 0)
12288 return 1;
12289 return 0;
12290}
Ned Deily3eb67d52011-06-28 00:00:28 -070012291
Christian Heimesd0764e22007-12-04 15:00:33 +000012292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012294 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012295else
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12299 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012300fi
12301
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012302
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12305$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012306if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012308if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012309 ac_cv_have_chflags="yes"
12310else
12311 ac_cv_have_chflags="no"
12312fi
12313
12314fi
12315if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012318
12319fi
12320
Matthias Kloseb9621712010-04-24 17:59:49 +000012321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12322$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012323if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012325else
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012327 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012328else
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012330/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012331
Christian Heimesd0764e22007-12-04 15:00:33 +000012332#include <sys/stat.h>
12333#include <unistd.h>
12334int main(int argc, char*argv[])
12335{
12336 if(lchflags(argv[0], 0) != 0)
12337 return 1;
12338 return 0;
12339}
Ned Deily3eb67d52011-06-28 00:00:28 -070012340
Christian Heimesd0764e22007-12-04 15:00:33 +000012341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012342if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012343 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012344else
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12348 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012349fi
12350
12351
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012352fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12354$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012355if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012356 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012357if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012358 ac_cv_have_lchflags="yes"
12359else
12360 ac_cv_have_lchflags="no"
12361fi
12362
12363fi
12364if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012365
Matthias Kloseb9621712010-04-24 17:59:49 +000012366$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012367
12368fi
12369
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012370case $ac_sys_system/$ac_sys_release in
12371Darwin/*)
12372 _CUR_CFLAGS="${CFLAGS}"
12373 _CUR_LDFLAGS="${LDFLAGS}"
12374 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12375 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12376 ;;
12377esac
12378
Matthias Kloseb9621712010-04-24 17:59:49 +000012379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12380$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012381if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012382 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012383else
12384 ac_check_lib_save_LIBS=$LIBS
12385LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012387/* end confdefs.h. */
12388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389/* Override any GCC internal prototype to avoid an error.
12390 Use char because int might match the return type of a GCC
12391 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012392#ifdef __cplusplus
12393extern "C"
12394#endif
12395char inflateCopy ();
12396int
12397main ()
12398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012400 ;
12401 return 0;
12402}
12403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012404if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012405 ac_cv_lib_z_inflateCopy=yes
12406else
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012409rm -f core conftest.err conftest.$ac_objext \
12410 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012411LIBS=$ac_check_lib_save_LIBS
12412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12414$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012415if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012416
Matthias Kloseb9621712010-04-24 17:59:49 +000012417$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012418
12419fi
12420
12421
12422case $ac_sys_system/$ac_sys_release in
12423Darwin/*)
12424 CFLAGS="${_CUR_CFLAGS}"
12425 LDFLAGS="${_CUR_LDFLAGS}"
12426 ;;
12427esac
12428
Matthias Kloseb9621712010-04-24 17:59:49 +000012429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12430$as_echo_n "checking for hstrerror... " >&6; }
12431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012432/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012433
Martin v. Löwise9416172003-05-03 10:12:45 +000012434#include <netdb.h>
12435
Martin v. Löwise9416172003-05-03 10:12:45 +000012436int
12437main ()
12438{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012439void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012440 ;
12441 return 0;
12442}
12443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012444if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012445
Matthias Kloseb9621712010-04-24 17:59:49 +000012446$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012447
Matthias Kloseb159a552010-04-25 21:00:44 +000012448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012449$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012450else
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12452$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012453
12454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012455rm -f core conftest.err conftest.$ac_objext \
12456 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12459$as_echo_n "checking for inet_aton... " >&6; }
12460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012461/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012462
Martin v. Löwis86d66262006-02-17 08:40:11 +000012463#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012464#include <sys/socket.h>
12465#include <netinet/in.h>
12466#include <arpa/inet.h>
12467
Martin v. Löwise9416172003-05-03 10:12:45 +000012468int
12469main ()
12470{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012471void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012472 ;
12473 return 0;
12474}
12475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012477
Matthias Kloseb9621712010-04-24 17:59:49 +000012478$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012479
Matthias Kloseb159a552010-04-25 21:00:44 +000012480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012481$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012482else
Matthias Kloseb9621712010-04-24 17:59:49 +000012483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12484$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012485
12486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012487rm -f core conftest.err conftest.$ac_objext \
12488 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12491$as_echo_n "checking for inet_pton... " >&6; }
12492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012493/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012494
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012495#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012496#include <sys/socket.h>
12497#include <netinet/in.h>
12498#include <arpa/inet.h>
12499
Martin v. Löwise9416172003-05-03 10:12:45 +000012500int
12501main ()
12502{
12503void* p = inet_pton
12504 ;
12505 return 0;
12506}
12507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012508if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012509
Matthias Kloseb9621712010-04-24 17:59:49 +000012510$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012511
Matthias Kloseb159a552010-04-25 21:00:44 +000012512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012513$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012514else
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12516$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012517
12518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012520
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012521# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12523$as_echo_n "checking for setgroups... " >&6; }
12524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012525/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012526
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012527#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012528#ifdef HAVE_GRP_H
12529#include <grp.h>
12530#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012531
Martin v. Löwisd5843682002-11-21 20:41:28 +000012532int
12533main ()
12534{
12535void* p = setgroups
12536 ;
12537 return 0;
12538}
12539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012540if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012543
Matthias Kloseb159a552010-04-25 21:00:44 +000012544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012545$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012546else
Matthias Kloseb9621712010-04-24 17:59:49 +000012547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12548$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012549
12550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012552
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012553# check for openpty and forkpty
12554
12555for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012556do :
12557 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012558if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012559 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012560#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012561_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012562
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012563else
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12565$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012566if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012568else
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012570LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012574/* Override any GCC internal prototype to avoid an error.
12575 Use char because int might match the return type of a GCC
12576 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012577#ifdef __cplusplus
12578extern "C"
12579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012580char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012581int
12582main ()
12583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012584return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012585 ;
12586 return 0;
12587}
12588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012589if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012591else
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012594rm -f core conftest.err conftest.$ac_objext \
12595 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012596LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12599$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012600if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012602 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012603else
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12605$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012606if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012607 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012608else
12609 ac_check_lib_save_LIBS=$LIBS
12610LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012612/* end confdefs.h. */
12613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012614/* Override any GCC internal prototype to avoid an error.
12615 Use char because int might match the return type of a GCC
12616 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012617#ifdef __cplusplus
12618extern "C"
12619#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012620char openpty ();
12621int
12622main ()
12623{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012624return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012625 ;
12626 return 0;
12627}
12628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012629if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012630 ac_cv_lib_bsd_openpty=yes
12631else
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012634rm -f core conftest.err conftest.$ac_objext \
12635 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012636LIBS=$ac_check_lib_save_LIBS
12637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12639$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012640if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012641 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012642 LIBS="$LIBS -lbsd"
12643fi
12644
12645
12646fi
12647
Fred Drake8cef4cf2000-06-28 16:40:38 +000012648
12649fi
12650done
12651
12652for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012653do :
12654 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012655if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012657#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012658_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012659
Fred Drake8cef4cf2000-06-28 16:40:38 +000012660else
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12662$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012663if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012664 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012665else
Martin v. Löwis11437992002-04-12 09:54:03 +000012666 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012667LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671/* Override any GCC internal prototype to avoid an error.
12672 Use char because int might match the return type of a GCC
12673 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012674#ifdef __cplusplus
12675extern "C"
12676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012677char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012678int
12679main ()
12680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 ;
12683 return 0;
12684}
12685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012686if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012688else
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012691rm -f core conftest.err conftest.$ac_objext \
12692 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012693LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12696$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012697if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012699 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012700else
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12702$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012703if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012704 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012705else
12706 ac_check_lib_save_LIBS=$LIBS
12707LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012709/* end confdefs.h. */
12710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711/* Override any GCC internal prototype to avoid an error.
12712 Use char because int might match the return type of a GCC
12713 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012714#ifdef __cplusplus
12715extern "C"
12716#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012717char forkpty ();
12718int
12719main ()
12720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012722 ;
12723 return 0;
12724}
12725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012726if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012727 ac_cv_lib_bsd_forkpty=yes
12728else
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012731rm -f core conftest.err conftest.$ac_objext \
12732 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012733LIBS=$ac_check_lib_save_LIBS
12734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12736$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012737if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012739 LIBS="$LIBS -lbsd"
12740fi
12741
12742
12743fi
12744
Fred Drake8cef4cf2000-06-28 16:40:38 +000012745
12746fi
12747done
12748
Jack Jansendd19cf82001-12-06 22:36:17 +000012749
Michael W. Hudson54241132001-12-07 15:38:26 +000012750# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012751for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012752do :
12753 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12754ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012755if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012757#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012758_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012759
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012760fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012761done
12762
Michael W. Hudson54241132001-12-07 15:38:26 +000012763
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012764ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012765if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012766 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012767
Martin v. Löwis1142de32002-03-29 16:28:31 +000012768else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012770 *" dup2.$ac_objext "* ) ;;
12771 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012773esac
12774
Martin v. Löwis1142de32002-03-29 16:28:31 +000012775fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012776
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012777ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012778if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012779 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12780
12781else
12782 case " $LIBOBJS " in
12783 *" strdup.$ac_objext "* ) ;;
12784 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12785 ;;
12786esac
12787
12788fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012789
12790
12791for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012792do :
12793 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012794if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012796#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012799/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012800#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012801int
12802main ()
12803{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012804getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ;
12806 return 0;
12807}
12808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012809if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012810
Matthias Kloseb9621712010-04-24 17:59:49 +000012811$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012812
Guido van Rossum627b2d71993-12-24 10:39:16 +000012813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012815
Guido van Rossum627b2d71993-12-24 10:39:16 +000012816fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012817done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012818
Jack Jansen150753c2003-03-29 22:07:47 +000012819for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012820do :
12821 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012822if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012823 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012824#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012827/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012828#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012829int
12830main ()
12831{
12832setpgrp(0,0);
12833 ;
12834 return 0;
12835}
12836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012837if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012838
Matthias Kloseb9621712010-04-24 17:59:49 +000012839$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012840
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012843
12844fi
12845done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012846
Michael W. Hudson54241132001-12-07 15:38:26 +000012847
Gregory P. Smith387512c2018-12-30 15:42:32 -080012848# We search for both crypt and crypt_r as one or the other may be defined
12849# This gets us our -lcrypt in LIBS when required on the target platform.
12850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12851$as_echo_n "checking for library containing crypt... " >&6; }
12852if ${ac_cv_search_crypt+:} false; then :
12853 $as_echo_n "(cached) " >&6
12854else
12855 ac_func_search_save_LIBS=$LIBS
12856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12857/* end confdefs.h. */
12858
12859/* Override any GCC internal prototype to avoid an error.
12860 Use char because int might match the return type of a GCC
12861 builtin and then its argument prototype would still apply. */
12862#ifdef __cplusplus
12863extern "C"
12864#endif
12865char crypt ();
12866int
12867main ()
12868{
12869return crypt ();
12870 ;
12871 return 0;
12872}
12873_ACEOF
12874for ac_lib in '' crypt; do
12875 if test -z "$ac_lib"; then
12876 ac_res="none required"
12877 else
12878 ac_res=-l$ac_lib
12879 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12880 fi
12881 if ac_fn_c_try_link "$LINENO"; then :
12882 ac_cv_search_crypt=$ac_res
12883fi
12884rm -f core conftest.err conftest.$ac_objext \
12885 conftest$ac_exeext
12886 if ${ac_cv_search_crypt+:} false; then :
12887 break
12888fi
12889done
12890if ${ac_cv_search_crypt+:} false; then :
12891
12892else
12893 ac_cv_search_crypt=no
12894fi
12895rm conftest.$ac_ext
12896LIBS=$ac_func_search_save_LIBS
12897fi
12898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12899$as_echo "$ac_cv_search_crypt" >&6; }
12900ac_res=$ac_cv_search_crypt
12901if test "$ac_res" != no; then :
12902 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12903
12904fi
12905
12906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12907$as_echo_n "checking for library containing crypt_r... " >&6; }
12908if ${ac_cv_search_crypt_r+:} false; then :
12909 $as_echo_n "(cached) " >&6
12910else
12911 ac_func_search_save_LIBS=$LIBS
12912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12913/* end confdefs.h. */
12914
12915/* Override any GCC internal prototype to avoid an error.
12916 Use char because int might match the return type of a GCC
12917 builtin and then its argument prototype would still apply. */
12918#ifdef __cplusplus
12919extern "C"
12920#endif
12921char crypt_r ();
12922int
12923main ()
12924{
12925return crypt_r ();
12926 ;
12927 return 0;
12928}
12929_ACEOF
12930for ac_lib in '' crypt; do
12931 if test -z "$ac_lib"; then
12932 ac_res="none required"
12933 else
12934 ac_res=-l$ac_lib
12935 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12936 fi
12937 if ac_fn_c_try_link "$LINENO"; then :
12938 ac_cv_search_crypt_r=$ac_res
12939fi
12940rm -f core conftest.err conftest.$ac_objext \
12941 conftest$ac_exeext
12942 if ${ac_cv_search_crypt_r+:} false; then :
12943 break
12944fi
12945done
12946if ${ac_cv_search_crypt_r+:} false; then :
12947
12948else
12949 ac_cv_search_crypt_r=no
12950fi
12951rm conftest.$ac_ext
12952LIBS=$ac_func_search_save_LIBS
12953fi
12954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12955$as_echo "$ac_cv_search_crypt_r" >&6; }
12956ac_res=$ac_cv_search_crypt_r
12957if test "$ac_res" != no; then :
12958 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12959
12960fi
12961
12962
12963ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12964if test "x$ac_cv_func_crypt_r" = xyes; then :
12965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12966/* end confdefs.h. */
12967
12968#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12969#include <crypt.h>
12970
12971int
12972main ()
12973{
12974
12975struct crypt_data d;
12976char *r = crypt_r("", "", &d);
12977
12978 ;
12979 return 0;
12980}
12981_ACEOF
12982if ac_fn_c_try_compile "$LINENO"; then :
12983
12984$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12985
12986fi
12987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12988
12989fi
12990
12991
Victor Stinnere0be4232011-10-25 13:06:09 +020012992for ac_func in clock_gettime
12993do :
12994 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12995if test "x$ac_cv_func_clock_gettime" = xyes; then :
12996 cat >>confdefs.h <<_ACEOF
12997#define HAVE_CLOCK_GETTIME 1
12998_ACEOF
12999
13000else
13001
13002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13003$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13004if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13005 $as_echo_n "(cached) " >&6
13006else
13007 ac_check_lib_save_LIBS=$LIBS
13008LIBS="-lrt $LIBS"
13009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13010/* end confdefs.h. */
13011
13012/* Override any GCC internal prototype to avoid an error.
13013 Use char because int might match the return type of a GCC
13014 builtin and then its argument prototype would still apply. */
13015#ifdef __cplusplus
13016extern "C"
13017#endif
13018char clock_gettime ();
13019int
13020main ()
13021{
13022return clock_gettime ();
13023 ;
13024 return 0;
13025}
13026_ACEOF
13027if ac_fn_c_try_link "$LINENO"; then :
13028 ac_cv_lib_rt_clock_gettime=yes
13029else
13030 ac_cv_lib_rt_clock_gettime=no
13031fi
13032rm -f core conftest.err conftest.$ac_objext \
13033 conftest$ac_exeext conftest.$ac_ext
13034LIBS=$ac_check_lib_save_LIBS
13035fi
13036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13037$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13038if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13039
Victor Stinner7efb8332014-08-29 15:41:08 +020013040 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013041 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13042
13043
13044$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13045
13046
13047fi
13048
13049
13050fi
13051done
13052
13053
13054for ac_func in clock_getres
13055do :
13056 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13057if test "x$ac_cv_func_clock_getres" = xyes; then :
13058 cat >>confdefs.h <<_ACEOF
13059#define HAVE_CLOCK_GETRES 1
13060_ACEOF
13061
13062else
13063
13064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13065$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13066if ${ac_cv_lib_rt_clock_getres+:} false; then :
13067 $as_echo_n "(cached) " >&6
13068else
13069 ac_check_lib_save_LIBS=$LIBS
13070LIBS="-lrt $LIBS"
13071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13072/* end confdefs.h. */
13073
13074/* Override any GCC internal prototype to avoid an error.
13075 Use char because int might match the return type of a GCC
13076 builtin and then its argument prototype would still apply. */
13077#ifdef __cplusplus
13078extern "C"
13079#endif
13080char clock_getres ();
13081int
13082main ()
13083{
13084return clock_getres ();
13085 ;
13086 return 0;
13087}
13088_ACEOF
13089if ac_fn_c_try_link "$LINENO"; then :
13090 ac_cv_lib_rt_clock_getres=yes
13091else
13092 ac_cv_lib_rt_clock_getres=no
13093fi
13094rm -f core conftest.err conftest.$ac_objext \
13095 conftest$ac_exeext conftest.$ac_ext
13096LIBS=$ac_check_lib_save_LIBS
13097fi
13098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13099$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13100if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13101
13102 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13103
13104
13105fi
13106
13107
13108fi
13109done
13110
13111
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013112for ac_func in clock_settime
13113do :
13114 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13115if test "x$ac_cv_func_clock_settime" = xyes; then :
13116 cat >>confdefs.h <<_ACEOF
13117#define HAVE_CLOCK_SETTIME 1
13118_ACEOF
13119
13120else
13121
13122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13123$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13124if ${ac_cv_lib_rt_clock_settime+:} false; then :
13125 $as_echo_n "(cached) " >&6
13126else
13127 ac_check_lib_save_LIBS=$LIBS
13128LIBS="-lrt $LIBS"
13129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13130/* end confdefs.h. */
13131
13132/* Override any GCC internal prototype to avoid an error.
13133 Use char because int might match the return type of a GCC
13134 builtin and then its argument prototype would still apply. */
13135#ifdef __cplusplus
13136extern "C"
13137#endif
13138char clock_settime ();
13139int
13140main ()
13141{
13142return clock_settime ();
13143 ;
13144 return 0;
13145}
13146_ACEOF
13147if ac_fn_c_try_link "$LINENO"; then :
13148 ac_cv_lib_rt_clock_settime=yes
13149else
13150 ac_cv_lib_rt_clock_settime=no
13151fi
13152rm -f core conftest.err conftest.$ac_objext \
13153 conftest$ac_exeext conftest.$ac_ext
13154LIBS=$ac_check_lib_save_LIBS
13155fi
13156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13157$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13158if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13159
13160 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13161
13162
13163fi
13164
13165
13166fi
13167done
13168
13169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13171$as_echo_n "checking for major... " >&6; }
13172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013173/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013174
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013175#if defined(MAJOR_IN_MKDEV)
13176#include <sys/mkdev.h>
13177#elif defined(MAJOR_IN_SYSMACROS)
13178#include <sys/sysmacros.h>
13179#else
13180#include <sys/types.h>
13181#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013182
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013183int
13184main ()
13185{
13186
13187 makedev(major(0),minor(0));
13188
13189 ;
13190 return 0;
13191}
13192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013193if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013194
13195
Matthias Kloseb9621712010-04-24 17:59:49 +000013196$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13199$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013200
13201else
Skip Montanaro6dead952003-09-25 14:50:04 +000013202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13204$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013205
13206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013207rm -f core conftest.err conftest.$ac_objext \
13208 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013209
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013210# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013211# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13213$as_echo_n "checking for getaddrinfo... " >&6; }
13214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013215/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013216
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013217#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013218#include <sys/socket.h>
13219#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013220#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013221
Martin v. Löwis11437992002-04-12 09:54:03 +000013222int
13223main ()
13224{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013225getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 ;
13227 return 0;
13228}
13229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013230if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013231 have_getaddrinfo=yes
13232else
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013235rm -f core conftest.err conftest.$ac_objext \
13236 conftest$ac_exeext conftest.$ac_ext
13237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13238$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013239if test $have_getaddrinfo = yes
13240then
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13242$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013243 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013245else
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013247
13248if test "${enable_ipv6+set}" = set; then
13249 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13250else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013251 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013252fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013255/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013256
Stefan Krah19c21392012-11-22 23:47:32 +010013257#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013258#include <sys/types.h>
13259#include <netdb.h>
13260#include <string.h>
13261#include <sys/socket.h>
13262#include <netinet/in.h>
13263
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013264int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013265{
13266 int passive, gaierr, inet4 = 0, inet6 = 0;
13267 struct addrinfo hints, *ai, *aitop;
13268 char straddr[INET6_ADDRSTRLEN], strport[16];
13269
13270 for (passive = 0; passive <= 1; passive++) {
13271 memset(&hints, 0, sizeof(hints));
13272 hints.ai_family = AF_UNSPEC;
13273 hints.ai_flags = passive ? AI_PASSIVE : 0;
13274 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013275 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013276 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13277 (void)gai_strerror(gaierr);
13278 goto bad;
13279 }
13280 for (ai = aitop; ai; ai = ai->ai_next) {
13281 if (ai->ai_addr == NULL ||
13282 ai->ai_addrlen == 0 ||
13283 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13284 straddr, sizeof(straddr), strport, sizeof(strport),
13285 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13286 goto bad;
13287 }
13288 switch (ai->ai_family) {
13289 case AF_INET:
13290 if (strcmp(strport, "54321") != 0) {
13291 goto bad;
13292 }
13293 if (passive) {
13294 if (strcmp(straddr, "0.0.0.0") != 0) {
13295 goto bad;
13296 }
13297 } else {
13298 if (strcmp(straddr, "127.0.0.1") != 0) {
13299 goto bad;
13300 }
13301 }
13302 inet4++;
13303 break;
13304 case AF_INET6:
13305 if (strcmp(strport, "54321") != 0) {
13306 goto bad;
13307 }
13308 if (passive) {
13309 if (strcmp(straddr, "::") != 0) {
13310 goto bad;
13311 }
13312 } else {
13313 if (strcmp(straddr, "::1") != 0) {
13314 goto bad;
13315 }
13316 }
13317 inet6++;
13318 break;
13319 case AF_UNSPEC:
13320 goto bad;
13321 break;
13322 default:
13323 /* another family support? */
13324 break;
13325 }
13326 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013327 freeaddrinfo(aitop);
13328 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013329 }
13330
13331 if (!(inet4 == 0 || inet4 == 2))
13332 goto bad;
13333 if (!(inet6 == 0 || inet6 == 2))
13334 goto bad;
13335
13336 if (aitop)
13337 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013338 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013339
13340 bad:
13341 if (aitop)
13342 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013343 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013344}
13345
Martin v. Löwis11437992002-04-12 09:54:03 +000013346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013347if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013348 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013349else
Matthias Kloseb9621712010-04-24 17:59:49 +000013350 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13353 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013356fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013357
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013359
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13361$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13362
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013363if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013364then
13365 if test $ipv6 = yes
13366 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013367 echo 'Fatal: You must get working getaddrinfo() function.'
13368 echo ' or you can specify "--disable-ipv6"'.
13369 exit 1
13370 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013371else
Martin v. Löwis11437992002-04-12 09:54:03 +000013372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013374
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013375fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013376
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013377for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013378do :
13379 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013380if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013381 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013382#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013383_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013384
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013385fi
13386done
13387
Michael W. Hudson54241132001-12-07 15:38:26 +000013388
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13391$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013392if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013396/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013397#include <sys/types.h>
13398#include <sys/time.h>
13399#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401int
13402main ()
13403{
13404if ((struct tm *) 0)
13405return 0;
13406 ;
13407 return 0;
13408}
13409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013410if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013411 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13418$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013419if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013422
13423fi
13424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13426$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013427if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429else
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013431/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013432#include <sys/types.h>
13433#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013434
Martin v. Löwis11437992002-04-12 09:54:03 +000013435int
13436main ()
13437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013438struct tm tm;
13439 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 ;
13442 return 0;
13443}
13444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013445if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013446 ac_cv_struct_tm=time.h
13447else
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13453$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013454if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
Matthias Kloseb9621712010-04-24 17:59:49 +000013456$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457
13458fi
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460ac_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 +000013461#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013462
Matthias Kloseb9621712010-04-24 17:59:49 +000013463"
Victor Stinnere0be4232011-10-25 13:06:09 +020013464if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013465
13466cat >>confdefs.h <<_ACEOF
13467#define HAVE_STRUCT_TM_TM_ZONE 1
13468_ACEOF
13469
13470
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013472
Martin v. Löwis11437992002-04-12 09:54:03 +000013473if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476
13477else
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13479"
Victor Stinnere0be4232011-10-25 13:06:09 +020013480if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013481 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013482else
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013484fi
13485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013486cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013487#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013488_ACEOF
13489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13491$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013492if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013494else
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013496/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013497#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013498#if !HAVE_DECL_TZNAME
13499extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013501
Martin v. Löwis11437992002-04-12 09:54:03 +000013502int
13503main ()
13504{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013505return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 ;
13507 return 0;
13508}
13509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013510if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013511 ac_cv_var_tzname=yes
13512else
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013515rm -f core conftest.err conftest.$ac_objext \
13516 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13519$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013520 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013521
Matthias Kloseb9621712010-04-24 17:59:49 +000013522$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013523
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013524 fi
13525fi
13526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527ac_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 +020013528if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013529
13530cat >>confdefs.h <<_ACEOF
13531#define HAVE_STRUCT_STAT_ST_RDEV 1
13532_ACEOF
13533
13534
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013535fi
13536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537ac_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 +020013538if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013539
Martin v. Löwis11437992002-04-12 09:54:03 +000013540cat >>confdefs.h <<_ACEOF
13541#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13542_ACEOF
13543
13544
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013545fi
13546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547ac_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 +020013548if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013549
13550cat >>confdefs.h <<_ACEOF
13551#define HAVE_STRUCT_STAT_ST_FLAGS 1
13552_ACEOF
13553
13554
13555fi
13556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557ac_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 +020013558if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013559
13560cat >>confdefs.h <<_ACEOF
13561#define HAVE_STRUCT_STAT_ST_GEN 1
13562_ACEOF
13563
13564
13565fi
13566
Matthias Kloseb9621712010-04-24 17:59:49 +000013567ac_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 +020013568if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013569
13570cat >>confdefs.h <<_ACEOF
13571#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13572_ACEOF
13573
13574
13575fi
13576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577ac_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 +020013578if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013579
Martin v. Löwis11437992002-04-12 09:54:03 +000013580cat >>confdefs.h <<_ACEOF
13581#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13582_ACEOF
13583
13584
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013585fi
13586
Stefan Krah267b6392016-04-26 01:09:18 +020013587ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13588 #include <sys/types.h>
13589 #include <pwd.h>
13590
13591"
13592if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13593
13594cat >>confdefs.h <<_ACEOF
13595#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13596_ACEOF
13597
13598
13599fi
13600ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13601 #include <sys/types.h>
13602 #include <pwd.h>
13603
13604"
13605if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13606
13607cat >>confdefs.h <<_ACEOF
13608#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13609_ACEOF
13610
13611
13612fi
13613
Zachary Ware6a6967e2016-10-01 00:47:27 -050013614# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13615ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13616"
13617if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13618
13619cat >>confdefs.h <<_ACEOF
13620#define HAVE_SIGINFO_T_SI_BAND 1
13621_ACEOF
13622
13623
13624fi
13625
Michael W. Hudson54241132001-12-07 15:38:26 +000013626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13628$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013629if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013631else
Matthias Kloseb159a552010-04-25 21:00:44 +000013632
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013634/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013635#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013636int
13637main ()
13638{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013639return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013640 ;
13641 return 0;
13642}
13643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013644if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645 ac_cv_header_time_altzone=yes
13646else
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013651fi
13652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13654$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013655if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013658
13659fi
13660
Guido van Rossumda88dad1995-01-26 00:46:29 +000013661was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13663$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013665/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013666
13667#include <sys/types.h>
13668#include <sys/select.h>
13669#include <sys/time.h>
13670
Martin v. Löwis11437992002-04-12 09:54:03 +000013671int
13672main ()
13673{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013674;
Martin v. Löwis11437992002-04-12 09:54:03 +000013675 ;
13676 return 0;
13677}
13678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013680
13681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013683
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013684 was_it_defined=yes
13685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13689$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13692$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013693if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013695else
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013697/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013698#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013699int
13700main ()
13701{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013702struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013703 ;
13704 return 0;
13705}
13706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013708 ac_cv_struct_addrinfo=yes
13709else
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13713fi
13714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13716$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013717if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013720
13721fi
13722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13724$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013725if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013726 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013727else
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013729/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013730
13731# include <sys/types.h>
13732# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013733int
13734main ()
13735{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013736struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 ;
13738 return 0;
13739}
13740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013741if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013742 ac_cv_struct_sockaddr_storage=yes
13743else
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13747fi
13748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13750$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013751if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
Matthias Kloseb9621712010-04-24 17:59:49 +000013753$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013754
13755fi
13756
Christian Heimesdffa3942016-09-05 23:54:41 +020013757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13758$as_echo_n "checking for sockaddr_alg... " >&6; }
13759if ${ac_cv_struct_sockaddr_alg+:} false; then :
13760 $as_echo_n "(cached) " >&6
13761else
13762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13763/* end confdefs.h. */
13764
13765# include <sys/types.h>
13766# include <sys/socket.h>
13767# include <linux/if_alg.h>
13768int
13769main ()
13770{
13771struct sockaddr_alg s
13772 ;
13773 return 0;
13774}
13775_ACEOF
13776if ac_fn_c_try_compile "$LINENO"; then :
13777 ac_cv_struct_sockaddr_alg=yes
13778else
13779 ac_cv_struct_sockaddr_alg=no
13780fi
13781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13782fi
13783
13784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13785$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13786if test $ac_cv_struct_sockaddr_alg = yes; then
13787
13788$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13789
13790fi
13791
Guido van Rossum627b2d71993-12-24 10:39:16 +000013792# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13795$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013796if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013801$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013802int
13803main ()
13804{
13805static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013806test_array [0] = 0;
13807return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013808
13809 ;
13810 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013811}
Martin v. Löwis11437992002-04-12 09:54:03 +000013812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013813if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013814 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013815else
Matthias Kloseb9621712010-04-24 17:59:49 +000013816 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13821$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013822if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013824
13825fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013826
Matthias Kloseb9621712010-04-24 17:59:49 +000013827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13828$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013829if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013831else
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013833/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013834
Martin v. Löwis11437992002-04-12 09:54:03 +000013835int
13836main ()
13837{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013838
Martin v. Löwis11437992002-04-12 09:54:03 +000013839#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013840 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013841 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013842 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844 char const *const *pcpcc;
13845 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 /* NEC SVR4.0.2 mips cc rejects this. */
13847 struct point {int x, y;};
13848 static struct point const zero = {0,0};
13849 /* AIX XL C 1.02.0.0 rejects this.
13850 It does not let you subtract one const X* pointer from another in
13851 an arm of an if-expression whose if-part is not a constant
13852 expression */
13853 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013854 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013855 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013856 ++pcpcc;
13857 ppc = (char**) pcpcc;
13858 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013859 { /* SCO 3.2v4 cc rejects this sort of thing. */
13860 char tx;
13861 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013862 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013863
Martin v. Löwis11437992002-04-12 09:54:03 +000013864 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013865 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013866 }
13867 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13868 int x[] = {25, 17};
13869 const int *foo = &x[0];
13870 ++foo;
13871 }
13872 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13873 typedef const int *iptr;
13874 iptr p = 0;
13875 ++p;
13876 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013877 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013879 struct s { int j; const int *ap[3]; } bx;
13880 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013881 }
13882 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13883 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013885 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013886 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013887#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013888
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 ;
13890 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013891}
Martin v. Löwis11437992002-04-12 09:54:03 +000013892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013893if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013894 ac_cv_c_const=yes
13895else
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13901$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013902if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013903
Matthias Kloseb9621712010-04-24 17:59:49 +000013904$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013905
13906fi
13907
Michael W. Hudson54241132001-12-07 15:38:26 +000013908
Guido van Rossumda88dad1995-01-26 00:46:29 +000013909works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13911$as_echo_n "checking for working signed char... " >&6; }
13912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013913/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013914
Martin v. Löwis11437992002-04-12 09:54:03 +000013915int
13916main ()
13917{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013918signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 ;
13920 return 0;
13921}
13922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013923if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013924 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013925else
Skip Montanaro6dead952003-09-25 14:50:04 +000013926
Matthias Kloseb9621712010-04-24 17:59:49 +000013927$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013928
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013929
Guido van Rossum7f43da71994-08-01 12:15:30 +000013930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13933$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013934
Guido van Rossumda88dad1995-01-26 00:46:29 +000013935have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13937$as_echo_n "checking for prototypes... " >&6; }
13938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013939/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013940int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013941int
13942main ()
13943{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013944return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013945 ;
13946 return 0;
13947}
13948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013949if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013952
Matthias Kloseb159a552010-04-25 21:00:44 +000013953 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13957$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013958
Guido van Rossumda88dad1995-01-26 00:46:29 +000013959works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13961$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013963/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013964
13965#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013966int foo(int x, ...) {
13967 va_list va;
13968 va_start(va, x);
13969 va_arg(va, int);
13970 va_arg(va, char *);
13971 va_arg(va, double);
13972 return 0;
13973}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013974
Martin v. Löwis11437992002-04-12 09:54:03 +000013975int
13976main ()
13977{
Guido van Rossum90eea071996-08-30 20:58:57 +000013978return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ;
13980 return 0;
13981}
13982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013984
13985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013988 works=yes
13989
Guido van Rossum627b2d71993-12-24 10:39:16 +000013990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13993$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013994
Martin v. Löwisd6320502004-08-12 13:45:08 +000013995# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13997$as_echo_n "checking for socketpair... " >&6; }
13998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013999/* end confdefs.h. */
14000
14001#include <sys/types.h>
14002#include <sys/socket.h>
14003
14004int
14005main ()
14006{
14007void *x=socketpair
14008 ;
14009 return 0;
14010}
14011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014013
Matthias Kloseb9621712010-04-24 17:59:49 +000014014$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014015
Matthias Kloseb159a552010-04-25 21:00:44 +000014016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014017$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014018else
Matthias Kloseb9621712010-04-24 17:59:49 +000014019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14020$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014021
14022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014024
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014025# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14027$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014029/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014030#include <sys/types.h>
14031#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014032int
14033main ()
14034{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014035struct sockaddr x;
14036x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014037 ;
14038 return 0;
14039}
14040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014041if ac_fn_c_try_compile "$LINENO"; then :
14042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14043$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014046
14047else
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14049$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014050
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014053
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014054# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
14056
Matthias Kloseb9621712010-04-24 17:59:49 +000014057ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014058if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014059
Matthias Kloseb9621712010-04-24 17:59:49 +000014060 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014061
Matthias Kloseb9621712010-04-24 17:59:49 +000014062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14063$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014064 OLD_CFLAGS=$CFLAGS
14065 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014067/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014068
14069# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014070
Martin v. Löwis11437992002-04-12 09:54:03 +000014071int
14072main ()
14073{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014074
14075 char *name;
14076 struct hostent *he, *res;
14077 char buffer[2048];
14078 int buflen = 2048;
14079 int h_errnop;
14080
14081 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014082
14083 ;
14084 return 0;
14085}
14086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014087if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014088
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014090
Martin v. Löwis11437992002-04-12 09:54:03 +000014091
Matthias Kloseb9621712010-04-24 17:59:49 +000014092$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014093
Matthias Kloseb9621712010-04-24 17:59:49 +000014094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14095$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014096
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014097else
Skip Montanaro6dead952003-09-25 14:50:04 +000014098
Matthias Kloseb9621712010-04-24 17:59:49 +000014099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14100$as_echo "no" >&6; }
14101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14102$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014104/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014105
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014106# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014107
Martin v. Löwis11437992002-04-12 09:54:03 +000014108int
14109main ()
14110{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014111
14112 char *name;
14113 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014114 char buffer[2048];
14115 int buflen = 2048;
14116 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014117
Matthias Kloseb159a552010-04-25 21:00:44 +000014118 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014119
14120 ;
14121 return 0;
14122}
14123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014124if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014125
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014127
Martin v. Löwis11437992002-04-12 09:54:03 +000014128
Matthias Kloseb159a552010-04-25 21:00:44 +000014129$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014130
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14132$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014133
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014134else
Skip Montanaro6dead952003-09-25 14:50:04 +000014135
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14137$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14139$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14141/* end confdefs.h. */
14142
14143# include <netdb.h>
14144
14145int
14146main ()
14147{
14148
14149 char *name;
14150 struct hostent *he;
14151 struct hostent_data data;
14152
14153 (void) gethostbyname_r(name, he, &data);
14154
14155 ;
14156 return 0;
14157}
14158_ACEOF
14159if ac_fn_c_try_compile "$LINENO"; then :
14160
14161 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14162
14163
14164$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14165
14166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14167$as_echo "yes" >&6; }
14168
14169else
14170
14171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14172$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014173
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014176
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014179
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014182 CFLAGS=$OLD_CFLAGS
14183
14184else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014185
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 for ac_func in gethostbyname
14187do :
14188 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014189if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014190 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014191#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014192_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014193
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014194fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014195done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014196
Michael W. Hudson54241132001-12-07 15:38:26 +000014197
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014198fi
14199
Michael W. Hudson54241132001-12-07 15:38:26 +000014200
14201
14202
14203
14204
14205
Guido van Rossum627b2d71993-12-24 10:39:16 +000014206# checks for system services
14207# (none yet)
14208
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014209# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014210ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014211if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014212
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014213else
Matthias Kloseb9621712010-04-24 17:59:49 +000014214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14215$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014216if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014218else
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014220LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224/* Override any GCC internal prototype to avoid an error.
14225 Use char because int might match the return type of a GCC
14226 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014227#ifdef __cplusplus
14228extern "C"
14229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014230char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014231int
14232main ()
14233{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014235 ;
14236 return 0;
14237}
14238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014239if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014240 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014241else
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014244rm -f core conftest.err conftest.$ac_objext \
14245 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014246LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14249$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014250if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014251 cat >>confdefs.h <<_ACEOF
14252#define HAVE_LIBIEEE 1
14253_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014254
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014255 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014256
Guido van Rossum627b2d71993-12-24 10:39:16 +000014257fi
14258
Michael W. Hudson54241132001-12-07 15:38:26 +000014259
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014260fi
14261
Michael W. Hudson54241132001-12-07 15:38:26 +000014262
Guido van Rossum7f43da71994-08-01 12:15:30 +000014263# check for --with-libm=...
14264
Guido van Rossum563e7081996-09-10 18:20:48 +000014265case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014266Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014267*) LIBM=-lm
14268esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14270$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014273if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014275if test "$withval" = no
14276then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14278$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014279elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014280then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14282$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014283else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014284fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014285else
Matthias Kloseb9621712010-04-24 17:59:49 +000014286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14287$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288fi
14289
Guido van Rossum7f43da71994-08-01 12:15:30 +000014290
14291# check for --with-libc=...
14292
Matthias Kloseb9621712010-04-24 17:59:49 +000014293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14294$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014297if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014298 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014299if test "$withval" = no
14300then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14302$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014303elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014304then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14306$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014307else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014308fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014309else
Matthias Kloseb9621712010-04-24 17:59:49 +000014310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14311$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312fi
14313
Guido van Rossum7f43da71994-08-01 12:15:30 +000014314
Stefan Krah1919b7e2012-03-21 18:25:23 +010014315# **************************************
14316# * Check for gcc x64 inline assembler *
14317# **************************************
14318
14319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14320$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14322/* end confdefs.h. */
14323
14324int
14325main ()
14326{
14327
14328 __asm__ __volatile__ ("movq %rcx, %rax");
14329
14330 ;
14331 return 0;
14332}
14333_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014334if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014335 have_gcc_asm_for_x64=yes
14336else
14337 have_gcc_asm_for_x64=no
14338fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014339rm -f core conftest.err conftest.$ac_objext \
14340 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14342$as_echo "$have_gcc_asm_for_x64" >&6; }
14343if test "$have_gcc_asm_for_x64" = yes
14344then
14345
14346$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14347
14348fi
14349
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014350# **************************************************
14351# * Check for various properties of floating point *
14352# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014353
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14355$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14356if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014357 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014358else
14359
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014360
14361ax_cv_c_float_words_bigendian=unknown
14362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014363/* end confdefs.h. */
14364
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014365
14366double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14367
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014368
14369_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014370if ac_fn_c_try_compile "$LINENO"; then :
14371
14372
Arnon Yaari5dd83602020-04-01 18:19:09 +030014373if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014374 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014375fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014376if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014377 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14378 ax_cv_c_float_words_bigendian=no
14379 else
14380 ax_cv_c_float_words_bigendian=unknown
14381 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014382fi
14383
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014384
14385fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014387fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14389$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014390
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014391case $ax_cv_c_float_words_bigendian in
14392 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014393
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014394$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14395 ;;
14396 no)
14397 ;;
14398 *)
14399 as_fn_error $? "
14400
14401Unknown float word ordering. You need to manually preset
14402ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14403
14404 " "$LINENO" 5 ;;
14405esac
14406
14407
14408if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014409then
14410
Matthias Kloseb9621712010-04-24 17:59:49 +000014411$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014412
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014413elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014414then
14415
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014416$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14417
14418else
14419 # Some ARM platforms use a mixed-endian representation for doubles.
14420 # While Python doesn't currently have full support for these platforms
14421 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14422 # conversions work.
14423 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14424 # or little, then it must be this?
14425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014427
14428fi
14429
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014430# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014431# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014432# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014433# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014434# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014435# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014436
14437# This inline assembler syntax may also work for suncc and icc,
14438# so we try it on all platforms.
14439
Matthias Kloseb9621712010-04-24 17:59:49 +000014440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14441$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014443/* end confdefs.h. */
14444
14445int
14446main ()
14447{
14448
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014449 unsigned short cw;
14450 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14451 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014452
14453 ;
14454 return 0;
14455}
14456_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014457if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014458 have_gcc_asm_for_x87=yes
14459else
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014461fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014462rm -f core conftest.err conftest.$ac_objext \
14463 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14465$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014466if test "$have_gcc_asm_for_x87" = yes
14467then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014468
Matthias Kloseb9621712010-04-24 17:59:49 +000014469$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014470
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014472
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14474$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14476/* end confdefs.h. */
14477
14478int
14479main ()
14480{
14481
14482 unsigned int fpcr;
14483 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14484 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14485
14486 ;
14487 return 0;
14488}
14489_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014490if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014491 have_gcc_asm_for_mc68881=yes
14492else
14493 have_gcc_asm_for_mc68881=no
14494fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014495rm -f core conftest.err conftest.$ac_objext \
14496 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14498$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14499if test "$have_gcc_asm_for_mc68881" = yes
14500then
14501
14502$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14503
14504fi
14505
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014506# Detect whether system arithmetic is subject to x87-style double
14507# rounding issues. The result of this test has little meaning on non
14508# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14509# mode is round-to-nearest and double rounding issues are present, and
14510# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14512$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014513# $BASECFLAGS may affect the result
14514ac_save_cc="$CC"
14515CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014516if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014517 ac_cv_x87_double_rounding=no
14518else
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014520/* end confdefs.h. */
14521
14522#include <stdlib.h>
14523#include <math.h>
14524int main() {
14525 volatile double x, y, z;
14526 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14527 x = 0.99999999999999989; /* 1-2**-53 */
14528 y = 1./x;
14529 if (y != 1.)
14530 exit(0);
14531 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14532 x = 1e16;
14533 y = 2.99999;
14534 z = x + y;
14535 if (z != 1e16+4.)
14536 exit(0);
14537 /* both tests show evidence of double rounding */
14538 exit(1);
14539}
14540
14541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014542if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014543 ac_cv_x87_double_rounding=no
14544else
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014549fi
14550
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014551CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14553$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014554if test "$ac_cv_x87_double_rounding" = yes
14555then
14556
Matthias Kloseb9621712010-04-24 17:59:49 +000014557$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014558
14559fi
14560
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014561# ************************************
14562# * Check for mathematical functions *
14563# ************************************
14564
14565LIBS_SAVE=$LIBS
14566LIBS="$LIBS $LIBM"
14567
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014568for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14569do :
14570 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14571ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014572if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014573 cat >>confdefs.h <<_ACEOF
14574#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14575_ACEOF
14576
14577fi
14578done
14579
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014580for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014581do :
14582 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14583ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014584if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014585 cat >>confdefs.h <<_ACEOF
14586#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14587_ACEOF
14588
14589fi
14590done
14591
14592ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14593"
Victor Stinnere0be4232011-10-25 13:06:09 +020014594if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014595 ac_have_decl=1
14596else
14597 ac_have_decl=0
14598fi
14599
14600cat >>confdefs.h <<_ACEOF
14601#define HAVE_DECL_ISINF $ac_have_decl
14602_ACEOF
14603ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14604"
Victor Stinnere0be4232011-10-25 13:06:09 +020014605if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014606 ac_have_decl=1
14607else
14608 ac_have_decl=0
14609fi
14610
14611cat >>confdefs.h <<_ACEOF
14612#define HAVE_DECL_ISNAN $ac_have_decl
14613_ACEOF
14614ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14615"
Victor Stinnere0be4232011-10-25 13:06:09 +020014616if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014617 ac_have_decl=1
14618else
14619 ac_have_decl=0
14620fi
14621
14622cat >>confdefs.h <<_ACEOF
14623#define HAVE_DECL_ISFINITE $ac_have_decl
14624_ACEOF
14625
14626
Mark Dickinsona614f042009-11-28 12:48:43 +000014627# For multiprocessing module, check that sem_open
14628# actually works. For FreeBSD versions <= 7.2,
14629# the kernel module that provides POSIX semaphores
14630# isn't loaded by default, so an attempt to call
14631# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14633$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014634if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014635 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014636else
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014638 ac_cv_posix_semaphores_enabled=yes
14639else
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014641/* end confdefs.h. */
14642
14643#include <unistd.h>
14644#include <fcntl.h>
14645#include <stdio.h>
14646#include <semaphore.h>
14647#include <sys/stat.h>
14648
14649int main(void) {
14650 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14651 if (a == SEM_FAILED) {
14652 perror("sem_open");
14653 return 1;
14654 }
14655 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014656 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014657 return 0;
14658}
14659
14660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014661if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014662 ac_cv_posix_semaphores_enabled=yes
14663else
Matthias Kloseb9621712010-04-24 17:59:49 +000014664 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14667 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014668fi
14669
14670
Mark Dickinsona614f042009-11-28 12:48:43 +000014671fi
14672
Matthias Kloseb9621712010-04-24 17:59:49 +000014673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14674$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014675if test $ac_cv_posix_semaphores_enabled = no
14676then
14677
Matthias Kloseb9621712010-04-24 17:59:49 +000014678$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014679
14680fi
14681
Mark Dickinson10683072009-04-18 21:18:19 +000014682# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14684$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014685if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014687else
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014689 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014690else
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014692/* end confdefs.h. */
14693
14694#include <unistd.h>
14695#include <fcntl.h>
14696#include <stdio.h>
14697#include <semaphore.h>
14698#include <sys/stat.h>
14699
14700int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014701 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014702 int count;
14703 int res;
14704 if(a==SEM_FAILED){
14705 perror("sem_open");
14706 return 1;
14707
14708 }
14709 res = sem_getvalue(a, &count);
14710 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014711 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014712 return res==-1 ? 1 : 0;
14713}
14714
Mark Dickinson10683072009-04-18 21:18:19 +000014715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014716if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014717 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014718else
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14722 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014723fi
14724
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014725
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014726fi
14727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14729$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014730if test $ac_cv_broken_sem_getvalue = yes
14731then
14732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014734
14735fi
14736
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014737ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14738"
14739if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14740 ac_have_decl=1
14741else
14742 ac_have_decl=0
14743fi
14744
14745cat >>confdefs.h <<_ACEOF
14746#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14747_ACEOF
14748ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14749"
14750if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14751 ac_have_decl=1
14752else
14753 ac_have_decl=0
14754fi
14755
14756cat >>confdefs.h <<_ACEOF
14757#define HAVE_DECL_RTLD_NOW $ac_have_decl
14758_ACEOF
14759ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14760"
14761if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14762 ac_have_decl=1
14763else
14764 ac_have_decl=0
14765fi
14766
14767cat >>confdefs.h <<_ACEOF
14768#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14769_ACEOF
14770ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14771"
14772if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14773 ac_have_decl=1
14774else
14775 ac_have_decl=0
14776fi
14777
14778cat >>confdefs.h <<_ACEOF
14779#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14780_ACEOF
14781ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14782"
14783if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14784 ac_have_decl=1
14785else
14786 ac_have_decl=0
14787fi
14788
14789cat >>confdefs.h <<_ACEOF
14790#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14791_ACEOF
14792ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14793"
14794if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14795 ac_have_decl=1
14796else
14797 ac_have_decl=0
14798fi
14799
14800cat >>confdefs.h <<_ACEOF
14801#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14802_ACEOF
14803ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14804"
14805if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14806 ac_have_decl=1
14807else
14808 ac_have_decl=0
14809fi
14810
14811cat >>confdefs.h <<_ACEOF
14812#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14813_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014814ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14815"
14816if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14817 ac_have_decl=1
14818else
14819 ac_have_decl=0
14820fi
14821
14822cat >>confdefs.h <<_ACEOF
14823#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14824_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014825
14826
Mark Dickinsonbd792642009-03-18 20:06:12 +000014827# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14829$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014830# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014831if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014832 enableval=$enable_big_digits; case $enable_big_digits in
14833yes)
14834 enable_big_digits=30 ;;
14835no)
14836 enable_big_digits=15 ;;
1483715|30)
14838 ;;
14839*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014840 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 +000014841esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14843$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014844
14845cat >>confdefs.h <<_ACEOF
14846#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14847_ACEOF
14848
14849
14850else
Matthias Kloseb9621712010-04-24 17:59:49 +000014851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14852$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014853fi
14854
14855
Guido van Rossumef2255b2000-03-10 22:30:29 +000014856# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014857ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014858if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014859
14860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014862
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014863 wchar_h="yes"
14864
Guido van Rossumef2255b2000-03-10 22:30:29 +000014865else
Martin v. Löwis11437992002-04-12 09:54:03 +000014866 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014867
14868fi
14869
Michael W. Hudson54241132001-12-07 15:38:26 +000014870
Martin v. Löwis11437992002-04-12 09:54:03 +000014871
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014872# determine wchar_t size
14873if test "$wchar_h" = yes
14874then
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14877# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14878# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14880$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014881if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014883else
Matthias Kloseb9621712010-04-24 17:59:49 +000014884 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14885"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014886
Martin v. Löwis11437992002-04-12 09:54:03 +000014887else
Matthias Kloseb9621712010-04-24 17:59:49 +000014888 if test "$ac_cv_type_wchar_t" = yes; then
14889 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14890$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014891as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014892See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893 else
14894 ac_cv_sizeof_wchar_t=0
14895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014897
Martin v. Löwis11437992002-04-12 09:54:03 +000014898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14900$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901
14902
14903
Martin v. Löwis11437992002-04-12 09:54:03 +000014904cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014905#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014906_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014907
Michael W. Hudson54241132001-12-07 15:38:26 +000014908
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014909fi
14910
Matthias Kloseb9621712010-04-24 17:59:49 +000014911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14912$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014913have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014915/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014916
14917#include <tcl.h>
14918#if TCL_UTF_MAX != 6
14919# error "NOT UCS4_TCL"
14920#endif
14921int
14922main ()
14923{
14924
14925 ;
14926 return 0;
14927}
14928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014929if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014930
14931
Matthias Kloseb9621712010-04-24 17:59:49 +000014932$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014933
14934 have_ucs4_tcl=yes
14935
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14939$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014940
Skip Montanaro6dead952003-09-25 14:50:04 +000014941# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014942if test "$wchar_h" = yes
14943then
14944 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14946$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014947 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014949else
14950
Matthias Kloseb9621712010-04-24 17:59:49 +000014951 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014952 ac_cv_wchar_t_signed=yes
14953else
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014955/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014956
14957 #include <wchar.h>
14958 int main()
14959 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014960 /* Success: exit code 0 */
14961 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014962 }
14963
14964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014965if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014966 ac_cv_wchar_t_signed=yes
14967else
Matthias Kloseb9621712010-04-24 17:59:49 +000014968 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14971 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014972fi
14973
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014974fi
14975
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14977$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978fi
14979
Michael Osipov3738fad2018-08-24 18:17:19 +020014980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14981$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014982# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014983if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014984 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014985then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014988
Michael Osipov3738fad2018-08-24 18:17:19 +020014989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14990$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014991else
Michael Osipov3738fad2018-08-24 18:17:19 +020014992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14993$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014994fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014995
14996# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14998$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014999if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015001else
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 ac_cv_c_bigendian=unknown
15003 # See if we're dealing with a universal compiler.
15004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005/* end confdefs.h. */
15006#ifndef __APPLE_CC__
15007 not a universal capable compiler
15008 #endif
15009 typedef int dummy;
15010
Skip Montanaro6dead952003-09-25 14:50:04 +000015011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015012if ac_fn_c_try_compile "$LINENO"; then :
15013
15014 # Check for potential -arch flags. It is not universal unless
15015 # there are at least two -arch flags with different values.
15016 ac_arch=
15017 ac_prev=
15018 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15019 if test -n "$ac_prev"; then
15020 case $ac_word in
15021 i?86 | x86_64 | ppc | ppc64)
15022 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15023 ac_arch=$ac_word
15024 else
15025 ac_cv_c_bigendian=universal
15026 break
15027 fi
15028 ;;
15029 esac
15030 ac_prev=
15031 elif test "x$ac_word" = "x-arch"; then
15032 ac_prev=arch
15033 fi
15034 done
15035fi
15036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15037 if test $ac_cv_c_bigendian = unknown; then
15038 # See if sys/param.h defines the BYTE_ORDER macro.
15039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015040/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015041#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015042 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015043
Martin v. Löwis11437992002-04-12 09:54:03 +000015044int
15045main ()
15046{
Matthias Kloseb9621712010-04-24 17:59:49 +000015047#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15048 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15049 && LITTLE_ENDIAN)
15050 bogus endian macros
15051 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015052
15053 ;
15054 return 0;
15055}
15056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015057if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015058 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015060/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015061#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015062 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015063
Martin v. Löwis11437992002-04-12 09:54:03 +000015064int
15065main ()
15066{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015067#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015068 not big endian
15069 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015070
15071 ;
15072 return 0;
15073}
15074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015075if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015076 ac_cv_c_bigendian=yes
15077else
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015081fi
15082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15083 fi
15084 if test $ac_cv_c_bigendian = unknown; then
15085 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015087/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015088#include <limits.h>
15089
Martin v. Löwis11437992002-04-12 09:54:03 +000015090int
15091main ()
15092{
Matthias Kloseb9621712010-04-24 17:59:49 +000015093#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15094 bogus endian macros
15095 #endif
15096
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 ;
15098 return 0;
15099}
15100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015101if ac_fn_c_try_compile "$LINENO"; then :
15102 # It does; now see whether it defined to _BIG_ENDIAN or not.
15103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15104/* end confdefs.h. */
15105#include <limits.h>
15106
15107int
15108main ()
15109{
15110#ifndef _BIG_ENDIAN
15111 not big endian
15112 #endif
15113
15114 ;
15115 return 0;
15116}
15117_ACEOF
15118if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015120else
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15124fi
15125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15126 fi
15127 if test $ac_cv_c_bigendian = unknown; then
15128 # Compile a test program.
15129 if test "$cross_compiling" = yes; then :
15130 # Try to guess by grepping values from an object file.
15131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15132/* end confdefs.h. */
15133short int ascii_mm[] =
15134 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15135 short int ascii_ii[] =
15136 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15137 int use_ascii (int i) {
15138 return ascii_mm[i] + ascii_ii[i];
15139 }
15140 short int ebcdic_ii[] =
15141 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15142 short int ebcdic_mm[] =
15143 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15144 int use_ebcdic (int i) {
15145 return ebcdic_mm[i] + ebcdic_ii[i];
15146 }
15147 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149int
15150main ()
15151{
15152return use_ascii (foo) == use_ebcdic (foo);
15153 ;
15154 return 0;
15155}
15156_ACEOF
15157if ac_fn_c_try_compile "$LINENO"; then :
15158 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15159 ac_cv_c_bigendian=yes
15160 fi
15161 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15162 if test "$ac_cv_c_bigendian" = unknown; then
15163 ac_cv_c_bigendian=no
15164 else
15165 # finding both strings is unlikely to happen, but who knows?
15166 ac_cv_c_bigendian=unknown
15167 fi
15168 fi
15169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015171else
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015173/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015175int
15176main ()
15177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 /* Are we little or big endian? From Harbison&Steele. */
15180 union
15181 {
15182 long int l;
15183 char c[sizeof (long int)];
15184 } u;
15185 u.l = 1;
15186 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187
15188 ;
15189 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015190}
Martin v. Löwis11437992002-04-12 09:54:03 +000015191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015192if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015193 ac_cv_c_bigendian=no
15194else
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15198 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15204$as_echo "$ac_cv_c_bigendian" >&6; }
15205 case $ac_cv_c_bigendian in #(
15206 yes)
15207 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15208;; #(
15209 no)
15210 ;; #(
15211 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015212
Matthias Kloseb9621712010-04-24 17:59:49 +000015213$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015214
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 ;; #(
15216 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015217 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015218 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015220
Michael W. Hudson54241132001-12-07 15:38:26 +000015221
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015222# ABI version string for Python extension modules. This appears between the
15223# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15224# from the following attributes which affect the ABI of this Python build (in
15225# this order):
15226#
15227# * The Python implementation (always 'cpython-' for us)
15228# * The major and minor version numbers
15229# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015230#
15231# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015232# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15233# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015234#
15235# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15236# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015237
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15239$as_echo_n "checking ABIFLAGS... " >&6; }
15240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15241$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15243$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015244SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15246$as_echo "$SOABI" >&6; }
15247
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015248# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15249if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015250 # Similar to SOABI but remove "d" flag from ABIFLAGS
15251
15252 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15253
15254cat >>confdefs.h <<_ACEOF
15255#define ALT_SOABI "${ALT_SOABI}"
15256_ACEOF
15257
15258fi
15259
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015260
15261case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015262 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015263 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15264 *)
15265 EXT_SUFFIX=${SHLIB_SUFFIX};;
15266esac
15267
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15269$as_echo_n "checking LDVERSION... " >&6; }
15270LDVERSION='$(VERSION)$(ABIFLAGS)'
15271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15272$as_echo "$LDVERSION" >&6; }
15273
E. M. Brayc994c8f2019-05-24 17:33:47 +020015274# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015275
E. M. Brayb1fc4172019-05-24 18:39:39 +020015276if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015277 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015278else
15279 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015280fi
15281
doko@python.org87421192013-01-26 11:39:31 +010015282
Victor Stinner8510f432020-03-10 09:53:09 +010015283# Check for --with-libdir-name
15284# /usr/$LIDIRNAME/python$VERSION
15285
15286PLATLIBDIR="lib"
15287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15288$as_echo_n "checking for --with-platlibdir... " >&6; }
15289
15290# Check whether --with-platlibdir was given.
15291if test "${with_platlibdir+set}" = set; then :
15292 withval=$with_platlibdir;
15293# ignore 3 options:
15294# --with-platlibdir
15295# --with-platlibdir=
15296# --without-platlibdir
15297if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15298then
15299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15300$as_echo "yes" >&6; }
15301 PLATLIBDIR="$withval"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015302else
Victor Stinner8510f432020-03-10 09:53:09 +010015303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15304$as_echo "no" >&6; }
15305fi
15306else
15307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15308$as_echo "no" >&6; }
15309fi
15310
15311
15312
15313
15314if test x$PLATFORM_TRIPLET = x; then
15315 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15316else
15317 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015318fi
doko@python.org87421192013-01-26 11:39:31 +010015319
15320
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015321# Check whether right shifting a negative integer extends the sign bit
15322# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15324$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015325if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015327else
Martin v. Löwis11437992002-04-12 09:54:03 +000015328
Matthias Kloseb9621712010-04-24 17:59:49 +000015329if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015330 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015331else
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015333/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015334
15335int main()
15336{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015337 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015338}
15339
Martin v. Löwis11437992002-04-12 09:54:03 +000015340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015341if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015342 ac_cv_rshift_extends_sign=yes
15343else
Matthias Kloseb9621712010-04-24 17:59:49 +000015344 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15347 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015348fi
15349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015350fi
15351
Matthias Kloseb9621712010-04-24 17:59:49 +000015352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15353$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015354if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015355then
Martin v. Löwis11437992002-04-12 09:54:03 +000015356
Matthias Kloseb9621712010-04-24 17:59:49 +000015357$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015358
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015359fi
15360
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015361# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15363$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015364if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015366else
Martin v. Löwis11437992002-04-12 09:54:03 +000015367
Matthias Kloseb9621712010-04-24 17:59:49 +000015368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015369/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015370#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015371int
15372main ()
15373{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015374
15375 FILE *f = fopen("/dev/null", "r");
15376 flockfile(f);
15377 getc_unlocked(f);
15378 funlockfile(f);
15379
Martin v. Löwis11437992002-04-12 09:54:03 +000015380 ;
15381 return 0;
15382}
15383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015384if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015385 ac_cv_have_getc_unlocked=yes
15386else
Matthias Kloseb9621712010-04-24 17:59:49 +000015387 ac_cv_have_getc_unlocked=no
15388fi
15389rm -f core conftest.err conftest.$ac_objext \
15390 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392
Matthias Kloseb9621712010-04-24 17:59:49 +000015393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15394$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015395if test "$ac_cv_have_getc_unlocked" = yes
15396then
Martin v. Löwis11437992002-04-12 09:54:03 +000015397
Matthias Kloseb9621712010-04-24 17:59:49 +000015398$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015399
15400fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015401
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015402# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015403# save the value of LIBS so we don't actually link Python with readline
15404LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015405
Gregory P. Smith18820942008-09-07 06:24:49 +000015406# On some systems we need to link readline to a termcap compatible
15407# library. NOTE: Keep the precedence of listed libraries synchronised
15408# with setup.py.
15409py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15411$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015412for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015413 if test -z "$py_libtermcap"; then
15414 READLINE_LIBS="-lreadline"
15415 else
15416 READLINE_LIBS="-lreadline -l$py_libtermcap"
15417 fi
15418 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015420/* end confdefs.h. */
15421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015422/* Override any GCC internal prototype to avoid an error.
15423 Use char because int might match the return type of a GCC
15424 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015425#ifdef __cplusplus
15426extern "C"
15427#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015428char readline ();
15429int
15430main ()
15431{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015432return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015433 ;
15434 return 0;
15435}
15436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015437if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015438 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015440rm -f core conftest.err conftest.$ac_objext \
15441 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015442 if test $py_cv_lib_readline = yes; then
15443 break
15444 fi
15445done
15446# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15447#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015448if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15450$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015451else
Matthias Kloseb9621712010-04-24 17:59:49 +000015452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15453$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015454
Matthias Kloseb9621712010-04-24 17:59:49 +000015455$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015456
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015457fi
15458
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015459# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015461/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015462#include <readline/readline.h>
15463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015464if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015465 have_readline=yes
15466else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015467 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015468
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015469fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015470rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015471if test $have_readline = yes
15472then
Matthias Kloseb9621712010-04-24 17:59:49 +000015473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015474/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015475#include <readline/readline.h>
15476
15477_ACEOF
15478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015479 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015480
Matthias Kloseb9621712010-04-24 17:59:49 +000015481$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015482
15483fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015484rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015485
Matthias Kloseb9621712010-04-24 17:59:49 +000015486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015487/* end confdefs.h. */
15488#include <readline/readline.h>
15489
15490_ACEOF
15491if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015492 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015493
Matthias Kloseb9621712010-04-24 17:59:49 +000015494$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015495
15496fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015497rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015498
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015499fi
15500
Martin v. Löwis0daad592001-09-30 21:09:59 +000015501# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15503$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015504if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015506else
Martin v. Löwis11437992002-04-12 09:54:03 +000015507 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015508LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015512/* Override any GCC internal prototype to avoid an error.
15513 Use char because int might match the return type of a GCC
15514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015515#ifdef __cplusplus
15516extern "C"
15517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015518char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015519int
15520main ()
15521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015523 ;
15524 return 0;
15525}
15526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015529else
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015532rm -f core conftest.err conftest.$ac_objext \
15533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015534LIBS=$ac_check_lib_save_LIBS
15535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15537$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015538if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015541
Martin v. Löwis0daad592001-09-30 21:09:59 +000015542fi
15543
Michael W. Hudson54241132001-12-07 15:38:26 +000015544
Thomas Wouters89d996e2007-09-08 17:39:28 +000015545# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15547$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015548if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015549 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015550else
15551 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015552LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015554/* end confdefs.h. */
15555
15556/* Override any GCC internal prototype to avoid an error.
15557 Use char because int might match the return type of a GCC
15558 builtin and then its argument prototype would still apply. */
15559#ifdef __cplusplus
15560extern "C"
15561#endif
15562char rl_completion_display_matches_hook ();
15563int
15564main ()
15565{
15566return rl_completion_display_matches_hook ();
15567 ;
15568 return 0;
15569}
15570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015571if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015572 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15573else
Matthias Kloseb9621712010-04-24 17:59:49 +000015574 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015576rm -f core conftest.err conftest.$ac_objext \
15577 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015578LIBS=$ac_check_lib_save_LIBS
15579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15581$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015582if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015583
Matthias Kloseb9621712010-04-24 17:59:49 +000015584$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015585
15586fi
15587
15588
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015589# also in 4.0, but not in editline
15590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15591$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15592if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15593 $as_echo_n "(cached) " >&6
15594else
15595 ac_check_lib_save_LIBS=$LIBS
15596LIBS="-lreadline $READLINE_LIBS $LIBS"
15597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15598/* end confdefs.h. */
15599
15600/* Override any GCC internal prototype to avoid an error.
15601 Use char because int might match the return type of a GCC
15602 builtin and then its argument prototype would still apply. */
15603#ifdef __cplusplus
15604extern "C"
15605#endif
15606char rl_resize_terminal ();
15607int
15608main ()
15609{
15610return rl_resize_terminal ();
15611 ;
15612 return 0;
15613}
15614_ACEOF
15615if ac_fn_c_try_link "$LINENO"; then :
15616 ac_cv_lib_readline_rl_resize_terminal=yes
15617else
15618 ac_cv_lib_readline_rl_resize_terminal=no
15619fi
15620rm -f core conftest.err conftest.$ac_objext \
15621 conftest$ac_exeext conftest.$ac_ext
15622LIBS=$ac_check_lib_save_LIBS
15623fi
15624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15625$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15626if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15627
15628$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15629
15630fi
15631
15632
Martin v. Löwis0daad592001-09-30 21:09:59 +000015633# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15635$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015636if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015637 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015638else
Martin v. Löwis11437992002-04-12 09:54:03 +000015639 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015640LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015644/* Override any GCC internal prototype to avoid an error.
15645 Use char because int might match the return type of a GCC
15646 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015647#ifdef __cplusplus
15648extern "C"
15649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015650char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015651int
15652main ()
15653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015654return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015655 ;
15656 return 0;
15657}
15658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015659if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015661else
Matthias Kloseb9621712010-04-24 17:59:49 +000015662 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015664rm -f core conftest.err conftest.$ac_objext \
15665 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015666LIBS=$ac_check_lib_save_LIBS
15667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15669$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015670if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015671
Matthias Kloseb9621712010-04-24 17:59:49 +000015672$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015673
Guido van Rossum353ae582001-07-10 16:45:32 +000015674fi
15675
Jack Jansendd19cf82001-12-06 22:36:17 +000015676
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015677# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015679/* end confdefs.h. */
15680#include <readline/readline.h>
15681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015682if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015683 have_readline=yes
15684else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015685 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015686
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015687fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015688rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015689if test $have_readline = yes
15690then
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015692/* end confdefs.h. */
15693#include <readline/readline.h>
15694
15695_ACEOF
15696if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015698
Matthias Kloseb9621712010-04-24 17:59:49 +000015699$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015700
15701fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015702rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015703
15704fi
15705
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15707$as_echo_n "checking for append_history in -lreadline... " >&6; }
15708if ${ac_cv_lib_readline_append_history+:} false; then :
15709 $as_echo_n "(cached) " >&6
15710else
15711 ac_check_lib_save_LIBS=$LIBS
15712LIBS="-lreadline $READLINE_LIBS $LIBS"
15713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15714/* end confdefs.h. */
15715
15716/* Override any GCC internal prototype to avoid an error.
15717 Use char because int might match the return type of a GCC
15718 builtin and then its argument prototype would still apply. */
15719#ifdef __cplusplus
15720extern "C"
15721#endif
15722char append_history ();
15723int
15724main ()
15725{
15726return append_history ();
15727 ;
15728 return 0;
15729}
15730_ACEOF
15731if ac_fn_c_try_link "$LINENO"; then :
15732 ac_cv_lib_readline_append_history=yes
15733else
15734 ac_cv_lib_readline_append_history=no
15735fi
15736rm -f core conftest.err conftest.$ac_objext \
15737 conftest$ac_exeext conftest.$ac_ext
15738LIBS=$ac_check_lib_save_LIBS
15739fi
15740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15741$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15742if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15743
15744$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15745
15746fi
15747
15748
Martin v. Löwis82bca632006-02-10 20:49:30 +000015749# End of readline checks: restore LIBS
15750LIBS=$LIBS_no_readline
15751
Matthias Kloseb9621712010-04-24 17:59:49 +000015752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15753$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015754if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015755 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015756else
Martin v. Löwis11437992002-04-12 09:54:03 +000015757
Matthias Kloseb9621712010-04-24 17:59:49 +000015758if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015759 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015760else
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015762/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015763
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015764#include <stdlib.h>
15765#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015766int main()
15767{
15768 int val1 = nice(1);
15769 if (val1 != -1 && val1 == nice(2))
15770 exit(0);
15771 exit(1);
15772}
15773
Martin v. Löwis11437992002-04-12 09:54:03 +000015774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015775if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015776 ac_cv_broken_nice=yes
15777else
Matthias Kloseb9621712010-04-24 17:59:49 +000015778 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015782fi
15783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784fi
15785
Matthias Kloseb9621712010-04-24 17:59:49 +000015786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15787$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015788if test "$ac_cv_broken_nice" = yes
15789then
Martin v. Löwis11437992002-04-12 09:54:03 +000015790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015792
15793fi
15794
Matthias Kloseb9621712010-04-24 17:59:49 +000015795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15796$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015797if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015798 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015799else
Matthias Kloseb9621712010-04-24 17:59:49 +000015800 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015801 ac_cv_broken_poll=no
15802else
Matthias Kloseb9621712010-04-24 17:59:49 +000015803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015804/* end confdefs.h. */
15805
15806#include <poll.h>
15807
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015808int main()
15809{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015810 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015811 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015812
15813 close (42);
15814
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015815 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015816 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015817 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015818 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015819 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015820 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015821 return 1;
15822}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015823
15824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015825if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015826 ac_cv_broken_poll=yes
15827else
Matthias Kloseb9621712010-04-24 17:59:49 +000015828 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015834fi
15835
Matthias Kloseb9621712010-04-24 17:59:49 +000015836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15837$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015838if test "$ac_cv_broken_poll" = yes
15839then
15840
Matthias Kloseb9621712010-04-24 17:59:49 +000015841$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015842
15843fi
15844
Martin v. Löwis1d459062005-03-14 21:23:33 +000015845# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15847$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015848if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015849 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015850else
15851
Matthias Kloseb9621712010-04-24 17:59:49 +000015852if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015853 ac_cv_working_tzset=no
15854else
Matthias Kloseb9621712010-04-24 17:59:49 +000015855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015856/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015857
15858#include <stdlib.h>
15859#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015860#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015861
15862#if HAVE_TZNAME
15863extern char *tzname[];
15864#endif
15865
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015866int main()
15867{
Brett Cannon18367812003-09-19 00:59:16 +000015868 /* Note that we need to ensure that not only does tzset(3)
15869 do 'something' with localtime, but it works as documented
15870 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015871 This includes making sure that tzname is set properly if
15872 tm->tm_zone does not exist since it is the alternative way
15873 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015874
15875 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015876 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015877 */
15878
Martin v. Löwis1d459062005-03-14 21:23:33 +000015879 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015880 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15881
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015882 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015883 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015884 if (localtime(&groundhogday)->tm_hour != 0)
15885 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015886#if HAVE_TZNAME
15887 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15888 if (strcmp(tzname[0], "UTC") ||
15889 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15890 exit(1);
15891#endif
Brett Cannon18367812003-09-19 00:59:16 +000015892
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015893 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015894 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015895 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015896 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015897#if HAVE_TZNAME
15898 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15899 exit(1);
15900#endif
Brett Cannon18367812003-09-19 00:59:16 +000015901
15902 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15903 tzset();
15904 if (localtime(&groundhogday)->tm_hour != 11)
15905 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015906#if HAVE_TZNAME
15907 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15908 exit(1);
15909#endif
15910
15911#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015912 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15913 exit(1);
15914 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15915 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015916#endif
Brett Cannon18367812003-09-19 00:59:16 +000015917
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015918 exit(0);
15919}
15920
15921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015922if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015923 ac_cv_working_tzset=yes
15924else
Matthias Kloseb9621712010-04-24 17:59:49 +000015925 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15928 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015929fi
15930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015931fi
15932
Matthias Kloseb9621712010-04-24 17:59:49 +000015933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15934$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015935if test "$ac_cv_working_tzset" = yes
15936then
15937
Matthias Kloseb9621712010-04-24 17:59:49 +000015938$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015939
15940fi
15941
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015942# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15944$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015945if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015946 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015947else
Matthias Kloseb9621712010-04-24 17:59:49 +000015948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015949/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015950#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015951int
15952main ()
15953{
15954
15955struct stat st;
15956st.st_mtim.tv_nsec = 1;
15957
15958 ;
15959 return 0;
15960}
15961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015963 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015964else
Matthias Kloseb9621712010-04-24 17:59:49 +000015965 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15968fi
15969
Matthias Kloseb9621712010-04-24 17:59:49 +000015970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15971$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015972if test "$ac_cv_stat_tv_nsec" = yes
15973then
15974
Matthias Kloseb9621712010-04-24 17:59:49 +000015975$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015976
15977fi
15978
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015979# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15981$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015982if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015983 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015984else
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015986/* end confdefs.h. */
15987#include <sys/stat.h>
15988int
15989main ()
15990{
15991
15992struct stat st;
15993st.st_mtimespec.tv_nsec = 1;
15994
15995 ;
15996 return 0;
15997}
15998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015999if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016000 ac_cv_stat_tv_nsec2=yes
16001else
Matthias Kloseb9621712010-04-24 17:59:49 +000016002 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16005fi
16006
Matthias Kloseb9621712010-04-24 17:59:49 +000016007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16008$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016009if test "$ac_cv_stat_tv_nsec2" = yes
16010then
16011
Matthias Kloseb9621712010-04-24 17:59:49 +000016012$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016013
16014fi
16015
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016016# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016017ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016018if test "$cross_compiling" = no; then
16019 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16020fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016021
16022for ac_header in curses.h ncurses.h
16023do :
16024 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16025ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16026if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16027 cat >>confdefs.h <<_ACEOF
16028#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16029_ACEOF
16030
16031fi
16032
16033done
16034
16035
16036# On Solaris, term.h requires curses.h
16037for ac_header in term.h
16038do :
16039 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16040#ifdef HAVE_CURSES_H
16041#include <curses.h>
16042#endif
16043
16044"
16045if test "x$ac_cv_header_term_h" = xyes; then :
16046 cat >>confdefs.h <<_ACEOF
16047#define HAVE_TERM_H 1
16048_ACEOF
16049
16050fi
16051
16052done
16053
16054
Jack Jansen666b1e72001-10-31 12:11:48 +000016055# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16057$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016058if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016059 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016060else
Matthias Kloseb9621712010-04-24 17:59:49 +000016061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016062/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016063#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016064int
16065main ()
16066{
Jack Jansen666b1e72001-10-31 12:11:48 +000016067
16068 int rtn;
16069 rtn = mvwdelch(0,0,0);
16070
Martin v. Löwis11437992002-04-12 09:54:03 +000016071 ;
16072 return 0;
16073}
16074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016075if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016076 ac_cv_mvwdelch_is_expression=yes
16077else
Matthias Kloseb9621712010-04-24 17:59:49 +000016078 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16081fi
16082
Matthias Kloseb9621712010-04-24 17:59:49 +000016083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16084$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016085
16086if test "$ac_cv_mvwdelch_is_expression" = yes
16087then
Martin v. Löwis11437992002-04-12 09:54:03 +000016088
Matthias Kloseb9621712010-04-24 17:59:49 +000016089$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016090
16091fi
16092
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016093# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16094# structs since version 5.7. If the macro is defined as zero before including
16095# [n]curses.h, ncurses will expose fields of the structs regardless of the
16096# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16098$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016099if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016100 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016101else
Matthias Kloseb9621712010-04-24 17:59:49 +000016102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016103/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016104
16105 #define NCURSES_OPAQUE 0
16106 #include <curses.h>
16107
Martin v. Löwis11437992002-04-12 09:54:03 +000016108int
16109main ()
16110{
Jack Jansen666b1e72001-10-31 12:11:48 +000016111
16112 WINDOW *w;
16113 w->_flags = 0;
16114
Martin v. Löwis11437992002-04-12 09:54:03 +000016115 ;
16116 return 0;
16117}
16118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016119if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016120 ac_cv_window_has_flags=yes
16121else
Matthias Kloseb9621712010-04-24 17:59:49 +000016122 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16125fi
16126
Matthias Kloseb9621712010-04-24 17:59:49 +000016127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16128$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016129
Jack Jansen666b1e72001-10-31 12:11:48 +000016130
16131if test "$ac_cv_window_has_flags" = yes
16132then
Martin v. Löwis11437992002-04-12 09:54:03 +000016133
Matthias Kloseb9621712010-04-24 17:59:49 +000016134$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016135
16136fi
16137
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16139$as_echo_n "checking for is_pad... " >&6; }
16140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16141/* end confdefs.h. */
16142#include <curses.h>
16143int
16144main ()
16145{
16146
16147#ifndef is_pad
16148void *x=is_pad
16149#endif
16150
16151 ;
16152 return 0;
16153}
16154_ACEOF
16155if ac_fn_c_try_compile "$LINENO"; then :
16156
16157$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16158
16159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16160$as_echo "yes" >&6; }
16161else
16162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16163$as_echo "no" >&6; }
16164
16165fi
16166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16167
Matthias Kloseb9621712010-04-24 17:59:49 +000016168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16169$as_echo_n "checking for is_term_resized... " >&6; }
16170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016171/* end confdefs.h. */
16172#include <curses.h>
16173int
16174main ()
16175{
16176void *x=is_term_resized
16177 ;
16178 return 0;
16179}
16180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016181if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016182
Matthias Kloseb9621712010-04-24 17:59:49 +000016183$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016184
Matthias Kloseb159a552010-04-25 21:00:44 +000016185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016186$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016187else
Matthias Kloseb9621712010-04-24 17:59:49 +000016188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16189$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016190
16191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16193
Matthias Kloseb9621712010-04-24 17:59:49 +000016194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16195$as_echo_n "checking for resize_term... " >&6; }
16196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016197/* end confdefs.h. */
16198#include <curses.h>
16199int
16200main ()
16201{
16202void *x=resize_term
16203 ;
16204 return 0;
16205}
16206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016207if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016208
Matthias Kloseb9621712010-04-24 17:59:49 +000016209$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016210
Matthias Kloseb159a552010-04-25 21:00:44 +000016211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016212$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016213else
Matthias Kloseb9621712010-04-24 17:59:49 +000016214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16215$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016216
16217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16219
Matthias Kloseb9621712010-04-24 17:59:49 +000016220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16221$as_echo_n "checking for resizeterm... " >&6; }
16222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016223/* end confdefs.h. */
16224#include <curses.h>
16225int
16226main ()
16227{
16228void *x=resizeterm
16229 ;
16230 return 0;
16231}
16232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016233if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016234
Matthias Kloseb9621712010-04-24 17:59:49 +000016235$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016236
Matthias Kloseb159a552010-04-25 21:00:44 +000016237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016238$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016239else
Matthias Kloseb9621712010-04-24 17:59:49 +000016240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16241$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016242
16243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016245
16246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16247$as_echo_n "checking for immedok... " >&6; }
16248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16249/* end confdefs.h. */
16250#include <curses.h>
16251int
16252main ()
16253{
16254
16255#ifndef immedok
16256void *x=immedok
16257#endif
16258
16259 ;
16260 return 0;
16261}
16262_ACEOF
16263if ac_fn_c_try_compile "$LINENO"; then :
16264
16265$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16266
16267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16268$as_echo "yes" >&6; }
16269else
16270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16271$as_echo "no" >&6; }
16272
16273fi
16274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16275
16276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16277$as_echo_n "checking for syncok... " >&6; }
16278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16279/* end confdefs.h. */
16280#include <curses.h>
16281int
16282main ()
16283{
16284
16285#ifndef syncok
16286void *x=syncok
16287#endif
16288
16289 ;
16290 return 0;
16291}
16292_ACEOF
16293if ac_fn_c_try_compile "$LINENO"; then :
16294
16295$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16296
16297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16298$as_echo "yes" >&6; }
16299else
16300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16301$as_echo "no" >&6; }
16302
16303fi
16304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16305
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16307$as_echo_n "checking for wchgat... " >&6; }
16308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16309/* end confdefs.h. */
16310#include <curses.h>
16311int
16312main ()
16313{
16314
16315#ifndef wchgat
16316void *x=wchgat
16317#endif
16318
16319 ;
16320 return 0;
16321}
16322_ACEOF
16323if ac_fn_c_try_compile "$LINENO"; then :
16324
16325$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16326
16327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16328$as_echo "yes" >&6; }
16329else
16330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16331$as_echo "no" >&6; }
16332
16333fi
16334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16335
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16337$as_echo_n "checking for filter... " >&6; }
16338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16339/* end confdefs.h. */
16340#include <curses.h>
16341int
16342main ()
16343{
16344
16345#ifndef filter
16346void *x=filter
16347#endif
16348
16349 ;
16350 return 0;
16351}
16352_ACEOF
16353if ac_fn_c_try_compile "$LINENO"; then :
16354
16355$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16356
16357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16358$as_echo "yes" >&6; }
16359else
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16361$as_echo "no" >&6; }
16362
16363fi
16364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16365
16366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16367$as_echo_n "checking for has_key... " >&6; }
16368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16369/* end confdefs.h. */
16370#include <curses.h>
16371int
16372main ()
16373{
16374
16375#ifndef has_key
16376void *x=has_key
16377#endif
16378
16379 ;
16380 return 0;
16381}
16382_ACEOF
16383if ac_fn_c_try_compile "$LINENO"; then :
16384
16385$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16386
16387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16388$as_echo "yes" >&6; }
16389else
16390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16391$as_echo "no" >&6; }
16392
16393fi
16394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16395
16396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16397$as_echo_n "checking for typeahead... " >&6; }
16398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16399/* end confdefs.h. */
16400#include <curses.h>
16401int
16402main ()
16403{
16404
16405#ifndef typeahead
16406void *x=typeahead
16407#endif
16408
16409 ;
16410 return 0;
16411}
16412_ACEOF
16413if ac_fn_c_try_compile "$LINENO"; then :
16414
16415$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16416
16417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16418$as_echo "yes" >&6; }
16419else
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16421$as_echo "no" >&6; }
16422
16423fi
16424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16425
16426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16427$as_echo_n "checking for use_env... " >&6; }
16428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16429/* end confdefs.h. */
16430#include <curses.h>
16431int
16432main ()
16433{
16434
16435#ifndef use_env
16436void *x=use_env
16437#endif
16438
16439 ;
16440 return 0;
16441}
16442_ACEOF
16443if ac_fn_c_try_compile "$LINENO"; then :
16444
16445$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16446
16447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16448$as_echo "yes" >&6; }
16449else
16450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16451$as_echo "no" >&6; }
16452
16453fi
16454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016455# last curses configure check
16456CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016457
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16459$as_echo "$as_me: checking for device files" >&6;}
16460
16461if test "x$cross_compiling" = xyes; then
16462 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16464$as_echo_n "checking for /dev/ptmx... " >&6; }
16465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16466$as_echo "not set" >&6; }
16467 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16468 fi
16469 if test "${ac_cv_file__dev_ptc+set}" != set; then
16470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16471$as_echo_n "checking for /dev/ptc... " >&6; }
16472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16473$as_echo "not set" >&6; }
16474 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16475 fi
16476fi
16477
Matthias Kloseb9621712010-04-24 17:59:49 +000016478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16479$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016480if ${ac_cv_file__dev_ptmx+:} false; then :
16481 $as_echo_n "(cached) " >&6
16482else
16483 test "$cross_compiling" = yes &&
16484 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16485if test -r "/dev/ptmx"; then
16486 ac_cv_file__dev_ptmx=yes
16487else
16488 ac_cv_file__dev_ptmx=no
16489fi
16490fi
16491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16492$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16493if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016494
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016495fi
16496
16497if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016498
Matthias Kloseb9621712010-04-24 17:59:49 +000016499$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016500
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16503$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016504if ${ac_cv_file__dev_ptc+:} false; then :
16505 $as_echo_n "(cached) " >&6
16506else
16507 test "$cross_compiling" = yes &&
16508 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16509if test -r "/dev/ptc"; then
16510 ac_cv_file__dev_ptc=yes
16511else
16512 ac_cv_file__dev_ptc=no
16513fi
16514fi
16515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16516$as_echo "$ac_cv_file__dev_ptc" >&6; }
16517if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016518
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016519fi
16520
16521if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016522
Matthias Kloseb9621712010-04-24 17:59:49 +000016523$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016524
Neal Norwitz865400f2003-03-21 01:42:58 +000016525fi
16526
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016527if test $ac_sys_system = Darwin
16528then
16529 LIBS="$LIBS -framework CoreFoundation"
16530fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016531
Matthias Kloseb9621712010-04-24 17:59:49 +000016532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16533$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016534if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016535 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016536else
Matthias Kloseb9621712010-04-24 17:59:49 +000016537 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016538 ac_cv_have_size_t_format="cross -- assuming yes"
16539
Thomas Wouters477c8d52006-05-27 19:21:47 +000016540else
Matthias Kloseb9621712010-04-24 17:59:49 +000016541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016542/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016543
Thomas Wouters477c8d52006-05-27 19:21:47 +000016544#include <stdio.h>
16545#include <stddef.h>
16546#include <string.h>
16547
Christian Heimes2c181612007-12-17 20:04:13 +000016548#ifdef HAVE_SYS_TYPES_H
16549#include <sys/types.h>
16550#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016551
16552#ifdef HAVE_SSIZE_T
16553typedef ssize_t Py_ssize_t;
16554#elif SIZEOF_VOID_P == SIZEOF_LONG
16555typedef long Py_ssize_t;
16556#else
16557typedef int Py_ssize_t;
16558#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016559
Christian Heimes2c181612007-12-17 20:04:13 +000016560int main()
16561{
16562 char buffer[256];
16563
Thomas Wouters477c8d52006-05-27 19:21:47 +000016564 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16565 return 1;
16566
Thomas Wouters89f507f2006-12-13 04:49:30 +000016567 if (strcmp(buffer, "123"))
16568 return 1;
16569
16570 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16571 return 1;
16572
16573 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016574 return 1;
16575
16576 return 0;
16577}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016578
Thomas Wouters477c8d52006-05-27 19:21:47 +000016579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016580if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016581 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016582else
Matthias Kloseb9621712010-04-24 17:59:49 +000016583 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16586 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016587fi
16588
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16591$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016592if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016593
Matthias Kloseb9621712010-04-24 17:59:49 +000016594$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016595
16596fi
16597
Matthias Kloseb9621712010-04-24 17:59:49 +000016598ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016599#ifdef HAVE_SYS_TYPES_H
16600#include <sys/types.h>
16601#endif
16602#ifdef HAVE_SYS_SOCKET_H
16603#include <sys/socket.h>
16604#endif
16605
Matthias Kloseb9621712010-04-24 17:59:49 +000016606"
Victor Stinnere0be4232011-10-25 13:06:09 +020016607if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016608
Martin v. Löwis11437992002-04-12 09:54:03 +000016609else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016610
Matthias Kloseb9621712010-04-24 17:59:49 +000016611$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016612
16613fi
16614
Michael W. Hudson54241132001-12-07 15:38:26 +000016615
Matthias Kloseb9621712010-04-24 17:59:49 +000016616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16617$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016618if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016619 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016620else
Matthias Kloseb9621712010-04-24 17:59:49 +000016621 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016622 ac_cv_broken_mbstowcs=no
16623else
Matthias Kloseb9621712010-04-24 17:59:49 +000016624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016625/* end confdefs.h. */
16626
Stefan Krah19c21392012-11-22 23:47:32 +010016627#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016628#include<stdlib.h>
16629int main() {
16630 size_t len = -1;
16631 const char *str = "text";
16632 len = mbstowcs(NULL, str, 0);
16633 return (len != 4);
16634}
16635
16636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016637if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016638 ac_cv_broken_mbstowcs=no
16639else
Matthias Kloseb9621712010-04-24 17:59:49 +000016640 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016644fi
16645
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016646fi
16647
Matthias Kloseb9621712010-04-24 17:59:49 +000016648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16649$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016650if test "$ac_cv_broken_mbstowcs" = yes
16651then
16652
Matthias Kloseb9621712010-04-24 17:59:49 +000016653$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016654
16655fi
16656
Antoine Pitroub52ec782009-01-25 16:34:23 +000016657# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16659$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016660
16661# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016662if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016663 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016664if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016665then
16666
Matthias Kloseb9621712010-04-24 17:59:49 +000016667$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016668
Matthias Kloseb9621712010-04-24 17:59:49 +000016669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16670$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016671fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016672if test "$withval" = no
16673then
16674
16675$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16676
Matthias Kloseb9621712010-04-24 17:59:49 +000016677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16678$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016679fi
16680
Antoine Pitrou042b1282010-08-13 21:15:58 +000016681else
16682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16683$as_echo "no value specified" >&6; }
16684fi
16685
Antoine Pitroub52ec782009-01-25 16:34:23 +000016686
Matthias Kloseb17289e2012-03-15 19:51:34 +010016687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16688$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16689if ${ac_cv_computed_gotos+:} false; then :
16690 $as_echo_n "(cached) " >&6
16691else
16692 if test "$cross_compiling" = yes; then :
16693 if test "${with_computed_gotos+set}" = set; then
16694 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16695 else
16696 ac_cv_computed_gotos=no
16697 fi
16698else
16699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16700/* end confdefs.h. */
16701
16702int main(int argc, char **argv)
16703{
16704 static void *targets[1] = { &&LABEL1 };
16705 goto LABEL2;
16706LABEL1:
16707 return 0;
16708LABEL2:
16709 goto *targets[0];
16710 return 1;
16711}
16712
16713_ACEOF
16714if ac_fn_c_try_run "$LINENO"; then :
16715 ac_cv_computed_gotos=yes
16716else
16717 ac_cv_computed_gotos=no
16718fi
16719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16720 conftest.$ac_objext conftest.beam conftest.$ac_ext
16721fi
16722
16723fi
16724
16725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16726$as_echo "$ac_cv_computed_gotos" >&6; }
16727case "$ac_cv_computed_gotos" in yes*)
16728
16729$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16730
16731esac
16732
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016733case $ac_sys_system in
16734AIX*)
16735
16736$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16737 ;;
16738esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016739
Michael W. Hudson54241132001-12-07 15:38:26 +000016740
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016741
16742
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016743for h in `(cd $srcdir;echo Python/thread_*.h)`
16744do
16745 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16746done
16747
Michael W. Hudson54241132001-12-07 15:38:26 +000016748
Victor Stinner21a74a92019-04-11 22:28:12 +020016749SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16751$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016752for dir in $SRCDIRS; do
16753 if test ! -d $dir; then
16754 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016755 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016756done
Matthias Kloseb9621712010-04-24 17:59:49 +000016757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16758$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016759
Stefan Krah1919b7e2012-03-21 18:25:23 +010016760# Availability of -O2:
16761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16762$as_echo_n "checking for -O2... " >&6; }
16763saved_cflags="$CFLAGS"
16764CFLAGS="-O2"
16765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16766/* end confdefs.h. */
16767
16768int
16769main ()
16770{
16771
16772
16773 ;
16774 return 0;
16775}
16776_ACEOF
16777if ac_fn_c_try_compile "$LINENO"; then :
16778 have_O2=yes
16779else
16780 have_O2=no
16781fi
16782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16784$as_echo "$have_O2" >&6; }
16785CFLAGS="$saved_cflags"
16786
16787# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16788# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16790$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16791saved_cflags="$CFLAGS"
16792CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16793if test "$have_O2" = no; then
16794 CFLAGS=""
16795fi
16796if test "$cross_compiling" = yes; then :
16797 have_glibc_memmove_bug=undefined
16798else
16799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16800/* end confdefs.h. */
16801
16802#include <stdio.h>
16803#include <stdlib.h>
16804#include <string.h>
16805void foo(void *p, void *q) { memmove(p, q, 19); }
16806int main() {
16807 char a[32] = "123456789000000000";
16808 foo(&a[9], a);
16809 if (strcmp(a, "123456789123456789000000000") != 0)
16810 return 1;
16811 foo(a, &a[9]);
16812 if (strcmp(a, "123456789000000000") != 0)
16813 return 1;
16814 return 0;
16815}
16816
16817_ACEOF
16818if ac_fn_c_try_run "$LINENO"; then :
16819 have_glibc_memmove_bug=no
16820else
16821 have_glibc_memmove_bug=yes
16822fi
16823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16824 conftest.$ac_objext conftest.beam conftest.$ac_ext
16825fi
16826
16827CFLAGS="$saved_cflags"
16828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16829$as_echo "$have_glibc_memmove_bug" >&6; }
16830if test "$have_glibc_memmove_bug" = yes; then
16831
16832$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16833
16834fi
16835
16836if test "$have_gcc_asm_for_x87" = yes; then
16837 # Some versions of gcc miscompile inline asm:
16838 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16839 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16840 case $CC in
16841 *gcc*)
16842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16843$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16844 saved_cflags="$CFLAGS"
16845 CFLAGS="-O2"
16846 if test "$cross_compiling" = yes; then :
16847 have_ipa_pure_const_bug=undefined
16848else
16849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16850/* end confdefs.h. */
16851
16852 __attribute__((noinline)) int
16853 foo(int *p) {
16854 int r;
16855 asm ( "movl \$6, (%1)\n\t"
16856 "xorl %0, %0\n\t"
16857 : "=r" (r) : "r" (p) : "memory"
16858 );
16859 return r;
16860 }
16861 int main() {
16862 int p = 8;
16863 if ((foo(&p) ? : p) != 6)
16864 return 1;
16865 return 0;
16866 }
16867
16868_ACEOF
16869if ac_fn_c_try_run "$LINENO"; then :
16870 have_ipa_pure_const_bug=no
16871else
16872 have_ipa_pure_const_bug=yes
16873fi
16874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16875 conftest.$ac_objext conftest.beam conftest.$ac_ext
16876fi
16877
16878 CFLAGS="$saved_cflags"
16879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16880$as_echo "$have_ipa_pure_const_bug" >&6; }
16881 if test "$have_ipa_pure_const_bug" = yes; then
16882
16883$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16884
16885 fi
16886 ;;
16887 esac
16888fi
16889
Victor Stinner4f5366e2015-01-09 02:13:19 +010016890# Check for stdatomic.h
16891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16892$as_echo_n "checking for stdatomic.h... " >&6; }
16893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16894/* end confdefs.h. */
16895
16896
16897 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016898 atomic_int int_var;
16899 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016900 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016901 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16902 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16903 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016904 return 0;
16905 }
16906
16907
16908_ACEOF
16909if ac_fn_c_try_link "$LINENO"; then :
16910 have_stdatomic_h=yes
16911else
16912 have_stdatomic_h=no
16913fi
16914rm -f core conftest.err conftest.$ac_objext \
16915 conftest$ac_exeext conftest.$ac_ext
16916
16917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16918$as_echo "$have_stdatomic_h" >&6; }
16919
16920if test "$have_stdatomic_h" = yes; then
16921
16922$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16923
16924fi
16925
16926# Check for GCC >= 4.7 __atomic builtins
16927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16928$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16930/* end confdefs.h. */
16931
16932
16933 volatile int val = 1;
16934 int main() {
16935 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16936 return 0;
16937 }
16938
16939
16940_ACEOF
16941if ac_fn_c_try_link "$LINENO"; then :
16942 have_builtin_atomic=yes
16943else
16944 have_builtin_atomic=no
16945fi
16946rm -f core conftest.err conftest.$ac_objext \
16947 conftest$ac_exeext conftest.$ac_ext
16948
16949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16950$as_echo "$have_builtin_atomic" >&6; }
16951
16952if test "$have_builtin_atomic" = yes; then
16953
16954$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16955
16956fi
16957
Ned Deily322f5ba2013-11-21 23:01:59 -080016958# ensurepip option
16959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16960$as_echo_n "checking for ensurepip... " >&6; }
16961
16962# Check whether --with-ensurepip was given.
16963if test "${with_ensurepip+set}" = set; then :
16964 withval=$with_ensurepip;
16965else
16966 with_ensurepip=upgrade
16967fi
16968
16969case $with_ensurepip in #(
16970 yes|upgrade) :
16971 ENSUREPIP=upgrade ;; #(
16972 install) :
16973 ENSUREPIP=install ;; #(
16974 no) :
16975 ENSUREPIP=no ;; #(
16976 *) :
16977 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16978esac
16979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16980$as_echo "$ENSUREPIP" >&6; }
16981
16982
Victor Stinner35a97c02015-03-08 02:59:09 +010016983# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16985$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16987/* end confdefs.h. */
16988
16989
16990 #include <dirent.h>
16991
16992 int main() {
16993 struct dirent entry;
16994 return entry.d_type == DT_UNKNOWN;
16995 }
16996
16997
16998_ACEOF
16999if ac_fn_c_try_link "$LINENO"; then :
17000 have_dirent_d_type=yes
17001else
17002 have_dirent_d_type=no
17003fi
17004rm -f core conftest.err conftest.$ac_objext \
17005 conftest$ac_exeext conftest.$ac_ext
17006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17007$as_echo "$have_dirent_d_type" >&6; }
17008
17009if test "$have_dirent_d_type" = yes; then
17010
17011$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17012
17013fi
17014
Victor Stinner9eb57c52015-03-19 22:21:49 +010017015# check if the Linux getrandom() syscall is available
17016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17017$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17019/* end confdefs.h. */
17020
17021
Victor Stinner1b80b242016-04-12 22:34:58 +020017022 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017023 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017024 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017025
17026 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017027 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017028 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017029 const int flags = GRND_NONBLOCK;
17030 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017031 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017032 return 0;
17033 }
17034
17035
17036_ACEOF
17037if ac_fn_c_try_link "$LINENO"; then :
17038 have_getrandom_syscall=yes
17039else
17040 have_getrandom_syscall=no
17041fi
17042rm -f core conftest.err conftest.$ac_objext \
17043 conftest$ac_exeext conftest.$ac_ext
17044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17045$as_echo "$have_getrandom_syscall" >&6; }
17046
17047if test "$have_getrandom_syscall" = yes; then
17048
17049$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17050
17051fi
17052
Victor Stinner3abf44e2015-09-18 15:38:37 +020017053# check if the getrandom() function is available
17054# the test was written for the Solaris function of <sys/random.h>
17055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17056$as_echo_n "checking for the getrandom() function... " >&6; }
17057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17058/* end confdefs.h. */
17059
17060
17061 #include <sys/random.h>
17062
17063 int main() {
17064 char buffer[1];
17065 const size_t buflen = sizeof(buffer);
17066 const int flags = 0;
17067 /* ignore the result, Python checks for ENOSYS at runtime */
17068 (void)getrandom(buffer, buflen, flags);
17069 return 0;
17070 }
17071
17072
17073_ACEOF
17074if ac_fn_c_try_link "$LINENO"; then :
17075 have_getrandom=yes
17076else
17077 have_getrandom=no
17078fi
17079rm -f core conftest.err conftest.$ac_objext \
17080 conftest$ac_exeext conftest.$ac_ext
17081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17082$as_echo "$have_getrandom" >&6; }
17083
17084if test "$have_getrandom" = yes; then
17085
17086$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17087
17088fi
17089
Neil Schemenauer5741c452019-02-08 10:48:46 -080017090# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17091# shm_* may only be available if linking against librt
17092save_LIBS="$LIBS"
17093save_includes_default="$ac_includes_default"
17094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17095$as_echo_n "checking for library containing shm_open... " >&6; }
17096if ${ac_cv_search_shm_open+:} false; then :
17097 $as_echo_n "(cached) " >&6
17098else
17099 ac_func_search_save_LIBS=$LIBS
17100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17101/* end confdefs.h. */
17102
17103/* Override any GCC internal prototype to avoid an error.
17104 Use char because int might match the return type of a GCC
17105 builtin and then its argument prototype would still apply. */
17106#ifdef __cplusplus
17107extern "C"
17108#endif
17109char shm_open ();
17110int
17111main ()
17112{
17113return shm_open ();
17114 ;
17115 return 0;
17116}
17117_ACEOF
17118for ac_lib in '' rt; do
17119 if test -z "$ac_lib"; then
17120 ac_res="none required"
17121 else
17122 ac_res=-l$ac_lib
17123 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17124 fi
17125 if ac_fn_c_try_link "$LINENO"; then :
17126 ac_cv_search_shm_open=$ac_res
17127fi
17128rm -f core conftest.err conftest.$ac_objext \
17129 conftest$ac_exeext
17130 if ${ac_cv_search_shm_open+:} false; then :
17131 break
17132fi
17133done
17134if ${ac_cv_search_shm_open+:} false; then :
17135
17136else
17137 ac_cv_search_shm_open=no
17138fi
17139rm conftest.$ac_ext
17140LIBS=$ac_func_search_save_LIBS
17141fi
17142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17143$as_echo "$ac_cv_search_shm_open" >&6; }
17144ac_res=$ac_cv_search_shm_open
17145if test "$ac_res" != no; then :
17146 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17147
17148fi
17149
17150if test "$ac_cv_search_shm_open" = "-lrt"; then
17151
17152$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17153
17154fi
17155for ac_header in sys/mman.h
17156do :
17157 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17158if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17159 cat >>confdefs.h <<_ACEOF
17160#define HAVE_SYS_MMAN_H 1
17161_ACEOF
17162
17163fi
17164
17165done
17166
17167# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17168ac_includes_default="\
17169${ac_includes_default}
17170#ifndef __cplusplus
17171# ifdef HAVE_SYS_MMAN_H
17172# include <sys/mman.h>
17173# endif
17174#endif
17175"
17176for ac_func in shm_open shm_unlink
17177do :
17178 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17179ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17180if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17181 cat >>confdefs.h <<_ACEOF
17182#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17183_ACEOF
17184
17185fi
17186done
17187
17188# we don't want to link with librt always, restore LIBS
17189LIBS="$save_LIBS"
17190ac_includes_default="$save_includes_default"
17191
Christian Heimesff5be6e2018-01-20 13:19:21 +010017192# Check for usable OpenSSL
17193
17194 found=false
17195
17196# Check whether --with-openssl was given.
17197if test "${with_openssl+set}" = set; then :
17198 withval=$with_openssl;
17199 case "$withval" in
17200 "" | y | ye | yes | n | no)
17201 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17202 ;;
17203 *) ssldirs="$withval"
17204 ;;
17205 esac
17206
17207else
17208
17209 # if pkg-config is installed and openssl has installed a .pc file,
17210 # then use that information and don't search ssldirs
17211 if test -n "$ac_tool_prefix"; then
17212 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17213set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17215$as_echo_n "checking for $ac_word... " >&6; }
17216if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17217 $as_echo_n "(cached) " >&6
17218else
17219 if test -n "$PKG_CONFIG"; then
17220 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17221else
17222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17223for as_dir in $PATH
17224do
17225 IFS=$as_save_IFS
17226 test -z "$as_dir" && as_dir=.
17227 for ac_exec_ext in '' $ac_executable_extensions; do
17228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17229 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17231 break 2
17232 fi
17233done
17234 done
17235IFS=$as_save_IFS
17236
17237fi
17238fi
17239PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17240if test -n "$PKG_CONFIG"; then
17241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17242$as_echo "$PKG_CONFIG" >&6; }
17243else
17244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17245$as_echo "no" >&6; }
17246fi
17247
17248
17249fi
17250if test -z "$ac_cv_prog_PKG_CONFIG"; then
17251 ac_ct_PKG_CONFIG=$PKG_CONFIG
17252 # Extract the first word of "pkg-config", so it can be a program name with args.
17253set dummy pkg-config; ac_word=$2
17254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17255$as_echo_n "checking for $ac_word... " >&6; }
17256if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17257 $as_echo_n "(cached) " >&6
17258else
17259 if test -n "$ac_ct_PKG_CONFIG"; then
17260 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17261else
17262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17263for as_dir in $PATH
17264do
17265 IFS=$as_save_IFS
17266 test -z "$as_dir" && as_dir=.
17267 for ac_exec_ext in '' $ac_executable_extensions; do
17268 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17269 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17270 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17271 break 2
17272 fi
17273done
17274 done
17275IFS=$as_save_IFS
17276
17277fi
17278fi
17279ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17280if test -n "$ac_ct_PKG_CONFIG"; then
17281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17282$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17283else
17284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17285$as_echo "no" >&6; }
17286fi
17287
17288 if test "x$ac_ct_PKG_CONFIG" = x; then
17289 PKG_CONFIG=""
17290 else
17291 case $cross_compiling:$ac_tool_warned in
17292yes:)
17293{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17294$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17295ac_tool_warned=yes ;;
17296esac
17297 PKG_CONFIG=$ac_ct_PKG_CONFIG
17298 fi
17299else
17300 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17301fi
17302
17303 if test x"$PKG_CONFIG" != x""; then
17304 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17305 if test $? = 0; then
17306 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17307 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17308 found=true
17309 fi
17310 fi
17311
17312 # no such luck; use some default ssldirs
17313 if ! $found; then
17314 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17315 fi
17316
17317
17318fi
17319
17320
17321
17322 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17323 # an 'openssl' subdirectory
17324
17325 if ! $found; then
17326 OPENSSL_INCLUDES=
17327 for ssldir in $ssldirs; do
17328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17329$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17330 if test -f "$ssldir/include/openssl/ssl.h"; then
17331 OPENSSL_INCLUDES="-I$ssldir/include"
17332 OPENSSL_LDFLAGS="-L$ssldir/lib"
17333 OPENSSL_LIBS="-lssl -lcrypto"
17334 found=true
17335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17336$as_echo "yes" >&6; }
17337 break
17338 else
17339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17340$as_echo "no" >&6; }
17341 fi
17342 done
17343
17344 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17345 # it will just work!
17346 fi
17347
17348 # try the preprocessor and linker with our new flags,
17349 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17350
17351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17352$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17353 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17354 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17355
17356 save_LIBS="$LIBS"
17357 save_LDFLAGS="$LDFLAGS"
17358 save_CPPFLAGS="$CPPFLAGS"
17359 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17360 LIBS="$OPENSSL_LIBS $LIBS"
17361 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17363/* end confdefs.h. */
17364#include <openssl/ssl.h>
17365int
17366main ()
17367{
17368SSL_new(NULL)
17369 ;
17370 return 0;
17371}
17372_ACEOF
17373if ac_fn_c_try_link "$LINENO"; then :
17374
17375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17376$as_echo "yes" >&6; }
17377 have_openssl=yes
17378
17379else
17380
17381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17382$as_echo "no" >&6; }
17383 have_openssl=no
17384
17385fi
17386rm -f core conftest.err conftest.$ac_objext \
17387 conftest$ac_exeext conftest.$ac_ext
17388 CPPFLAGS="$save_CPPFLAGS"
17389 LDFLAGS="$save_LDFLAGS"
17390 LIBS="$save_LIBS"
17391
17392
17393
17394
17395
17396
17397if test "$have_openssl" = yes; then
17398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17399$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17400
17401 save_LIBS="$LIBS"
17402 save_LDFLAGS="$LDFLAGS"
17403 save_CPPFLAGS="$CPPFLAGS"
17404 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17405 LIBS="$OPENSSL_LIBS $LIBS"
17406 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17407
17408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17409/* end confdefs.h. */
17410
17411 #include <openssl/x509_vfy.h>
17412
17413int
17414main ()
17415{
17416
17417 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17418 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17419 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17420 X509_VERIFY_PARAM_set_hostflags(p, 0);
17421
17422 ;
17423 return 0;
17424}
17425
17426_ACEOF
17427if ac_fn_c_try_link "$LINENO"; then :
17428
17429 ac_cv_has_x509_verify_param_set1_host=yes
17430
17431else
17432
17433 ac_cv_has_x509_verify_param_set1_host=no
17434
17435fi
17436rm -f core conftest.err conftest.$ac_objext \
17437 conftest$ac_exeext conftest.$ac_ext
17438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17439$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17440 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17441
17442$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17443
17444 fi
17445
17446 CPPFLAGS="$save_CPPFLAGS"
17447 LDFLAGS="$save_LDFLAGS"
17448 LIBS="$save_LIBS"
17449fi
17450
Christian Heimes892d66e2018-01-29 14:10:18 +010017451# ssl module default cipher suite string
17452
17453
17454
17455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17456$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17457
17458# Check whether --with-ssl-default-suites was given.
17459if test "${with_ssl_default_suites+set}" = set; then :
17460 withval=$with_ssl_default_suites;
17461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17462$as_echo "$withval" >&6; }
17463case "$withval" in
17464 python)
17465 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17466
17467 ;;
17468 openssl)
17469 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17470
17471 ;;
17472 *)
17473 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17474
17475 cat >>confdefs.h <<_ACEOF
17476#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17477_ACEOF
17478
17479 ;;
17480esac
17481
17482else
17483
17484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17485$as_echo "python" >&6; }
17486$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17487
17488
17489fi
17490
17491
17492
Guido van Rossum627b2d71993-12-24 10:39:16 +000017493# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017494ac_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 +000017495
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017496ac_config_files="$ac_config_files Modules/ld_so_aix"
17497
Martin v. Löwis11437992002-04-12 09:54:03 +000017498cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017499# This file is a shell script that caches the results of configure
17500# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017501# scripts and configure runs, see configure's option --config-cache.
17502# It is not useful on other systems. If it contains results you don't
17503# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017504#
Martin v. Löwis11437992002-04-12 09:54:03 +000017505# config.status only pays attention to the cache file if you give it
17506# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017507#
Skip Montanaro6dead952003-09-25 14:50:04 +000017508# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017509# loading this file, other *unset* `ac_cv_foo' will be assigned the
17510# following values.
17511
17512_ACEOF
17513
Guido van Rossumf78abae1997-01-21 22:02:36 +000017514# The following way of writing the cache mishandles newlines in values,
17515# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017517# Ultrix sh set writes to stderr and can't be redirected directly,
17518# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017519(
17520 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17521 eval ac_val=\$$ac_var
17522 case $ac_val in #(
17523 *${as_nl}*)
17524 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017525 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17526$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527 esac
17528 case $ac_var in #(
17529 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017530 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17531 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017532 esac ;;
17533 esac
17534 done
17535
Martin v. Löwis11437992002-04-12 09:54:03 +000017536 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17538 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017539 # `set' does not quote correctly, so add quotes: double-quote
17540 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017541 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017542 "s/'/'\\\\''/g;
17543 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017545 *)
17546 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017548 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549 esac |
17550 sort
17551) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017554 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17557 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17559 :end' >>confcache
17560if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17561 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017562 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017563 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17564$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017565 if test ! -f "$cache_file" || test -h "$cache_file"; then
17566 cat confcache >"$cache_file"
17567 else
17568 case $cache_file in #(
17569 */* | ?:*)
17570 mv -f confcache "$cache_file"$$ &&
17571 mv -f "$cache_file"$$ "$cache_file" ;; #(
17572 *)
17573 mv -f confcache "$cache_file" ;;
17574 esac
17575 fi
17576 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017577 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017578 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17579$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017580 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017581fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017582rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017583
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017584test "x$prefix" = xNONE && prefix=$ac_default_prefix
17585# Let make expand exec_prefix.
17586test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017587
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017588DEFS=-DHAVE_CONFIG_H
17589
Skip Montanaro6dead952003-09-25 14:50:04 +000017590ac_libobjs=
17591ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017592U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017593for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17594 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017595 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017596 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17598 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017599 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17600 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017601done
17602LIBOBJS=$ac_libobjs
17603
17604LTLIBOBJS=$ac_ltlibobjs
17605
17606
Martin v. Löwis11437992002-04-12 09:54:03 +000017607
Matthias Kloseb9621712010-04-24 17:59:49 +000017608
Victor Stinnere0be4232011-10-25 13:06:09 +020017609: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017610ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017611ac_clean_files_save=$ac_clean_files
17612ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017613{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17614$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17615as_write_fail=0
17616cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017617#! $SHELL
17618# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017619# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017620# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017621# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017622
Martin v. Löwis11437992002-04-12 09:54:03 +000017623debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017624ac_cs_recheck=false
17625ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017626
Matthias Kloseb9621712010-04-24 17:59:49 +000017627SHELL=\${CONFIG_SHELL-$SHELL}
17628export SHELL
17629_ASEOF
17630cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17631## -------------------- ##
17632## M4sh Initialization. ##
17633## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635# Be more Bourne compatible
17636DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017637if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017638 emulate sh
17639 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017640 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017641 # is contrary to our usage. Disable this feature.
17642 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017644else
Matthias Kloseb9621712010-04-24 17:59:49 +000017645 case `(set -o) 2>/dev/null` in #(
17646 *posix*) :
17647 set -o posix ;; #(
17648 *) :
17649 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017651fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017652
17653
Matthias Kloseb9621712010-04-24 17:59:49 +000017654as_nl='
17655'
17656export as_nl
17657# Printing a long string crashes Solaris 7 /usr/bin/printf.
17658as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17659as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17660as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17661# Prefer a ksh shell builtin over an external printf program on Solaris,
17662# but without wasting forks for bash or zsh.
17663if test -z "$BASH_VERSION$ZSH_VERSION" \
17664 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17665 as_echo='print -r --'
17666 as_echo_n='print -rn --'
17667elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17668 as_echo='printf %s\n'
17669 as_echo_n='printf %s'
17670else
17671 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17672 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17673 as_echo_n='/usr/ucb/echo -n'
17674 else
17675 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17676 as_echo_n_body='eval
17677 arg=$1;
17678 case $arg in #(
17679 *"$as_nl"*)
17680 expr "X$arg" : "X\\(.*\\)$as_nl";
17681 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17682 esac;
17683 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17684 '
17685 export as_echo_n_body
17686 as_echo_n='sh -c $as_echo_n_body as_echo'
17687 fi
17688 export as_echo_body
17689 as_echo='sh -c $as_echo_body as_echo'
17690fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017691
17692# The user is always right.
17693if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017694 PATH_SEPARATOR=:
17695 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17696 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17697 PATH_SEPARATOR=';'
17698 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017699fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701
17702# IFS
17703# We need space, tab and new line, in precisely that order. Quoting is
17704# there to prevent editors from complaining about space-tab.
17705# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17706# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707IFS=" "" $as_nl"
17708
17709# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017710as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017711case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712 *[\\/]* ) as_myself=$0 ;;
17713 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017714for as_dir in $PATH
17715do
17716 IFS=$as_save_IFS
17717 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017718 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17719 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 ;;
17723esac
17724# We did not find ourselves, most probably we were run as `sh COMMAND'
17725# in which case we are not to be found in the path.
17726if test "x$as_myself" = x; then
17727 as_myself=$0
17728fi
17729if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017730 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17731 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732fi
17733
Matthias Kloseb9621712010-04-24 17:59:49 +000017734# Unset variables that we do not need and which cause bugs (e.g. in
17735# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17736# suppresses any "Segmentation fault" message there. '((' could
17737# trigger a bug in pdksh 5.2.14.
17738for as_var in BASH_ENV ENV MAIL MAILPATH
17739do eval test x\${$as_var+set} = xset \
17740 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741done
17742PS1='$ '
17743PS2='> '
17744PS4='+ '
17745
17746# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017747LC_ALL=C
17748export LC_ALL
17749LANGUAGE=C
17750export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751
Matthias Kloseb9621712010-04-24 17:59:49 +000017752# CDPATH.
17753(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17754
17755
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017756# as_fn_error STATUS ERROR [LINENO LOG_FD]
17757# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017758# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17759# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017760# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017761as_fn_error ()
17762{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017763 as_status=$1; test $as_status -eq 0 && as_status=1
17764 if test "$4"; then
17765 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17766 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017767 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017768 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017769 as_fn_exit $as_status
17770} # as_fn_error
17771
17772
17773# as_fn_set_status STATUS
17774# -----------------------
17775# Set $? to STATUS, without forking.
17776as_fn_set_status ()
17777{
17778 return $1
17779} # as_fn_set_status
17780
17781# as_fn_exit STATUS
17782# -----------------
17783# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17784as_fn_exit ()
17785{
17786 set +e
17787 as_fn_set_status $1
17788 exit $1
17789} # as_fn_exit
17790
17791# as_fn_unset VAR
17792# ---------------
17793# Portably unset VAR.
17794as_fn_unset ()
17795{
17796 { eval $1=; unset $1;}
17797}
17798as_unset=as_fn_unset
17799# as_fn_append VAR VALUE
17800# ----------------------
17801# Append the text in VALUE to the end of the definition contained in VAR. Take
17802# advantage of any shell optimizations that allow amortized linear growth over
17803# repeated appends, instead of the typical quadratic growth present in naive
17804# implementations.
17805if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17806 eval 'as_fn_append ()
17807 {
17808 eval $1+=\$2
17809 }'
17810else
17811 as_fn_append ()
17812 {
17813 eval $1=\$$1\$2
17814 }
17815fi # as_fn_append
17816
17817# as_fn_arith ARG...
17818# ------------------
17819# Perform arithmetic evaluation on the ARGs, and store the result in the
17820# global $as_val. Take advantage of shells that can avoid forks. The arguments
17821# must be portable across $(()) and expr.
17822if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17823 eval 'as_fn_arith ()
17824 {
17825 as_val=$(( $* ))
17826 }'
17827else
17828 as_fn_arith ()
17829 {
17830 as_val=`expr "$@" || test $? -eq 1`
17831 }
17832fi # as_fn_arith
17833
17834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017835if expr a : '\(a\)' >/dev/null 2>&1 &&
17836 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17837 as_expr=expr
17838else
17839 as_expr=false
17840fi
17841
17842if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17843 as_basename=basename
17844else
17845 as_basename=false
17846fi
17847
Matthias Kloseb9621712010-04-24 17:59:49 +000017848if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17849 as_dirname=dirname
17850else
17851 as_dirname=false
17852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854as_me=`$as_basename -- "$0" ||
17855$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17856 X"$0" : 'X\(//\)$' \| \
17857 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017858$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859 sed '/^.*\/\([^/][^/]*\)\/*$/{
17860 s//\1/
17861 q
17862 }
17863 /^X\/\(\/\/\)$/{
17864 s//\1/
17865 q
17866 }
17867 /^X\/\(\/\).*/{
17868 s//\1/
17869 q
17870 }
17871 s/.*/./; q'`
17872
Matthias Kloseb9621712010-04-24 17:59:49 +000017873# Avoid depending upon Character Ranges.
17874as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17875as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17876as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17877as_cr_digits='0123456789'
17878as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879
17880ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017881case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017882-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017883 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017885 xy) ECHO_C='\c';;
17886 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17887 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888 esac;;
17889*)
17890 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017891esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017892
Martin v. Löwis11437992002-04-12 09:54:03 +000017893rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017894if test -d conf$$.dir; then
17895 rm -f conf$$.dir/conf$$.file
17896else
17897 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017898 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017900if (echo >conf$$.file) 2>/dev/null; then
17901 if ln -s conf$$.file conf$$ 2>/dev/null; then
17902 as_ln_s='ln -s'
17903 # ... but there are two gotchas:
17904 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17905 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017906 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017907 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017908 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017909 elif ln conf$$.file conf$$ 2>/dev/null; then
17910 as_ln_s=ln
17911 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017912 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017914else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017915 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17918rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017919
Matthias Kloseb9621712010-04-24 17:59:49 +000017920
17921# as_fn_mkdir_p
17922# -------------
17923# Create "$as_dir" as a directory, including parents if necessary.
17924as_fn_mkdir_p ()
17925{
17926
17927 case $as_dir in #(
17928 -*) as_dir=./$as_dir;;
17929 esac
17930 test -d "$as_dir" || eval $as_mkdir_p || {
17931 as_dirs=
17932 while :; do
17933 case $as_dir in #(
17934 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17935 *) as_qdir=$as_dir;;
17936 esac
17937 as_dirs="'$as_qdir' $as_dirs"
17938 as_dir=`$as_dirname -- "$as_dir" ||
17939$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17940 X"$as_dir" : 'X\(//\)[^/]' \| \
17941 X"$as_dir" : 'X\(//\)$' \| \
17942 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17943$as_echo X"$as_dir" |
17944 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17945 s//\1/
17946 q
17947 }
17948 /^X\(\/\/\)[^/].*/{
17949 s//\1/
17950 q
17951 }
17952 /^X\(\/\/\)$/{
17953 s//\1/
17954 q
17955 }
17956 /^X\(\/\).*/{
17957 s//\1/
17958 q
17959 }
17960 s/.*/./; q'`
17961 test -d "$as_dir" && break
17962 done
17963 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017964 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017965
17966
17967} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017968if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017969 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017970else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017971 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017972 as_mkdir_p=false
17973fi
17974
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017975
17976# as_fn_executable_p FILE
17977# -----------------------
17978# Test if FILE is an executable regular file.
17979as_fn_executable_p ()
17980{
17981 test -f "$1" && test -x "$1"
17982} # as_fn_executable_p
17983as_test_x='test -x'
17984as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017985
17986# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017987as_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 +000017988
17989# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017990as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017991
17992
Martin v. Löwis11437992002-04-12 09:54:03 +000017993exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017994## ----------------------------------- ##
17995## Main body of $CONFIG_STATUS script. ##
17996## ----------------------------------- ##
17997_ASEOF
17998test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017999
Matthias Kloseb9621712010-04-24 17:59:49 +000018000cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18001# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018002# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003# values after options handling.
18004ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018005This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018006generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018007
18008 CONFIG_FILES = $CONFIG_FILES
18009 CONFIG_HEADERS = $CONFIG_HEADERS
18010 CONFIG_LINKS = $CONFIG_LINKS
18011 CONFIG_COMMANDS = $CONFIG_COMMANDS
18012 $ $0 $@
18013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014on `(hostname || uname -n) 2>/dev/null | sed 1q`
18015"
18016
Martin v. Löwis11437992002-04-12 09:54:03 +000018017_ACEOF
18018
Matthias Kloseb9621712010-04-24 17:59:49 +000018019case $ac_config_files in *"
18020"*) set x $ac_config_files; shift; ac_config_files=$*;;
18021esac
18022
18023case $ac_config_headers in *"
18024"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18025esac
18026
18027
18028cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018029# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018030config_files="$ac_config_files"
18031config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018034
Matthias Kloseb9621712010-04-24 17:59:49 +000018035cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018036ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018037\`$as_me' instantiates files and other configuration actions
18038from templates according to the current configuration. Unless the files
18039and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018040
Matthias Kloseb9621712010-04-24 17:59:49 +000018041Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018042
18043 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018045 --config print configuration, then exit
18046 -q, --quiet, --silent
18047 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018048 -d, --debug don't remove temporary files
18049 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018050 --file=FILE[:TEMPLATE]
18051 instantiate the configuration file FILE
18052 --header=FILE[:TEMPLATE]
18053 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018054
18055Configuration files:
18056$config_files
18057
18058Configuration headers:
18059$config_headers
18060
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018061Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018064cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18065ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018066ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018067python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018068configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018069 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018070
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018071Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018072This config.status script is free software; the Free Software Foundation
18073gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074
18075ac_pwd='$ac_pwd'
18076srcdir='$srcdir'
18077INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018078MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018079test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018080_ACEOF
18081
Matthias Kloseb9621712010-04-24 17:59:49 +000018082cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18083# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018084ac_need_defaults=:
18085while test $# != 0
18086do
18087 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018088 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018089 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18090 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018091 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018092 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018093 --*=)
18094 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18095 ac_optarg=
18096 ac_shift=:
18097 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018099 ac_option=$1
18100 ac_optarg=$2
18101 ac_shift=shift
18102 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018103 esac
18104
Skip Montanaro6dead952003-09-25 14:50:04 +000018105 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018106 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018107 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18108 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018109 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018110 $as_echo "$ac_cs_version"; exit ;;
18111 --config | --confi | --conf | --con | --co | --c )
18112 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018114 debug=: ;;
18115 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018116 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018117 case $ac_optarg in
18118 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018119 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018120 esac
18121 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018122 ac_need_defaults=false;;
18123 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018124 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018125 case $ac_optarg in
18126 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18127 esac
18128 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018129 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130 --he | --h)
18131 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018132 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018133Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018134 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018135 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018136 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18137 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18138 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018139
18140 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018141 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018142Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018143
Matthias Kloseb9621712010-04-24 17:59:49 +000018144 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018145 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018146
18147 esac
18148 shift
18149done
18150
Skip Montanaro6dead952003-09-25 14:50:04 +000018151ac_configure_extra_args=
18152
18153if $ac_cs_silent; then
18154 exec 6>/dev/null
18155 ac_configure_extra_args="$ac_configure_extra_args --silent"
18156fi
18157
18158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018159cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018160if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018161 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018162 shift
18163 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18164 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018165 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018166 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018167fi
18168
Martin v. Löwis11437992002-04-12 09:54:03 +000018169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018170cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171exec 5>>config.log
18172{
18173 echo
18174 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18175## Running $as_me. ##
18176_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018177 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018178} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018181cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018183
Matthias Kloseb9621712010-04-24 17:59:49 +000018184cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018185
18186# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018187for ac_config_target in $ac_config_targets
18188do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018189 case $ac_config_target in
18190 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18191 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18192 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018193 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18194 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018196 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018197 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018198 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018199 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018200
Victor Stinnere0be4232011-10-25 13:06:09 +020018201 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018202 esac
18203done
18204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018205
Martin v. Löwis11437992002-04-12 09:54:03 +000018206# If the user did not use the arguments to specify the items to instantiate,
18207# then the envvar interface is used. Set only those that are not.
18208# We use the long form for the default assignment because of an extremely
18209# bizarre bug on SunOS 4.1.3.
18210if $ac_need_defaults; then
18211 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18212 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18213fi
18214
Skip Montanaro6dead952003-09-25 14:50:04 +000018215# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018216# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018217# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018218# Hook for its removal unless debugging.
18219# Note that there is a small window in which the directory will not be cleaned:
18220# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018221$debug ||
18222{
Victor Stinnere0be4232011-10-25 13:06:09 +020018223 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018225 : "${ac_tmp:=$tmp}"
18226 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018227' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018228 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018229}
Martin v. Löwis11437992002-04-12 09:54:03 +000018230# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018231
Martin v. Löwis11437992002-04-12 09:54:03 +000018232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018233 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018234 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018235} ||
18236{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018237 tmp=./conf$$-$RANDOM
18238 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018239} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018240ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018241
Matthias Kloseb9621712010-04-24 17:59:49 +000018242# Set up the scripts for CONFIG_FILES section.
18243# No need to generate them if there are no CONFIG_FILES.
18244# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018245if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018246
Matthias Kloseb9621712010-04-24 17:59:49 +000018247
18248ac_cr=`echo X | tr X '\015'`
18249# On cygwin, bash can eat \r inside `` if the user requested igncr.
18250# But we know of no other shell where ac_cr would be empty at this
18251# point, so we can use a bashism as a fallback.
18252if test "x$ac_cr" = x; then
18253 eval ac_cr=\$\'\\r\'
18254fi
18255ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18256if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018257 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018258else
18259 ac_cs_awk_cr=$ac_cr
18260fi
18261
Victor Stinnere0be4232011-10-25 13:06:09 +020018262echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018263_ACEOF
18264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018265
Matthias Kloseb9621712010-04-24 17:59:49 +000018266{
18267 echo "cat >conf$$subs.awk <<_ACEOF" &&
18268 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18269 echo "_ACEOF"
18270} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018271 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18272ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273ac_delim='%!_!# '
18274for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018275 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018276 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018277
Matthias Kloseb9621712010-04-24 17:59:49 +000018278 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18279 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280 break
18281 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018282 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018283 else
18284 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018285 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018286done
Matthias Kloseb9621712010-04-24 17:59:49 +000018287rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018288
Matthias Kloseb9621712010-04-24 17:59:49 +000018289cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018290cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018292sed -n '
18293h
18294s/^/S["/; s/!.*/"]=/
18295p
18296g
18297s/^[^!]*!//
18298:repl
18299t repl
18300s/'"$ac_delim"'$//
18301t delim
18302:nl
18303h
18304s/\(.\{148\}\)..*/\1/
18305t more1
18306s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18307p
18308n
18309b repl
18310:more1
18311s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18312p
18313g
18314s/.\{148\}//
18315t nl
18316:delim
18317h
18318s/\(.\{148\}\)..*/\1/
18319t more2
18320s/["\\]/\\&/g; s/^/"/; s/$/"/
18321p
18322b
18323:more2
18324s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18325p
18326g
18327s/.\{148\}//
18328t delim
18329' <conf$$subs.awk | sed '
18330/^[^""]/{
18331 N
18332 s/\n//
18333}
18334' >>$CONFIG_STATUS || ac_write_fail=1
18335rm -f conf$$subs.awk
18336cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18337_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018338cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018339 for (key in S) S_is_set[key] = 1
18340 FS = ""
18341
18342}
18343{
18344 line = $ 0
18345 nfields = split(line, field, "@")
18346 substed = 0
18347 len = length(field[1])
18348 for (i = 2; i < nfields; i++) {
18349 key = field[i]
18350 keylen = length(key)
18351 if (S_is_set[key]) {
18352 value = S[key]
18353 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18354 len += length(value) + length(field[++i])
18355 substed = 1
18356 } else
18357 len += 1 + keylen
18358 }
18359
18360 print line
18361}
18362
18363_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018365cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18366if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18367 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18368else
18369 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018370fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018371 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018372_ACEOF
18373
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018374# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18375# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018376# trailing colons and then remove the whole line if VPATH becomes empty
18377# (actually we leave an empty line to preserve line numbers).
18378if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018379 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18380h
18381s///
18382s/^/:/
18383s/[ ]*$/:/
18384s/:\$(srcdir):/:/g
18385s/:\${srcdir}:/:/g
18386s/:@srcdir@:/:/g
18387s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018388s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018389x
18390s/\(=[ ]*\).*/\1/
18391G
18392s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018393s/^[^=]*=[ ]*$//
18394}'
18395fi
18396
Matthias Kloseb9621712010-04-24 17:59:49 +000018397cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018398fi # test -n "$CONFIG_FILES"
18399
Matthias Kloseb9621712010-04-24 17:59:49 +000018400# Set up the scripts for CONFIG_HEADERS section.
18401# No need to generate them if there are no CONFIG_HEADERS.
18402# This happens for instance with `./config.status Makefile'.
18403if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018404cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018405BEGIN {
18406_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018407
Matthias Kloseb9621712010-04-24 17:59:49 +000018408# Transform confdefs.h into an awk script `defines.awk', embedded as
18409# here-document in config.status, that substitutes the proper values into
18410# config.h.in to produce config.h.
18411
18412# Create a delimiter string that does not exist in confdefs.h, to ease
18413# handling of long lines.
18414ac_delim='%!_!# '
18415for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018416 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18417 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018418 break
18419 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018420 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018421 else
18422 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18423 fi
18424done
18425
18426# For the awk script, D is an array of macro values keyed by name,
18427# likewise P contains macro parameters if any. Preserve backslash
18428# newline sequences.
18429
18430ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18431sed -n '
18432s/.\{148\}/&'"$ac_delim"'/g
18433t rset
18434:rset
18435s/^[ ]*#[ ]*define[ ][ ]*/ /
18436t def
18437d
18438:def
18439s/\\$//
18440t bsnl
18441s/["\\]/\\&/g
18442s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18443D["\1"]=" \3"/p
18444s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18445d
18446:bsnl
18447s/["\\]/\\&/g
18448s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18449D["\1"]=" \3\\\\\\n"\\/p
18450t cont
18451s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18452t cont
18453d
18454:cont
18455n
18456s/.\{148\}/&'"$ac_delim"'/g
18457t clear
18458:clear
18459s/\\$//
18460t bsnlc
18461s/["\\]/\\&/g; s/^/"/; s/$/"/p
18462d
18463:bsnlc
18464s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18465b cont
18466' <confdefs.h | sed '
18467s/'"$ac_delim"'/"\\\
18468"/g' >>$CONFIG_STATUS || ac_write_fail=1
18469
18470cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18471 for (key in D) D_is_set[key] = 1
18472 FS = ""
18473}
18474/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18475 line = \$ 0
18476 split(line, arg, " ")
18477 if (arg[1] == "#") {
18478 defundef = arg[2]
18479 mac1 = arg[3]
18480 } else {
18481 defundef = substr(arg[1], 2)
18482 mac1 = arg[2]
18483 }
18484 split(mac1, mac2, "(") #)
18485 macro = mac2[1]
18486 prefix = substr(line, 1, index(line, defundef) - 1)
18487 if (D_is_set[macro]) {
18488 # Preserve the white space surrounding the "#".
18489 print prefix "define", macro P[macro] D[macro]
18490 next
18491 } else {
18492 # Replace #undef with comments. This is necessary, for example,
18493 # in the case of _POSIX_SOURCE, which is predefined and required
18494 # on some systems where configure will not decide to define it.
18495 if (defundef == "undef") {
18496 print "/*", prefix defundef, macro, "*/"
18497 next
18498 }
18499 }
18500}
18501{ print }
18502_ACAWK
18503_ACEOF
18504cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018505 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018506fi # test -n "$CONFIG_HEADERS"
18507
18508
18509eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18510shift
18511for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018512do
18513 case $ac_tag in
18514 :[FHLC]) ac_mode=$ac_tag; continue;;
18515 esac
18516 case $ac_mode$ac_tag in
18517 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018518 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018519 :[FH]-) ac_tag=-:-;;
18520 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18521 esac
18522 ac_save_IFS=$IFS
18523 IFS=:
18524 set x $ac_tag
18525 IFS=$ac_save_IFS
18526 shift
18527 ac_file=$1
18528 shift
18529
18530 case $ac_mode in
18531 :L) ac_source=$1;;
18532 :[FH])
18533 ac_file_inputs=
18534 for ac_f
18535 do
18536 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018537 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018538 *) # Look for the file first in the build tree, then in the source tree
18539 # (if the path is not absolute). The absolute path cannot be DOS-style,
18540 # because $ac_f cannot contain `:'.
18541 test -f "$ac_f" ||
18542 case $ac_f in
18543 [\\/$]*) false;;
18544 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18545 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018546 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018547 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018548 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18549 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018550 done
18551
18552 # Let's still pretend it is `configure' which instantiates (i.e., don't
18553 # use $as_me), people would be surprised to read:
18554 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018555 configure_input='Generated from '`
18556 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18557 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018558 if test x"$ac_file" != x-; then
18559 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018560 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18561$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018562 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018563 # Neutralize special characters interpreted by sed in replacement strings.
18564 case $configure_input in #(
18565 *\&* | *\|* | *\\* )
18566 ac_sed_conf_input=`$as_echo "$configure_input" |
18567 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18568 *) ac_sed_conf_input=$configure_input;;
18569 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018570
18571 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018572 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18573 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574 esac
18575 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018576 esac
18577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018579$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018580 X"$ac_file" : 'X\(//\)[^/]' \| \
18581 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018582 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018583$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18585 s//\1/
18586 q
18587 }
18588 /^X\(\/\/\)[^/].*/{
18589 s//\1/
18590 q
18591 }
18592 /^X\(\/\/\)$/{
18593 s//\1/
18594 q
18595 }
18596 /^X\(\/\).*/{
18597 s//\1/
18598 q
18599 }
18600 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018601 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018602 ac_builddir=.
18603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018604case "$ac_dir" in
18605.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18606*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018607 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018608 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018609 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018610 case $ac_top_builddir_sub in
18611 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18612 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18613 esac ;;
18614esac
18615ac_abs_top_builddir=$ac_pwd
18616ac_abs_builddir=$ac_pwd$ac_dir_suffix
18617# for backward compatibility:
18618ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018619
18620case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018621 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018622 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018623 ac_top_srcdir=$ac_top_builddir_sub
18624 ac_abs_top_srcdir=$ac_pwd ;;
18625 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018627 ac_top_srcdir=$srcdir
18628 ac_abs_top_srcdir=$srcdir ;;
18629 *) # Relative name.
18630 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18631 ac_top_srcdir=$ac_top_build_prefix$srcdir
18632 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018633esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018634ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018635
Martin v. Löwis11437992002-04-12 09:54:03 +000018636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018637 case $ac_mode in
18638 :F)
18639 #
18640 # CONFIG_FILE
18641 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018642
18643 case $INSTALL in
18644 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018645 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018646 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018647 ac_MKDIR_P=$MKDIR_P
18648 case $MKDIR_P in
18649 [\\/$]* | ?:[\\/]* ) ;;
18650 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18651 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018652_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018653
Matthias Kloseb9621712010-04-24 17:59:49 +000018654cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018655# If the template does not know about datarootdir, expand it.
18656# FIXME: This hack should be removed a few years after 2.60.
18657ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018658ac_sed_dataroot='
18659/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018660 p
18661 q
18662}
18663/@datadir@/p
18664/@docdir@/p
18665/@infodir@/p
18666/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018667/@mandir@/p'
18668case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018669*datarootdir*) ac_datarootdir_seen=yes;;
18670*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18672$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018674cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018675 ac_datarootdir_hack='
18676 s&@datadir@&$datadir&g
18677 s&@docdir@&$docdir&g
18678 s&@infodir@&$infodir&g
18679 s&@localedir@&$localedir&g
18680 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018681 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018682esac
18683_ACEOF
18684
18685# Neutralize VPATH when `$srcdir' = `.'.
18686# Shell code in configure.ac might set extrasub.
18687# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018688cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18689ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018690$extrasub
18691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018692cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018693:t
18694/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018695s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018696s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018697s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018698s&@srcdir@&$ac_srcdir&;t t
18699s&@abs_srcdir@&$ac_abs_srcdir&;t t
18700s&@top_srcdir@&$ac_top_srcdir&;t t
18701s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18702s&@builddir@&$ac_builddir&;t t
18703s&@abs_builddir@&$ac_abs_builddir&;t t
18704s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18705s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018706s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018707$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018708"
Victor Stinnere0be4232011-10-25 13:06:09 +020018709eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18710 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018712test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018713 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18714 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18715 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018717which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018718$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018719which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018720
Victor Stinnere0be4232011-10-25 13:06:09 +020018721 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018722 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018723 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18724 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018725 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018726 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018727 ;;
18728 :H)
18729 #
18730 # CONFIG_HEADER
18731 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018732 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018733 {
18734 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018735 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18736 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018737 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018738 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018739 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18740$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018741 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018742 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018743 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018744 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018745 fi
18746 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018747 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018748 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018749 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018750 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018751 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018753
18754 esac
18755
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018756
18757 case $ac_file$ac_mode in
18758 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18759
18760 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018761done # for ac_tag
18762
Guido van Rossum627b2d71993-12-24 10:39:16 +000018763
Matthias Kloseb9621712010-04-24 17:59:49 +000018764as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018765_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018766ac_clean_files=$ac_clean_files_save
18767
Matthias Kloseb9621712010-04-24 17:59:49 +000018768test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018769 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018770
Martin v. Löwis11437992002-04-12 09:54:03 +000018771
18772# configure is writing to config.log, and then calls config.status.
18773# config.status does its own redirection, appending to config.log.
18774# Unfortunately, on DOS this fails, as config.log is still kept open
18775# by configure, so config.status won't be able to write to it; its
18776# output is simply discarded. So we exec the FD to /dev/null,
18777# effectively closing config.log, so it can be properly (re)opened and
18778# appended to by config.status. When coming back to configure, we
18779# need to make the FD available again.
18780if test "$no_create" != yes; then
18781 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018782 ac_config_status_args=
18783 test "$silent" = yes &&
18784 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018785 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018786 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018787 exec 5>>config.log
18788 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18789 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018790 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018791fi
18792if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18794$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018795fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018796
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018797
Christian Heimes75ed8902013-11-20 01:11:18 +010018798echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018799if test ! -f Modules/Setup.local
18800then
18801 echo "# Edit this file for local setup changes" >Modules/Setup.local
18802fi
18803
Christian Heimes75ed8902013-11-20 01:11:18 +010018804echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018805$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018806 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018807 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018808mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018809
18810if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18811 echo "" >&6
18812 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018813 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 +000018814 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018815 echo "" >&6
18816 echo "" >&6
18817fi
18818