blob: 846116e1128ee4549574b6d9bdaeb903e8d27e7a [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
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200684LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700685PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700686DEF_MAKE_RULE
687DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000689LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100690MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200694ac_ct_READELF
695READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000696ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200697ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
Ian Nortona9edf442020-02-14 03:09:11 +0000785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
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
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833enable_ipv6
834with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000836with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_libm
840with_libc
841enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800843with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100844with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100845with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800856CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700857PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800858PKG_CONFIG
859PKG_CONFIG_PATH
860PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864ac_init_help=
865ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000866ac_unrecognized_opts=
867ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868# The variables have the same names as the options, with
869# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000870cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873no_recursion=
874prefix=NONE
875program_prefix=NONE
876program_suffix=NONE
877program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882x_includes=NONE
883x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000884
885# Installation directory options.
886# These are left unexpanded so users can "make install exec_prefix=/foo"
887# and all the variables that are supposed to be based on exec_prefix
888# by default will actually change.
889# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891bindir='${exec_prefix}/bin'
892sbindir='${exec_prefix}/sbin'
893libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894datarootdir='${prefix}/share'
895datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896sysconfdir='${prefix}/etc'
897sharedstatedir='${prefix}/com'
898localstatedir='${prefix}/var'
Ian Nortona9edf442020-02-14 03:09:11 +0000899runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900includedir='${prefix}/include'
901oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903infodir='${datarootdir}/info'
904htmldir='${docdir}'
905dvidir='${docdir}'
906pdfdir='${docdir}'
907psdir='${docdir}'
908libdir='${exec_prefix}/lib'
909localedir='${datarootdir}/locale'
910mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 # If the previous option needs an argument, assign it.
917 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 ac_prev=
920 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200924 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925 *=) ac_optarg= ;;
926 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Accept the important Cygnus configure options, so we can diagnose typos.
930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_dashdash$ac_option in
932 --)
933 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -bindir | --bindir | --bindi | --bind | --bin | --bi)
936 ac_prev=bindir ;;
937 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
940 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 -cache-file | --cache-file | --cache-fil | --cache-fi \
946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947 ac_prev=cache_file ;;
948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 cache_file=$ac_optarg ;;
951
952 --config-cache | -C)
953 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961 | --dataroo | --dataro | --datar)
962 ac_prev=datarootdir ;;
963 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965 datarootdir=$ac_optarg ;;
966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982
983 -docdir | --docdir | --docdi | --doc | --do)
984 ac_prev=docdir ;;
985 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986 docdir=$ac_optarg ;;
987
988 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989 ac_prev=dvidir ;;
990 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200997 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt_orig=$ac_useropt
999 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000 case $ac_user_opts in
1001 *"
1002"enable_$ac_useropt"
1003"*) ;;
1004 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005 ac_unrecognized_sep=', ';;
1006 esac
1007 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011 | --exec | --exe | --ex)
1012 ac_prev=exec_prefix ;;
1013 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --with-gas.
1020 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 -help | --help | --hel | --he | -h)
1023 ac_init_help=long ;;
1024 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025 ac_init_help=recursive ;;
1026 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035 ac_prev=htmldir ;;
1036 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037 | --ht=*)
1038 htmldir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -includedir | --includedir | --includedi | --included | --include \
1041 | --includ | --inclu | --incl | --inc)
1042 ac_prev=includedir ;;
1043 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -infodir | --infodir | --infodi | --infod | --info | --inf)
1048 ac_prev=infodir ;;
1049 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libdir | --libdir | --libdi | --libd)
1053 ac_prev=libdir ;;
1054 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058 | --libexe | --libex | --libe)
1059 ac_prev=libexecdir ;;
1060 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -localedir | --localedir | --localedi | --localed | --locale)
1065 ac_prev=localedir ;;
1066 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067 localedir=$ac_optarg ;;
1068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 ac_prev=localstatedir ;;
1072 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077 ac_prev=mandir ;;
1078 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Obsolete; use --without-fp.
1083 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 no_create=yes ;;
1088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095 | --oldin | --oldi | --old | --ol | --o)
1096 ac_prev=oldincludedir ;;
1097 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103 ac_prev=prefix ;;
1104 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108 | --program-pre | --program-pr | --program-p)
1109 ac_prev=program_prefix ;;
1110 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115 | --program-suf | --program-su | --program-s)
1116 ac_prev=program_suffix ;;
1117 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-transform-name | --program-transform-name \
1122 | --program-transform-nam | --program-transform-na \
1123 | --program-transform-n | --program-transform- \
1124 | --program-transform | --program-transfor \
1125 | --program-transfo | --program-transf \
1126 | --program-trans | --program-tran \
1127 | --progr-tra | --program-tr | --program-t)
1128 ac_prev=program_transform_name ;;
1129 -program-transform-name=* | --program-transform-name=* \
1130 | --program-transform-nam=* | --program-transform-na=* \
1131 | --program-transform-n=* | --program-transform-=* \
1132 | --program-transform=* | --program-transfor=* \
1133 | --program-transfo=* | --program-transf=* \
1134 | --program-trans=* | --program-tran=* \
1135 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139 ac_prev=pdfdir ;;
1140 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141 pdfdir=$ac_optarg ;;
1142
1143 -psdir | --psdir | --psdi | --psd | --ps)
1144 ac_prev=psdir ;;
1145 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146 psdir=$ac_optarg ;;
1147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149 | -silent | --silent | --silen | --sile | --sil)
1150 silent=yes ;;
1151
Ian Nortona9edf442020-02-14 03:09:11 +00001152 -runstatedir | --runstatedir | --runstatedi | --runstated \
1153 | --runstate | --runstat | --runsta | --runst | --runs \
1154 | --run | --ru | --r)
1155 ac_prev=runstatedir ;;
1156 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1157 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1158 | --run=* | --ru=* | --r=*)
1159 runstatedir=$ac_optarg ;;
1160
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1162 ac_prev=sbindir ;;
1163 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1164 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
1167 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1168 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1169 | --sharedst | --shareds | --shared | --share | --shar \
1170 | --sha | --sh)
1171 ac_prev=sharedstatedir ;;
1172 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1173 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1174 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1175 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 -site | --site | --sit)
1179 ac_prev=site ;;
1180 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1184 ac_prev=srcdir ;;
1185 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1189 | --syscon | --sysco | --sysc | --sys | --sy)
1190 ac_prev=sysconfdir ;;
1191 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1192 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001194
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1201 verbose=yes ;;
1202
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 -version | --version | --versio | --versi | --vers | -V)
1204 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
1206 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001210 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt_orig=$ac_useropt
1212 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213 case $ac_user_opts in
1214 *"
1215"with_$ac_useropt"
1216"*) ;;
1217 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1218 ac_unrecognized_sep=', ';;
1219 esac
1220 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 ac_useropt_orig=$ac_useropt
1228 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229 case $ac_user_opts in
1230 *"
1231"with_$ac_useropt"
1232"*) ;;
1233 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1234 ac_unrecognized_sep=', ';;
1235 esac
1236 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 --x)
1239 # Obsolete; use --with-x.
1240 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1243 | --x-incl | --x-inc | --x-in | --x-i)
1244 ac_prev=x_includes ;;
1245 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1246 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
1249 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1250 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1251 ac_prev=x_libraries ;;
1252 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1253 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1257Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 ;;
1259
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 *=*)
1261 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1262 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 case $ac_envvar in #(
1264 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001265 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 export $ac_envvar ;;
1269
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001270 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001274 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001275 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 ;;
1277
1278 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279done
1280
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284fi
1285
Matthias Kloseb9621712010-04-24 17:59:49 +00001286if test -n "$ac_unrecognized_opts"; then
1287 case $enable_option_checking in
1288 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1291 esac
1292fi
1293
1294# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1296 datadir sysconfdir sharedstatedir localstatedir includedir \
1297 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Ian Nortona9edf442020-02-14 03:09:11 +00001298 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001301 # Remove trailing slashes.
1302 case $ac_val in
1303 */ )
1304 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1305 eval $ac_var=\$ac_val;;
1306 esac
1307 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001308 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 [\\/$]* | ?:[\\/]* ) continue;;
1310 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001311 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001312 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001313done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# There might be people who depend on the old broken behavior: `$host'
1316# used to hold the argument of --host etc.
1317# FIXME: To remove some day.
1318build=$build_alias
1319host=$host_alias
1320target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321
Martin v. Löwis11437992002-04-12 09:54:03 +00001322# FIXME: To remove some day.
1323if test "x$host_alias" != x; then
1324 if test "x$build_alias" = x; then
1325 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001326 elif test "x$build_alias" != "x$host_alias"; then
1327 cross_compiling=yes
1328 fi
1329fi
1330
1331ac_tool_prefix=
1332test -n "$host_alias" && ac_tool_prefix=$host_alias-
1333
1334test "$silent" = yes && exec 6>/dev/null
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337ac_pwd=`pwd` && test -n "$ac_pwd" &&
1338ac_ls_di=`ls -di .` &&
1339ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343
1344
Guido van Rossum627b2d71993-12-24 10:39:16 +00001345# Find the source files, if location was not specified.
1346if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001347 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 ac_confdir=`$as_dirname -- "$as_myself" ||
1350$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1351 X"$as_myself" : 'X\(//\)[^/]' \| \
1352 X"$as_myself" : 'X\(//\)$' \| \
1353 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1354$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\/\)[^/].*/{
1360 s//\1/
1361 q
1362 }
1363 /^X\(\/\/\)$/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\).*/{
1368 s//\1/
1369 q
1370 }
1371 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001372 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001374 srcdir=..
1375 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001376else
1377 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379if test ! -r "$srcdir/$ac_unique_file"; then
1380 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1384ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001386 pwd)`
1387# When building in place, set srcdir=.
1388if test "$ac_abs_confdir" = "$ac_pwd"; then
1389 srcdir=.
1390fi
1391# Remove unnecessary trailing slashes from srcdir.
1392# Double slashes in file names in object file debugging info
1393# mess up M-x gdb in Emacs.
1394case $srcdir in
1395*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1396esac
1397for ac_var in $ac_precious_vars; do
1398 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_env_${ac_var}_value=\$${ac_var}
1400 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1401 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1402done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001403
Martin v. Löwis11437992002-04-12 09:54:03 +00001404#
1405# Report the --help message.
1406#
1407if test "$ac_init_help" = "long"; then
1408 # Omit some internal or obsolete options to make the list less imposing.
1409 # This message is too long to be a string in the A/UX 3.1 sh.
1410 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001411\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
1413Usage: $0 [OPTION]... [VAR=VALUE]...
1414
1415To assign environment variables (e.g., CC, CFLAGS...), specify them as
1416VAR=VALUE. See below for descriptions of some of the useful variables.
1417
1418Defaults for the options are specified in brackets.
1419
1420Configuration:
1421 -h, --help display this help and exit
1422 --help=short display options specific to this package
1423 --help=recursive display the short help of all the included packages
1424 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001425 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --cache-file=FILE cache test results in FILE [disabled]
1427 -C, --config-cache alias for \`--cache-file=config.cache'
1428 -n, --no-create do not create output files
1429 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1430
Martin v. Löwis11437992002-04-12 09:54:03 +00001431Installation directories:
1432 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437By default, \`make install' will install all the files in
1438\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1439an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1440for instance \`--prefix=\$HOME'.
1441
1442For better control, use the options below.
1443
1444Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 --bindir=DIR user executables [EPREFIX/bin]
1446 --sbindir=DIR system admin executables [EPREFIX/sbin]
1447 --libexecdir=DIR program executables [EPREFIX/libexec]
1448 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1449 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1450 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Ian Nortona9edf442020-02-14 03:09:11 +00001451 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 --libdir=DIR object code libraries [EPREFIX/lib]
1453 --includedir=DIR C header files [PREFIX/include]
1454 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1455 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1456 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1457 --infodir=DIR info documentation [DATAROOTDIR/info]
1458 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1459 --mandir=DIR man documentation [DATAROOTDIR/man]
1460 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1461 --htmldir=DIR html documentation [DOCDIR]
1462 --dvidir=DIR dvi documentation [DOCDIR]
1463 --pdfdir=DIR pdf documentation [DOCDIR]
1464 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466
1467 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001468
1469System types:
1470 --build=BUILD configure for building on BUILD [guessed]
1471 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001477 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001486 create a universal binary build. SDKDIR specifies
1487 which macOS SDK should be used to perform the build,
1488 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001490 create a Python.framework rather than a traditional
1491 Unix install. optional INSTALLDIR specifies the
1492 installation path. see Mac/README.rst (default is
1493 no)
1494 --enable-shared enable building a shared Python library (default is
1495 no)
1496 --enable-profiling enable C-level code profiling with gprof (default is
1497 no)
1498 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1499 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001500 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001501 support loadable extensions in _sqlite module, see
1502 Doc/library/sqlite3.rst (default is no)
1503 --enable-ipv6 enable ipv6 (with ipv4) support, see
1504 Doc/library/socket.rst (default is yes if supported)
1505 --enable-big-digits[=15|30]
1506 use big digits (30 or 15 bits) for Python longs
1507 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001508
1509Optional Packages:
1510 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1511 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001512 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001513 specify the kind of universal binary that should be
1514 created. this option is only valid when
1515 --enable-universalsdk is set; options are:
1516 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1517 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001518 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001519 specify the name for the python framework on macOS
1520 only valid when --enable-framework is set. see
1521 Mac/README.rst (default is 'Python')
1522 --with-cxx-main[=COMPILER]
1523 compile main() and link Python executable with C++
1524 compiler specified in COMPILER (default is $CXX)
1525 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1526 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001527 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001528 (default is no)
1529 --with-assertions build with C assertions enabled (default is no)
1530 --with-lto enable Link-Time-Optimization in any build (default
1531 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001532 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001533 select hash algorithm for use in Python/pyhash.c
1534 (default is SipHash24)
Charles-François Natalid30b0222014-05-08 23:08:51 +01001535 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001536 enable AddressSanitizer memory error detector,
1537 'asan' (default is no)
1538 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1539 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001540 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001541 enable UndefinedBehaviorSanitizer undefined
1542 behaviour detector, 'ubsan' (default is no)
1543 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001544 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001545 library, see Doc/library/pyexpat.rst (default is no)
1546 --with-system-ffi build _ctypes module using an installed ffi library,
1547 see Doc/library/ctypes.rst (default is
1548 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001549 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001550 library, see Doc/library/decimal.rst (default is no)
Ned Deilyd819b932013-09-06 01:07:05 -07001551 --with-tcltk-includes='-I...'
1552 override search for Tcl and Tk include files
1553 --with-tcltk-libs='-L...'
1554 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001555 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001556 override order to check db backends for dbm; a valid
1557 value is a colon separated string with the backend
1558 names `ndbm', `gdbm' and `bdb'.
1559 --with-doc-strings enable documentation strings (default is yes)
1560 --with-pymalloc enable specialized mallocs (default is yes)
1561 --with-c-locale-coercion
1562 enable C locale coercion to a UTF-8 based locale
1563 (default is yes)
1564 --with-valgrind enable Valgrind support (default is no)
1565 --with-dtrace enable DTrace support (default is no)
1566 --with-libm=STRING override libm math library to STRING (default is
1567 system-dependent)
1568 --with-libc=STRING override libc C library to STRING (default is
1569 system-dependent)
1570 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001571 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001572 --with-ensurepip[=install|upgrade|no]
1573 "install" or "upgrade" using bundled pip (default is
1574 upgrade)
1575 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001576 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001577 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001578 Python's preferred selection (default), openssl:
1579 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001580 custom string, PROTOCOL_SSLv2 ignores the setting,
1581 see Doc/library/ssl.rst
Martin v. Löwis11437992002-04-12 09:54:03 +00001582
1583Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001584 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 CC C compiler command
1586 CFLAGS C compiler flags
1587 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1588 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001593 PROFILE_TASK
1594 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001595 PKG_CONFIG path to pkg-config utility
1596 PKG_CONFIG_PATH
1597 directories to add to pkg-config's search path
1598 PKG_CONFIG_LIBDIR
1599 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
1601Use these variables to override the choices made by `configure' or to help
1602it to find libraries and programs with nonstandard names/locations.
1603
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001604Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001605_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001607fi
1608
1609if test "$ac_init_help" = "recursive"; then
1610 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001612 test -d "$ac_dir" ||
1613 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1614 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 ac_builddir=.
1616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617case "$ac_dir" in
1618.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1619*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001622 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623 case $ac_top_builddir_sub in
1624 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1625 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1626 esac ;;
1627esac
1628ac_abs_top_builddir=$ac_pwd
1629ac_abs_builddir=$ac_pwd$ac_dir_suffix
1630# for backward compatibility:
1631ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001632
1633case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001634 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 ac_top_srcdir=$ac_top_builddir_sub
1637 ac_abs_top_srcdir=$ac_pwd ;;
1638 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640 ac_top_srcdir=$srcdir
1641 ac_abs_top_srcdir=$srcdir ;;
1642 *) # Relative name.
1643 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1644 ac_top_srcdir=$ac_top_build_prefix$srcdir
1645 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001646esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001647ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 cd "$ac_dir" || { ac_status=$?; continue; }
1650 # Check for guested configure.
1651 if test -f "$ac_srcdir/configure.gnu"; then
1652 echo &&
1653 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1654 elif test -f "$ac_srcdir/configure"; then
1655 echo &&
1656 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659 fi || ac_status=$?
1660 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 done
1662fi
1663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001664test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001665if $ac_init_version; then
1666 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001667python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001668generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001669
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001670Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001671This configure script is free software; the Free Software Foundation
1672gives unlimited permission to copy, distribute and modify it.
1673_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001674 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001676
1677## ------------------------ ##
1678## Autoconf initialization. ##
1679## ------------------------ ##
1680
1681# ac_fn_c_try_compile LINENO
1682# --------------------------
1683# Try to compile conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_compile ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1687 rm -f conftest.$ac_objext
1688 if { { ac_try="$ac_compile"
1689case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694$as_echo "$ac_try_echo"; } >&5
1695 (eval "$ac_compile") 2>conftest.err
1696 ac_status=$?
1697 if test -s conftest.err; then
1698 grep -v '^ *+' conftest.err >conftest.er1
1699 cat conftest.er1 >&5
1700 mv -f conftest.er1 conftest.err
1701 fi
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703 test $ac_status = 0; } && {
1704 test -z "$ac_c_werror_flag" ||
1705 test ! -s conftest.err
1706 } && test -s conftest.$ac_objext; then :
1707 ac_retval=0
1708else
1709 $as_echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=1
1713fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001715 as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_compile
1718
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001719# ac_fn_c_try_cpp LINENO
1720# ----------------------
1721# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1722ac_fn_c_try_cpp ()
1723{
1724 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1725 if { { ac_try="$ac_cpp conftest.$ac_ext"
1726case "(($ac_try" in
1727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728 *) ac_try_echo=$ac_try;;
1729esac
1730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1731$as_echo "$ac_try_echo"; } >&5
1732 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1733 ac_status=$?
1734 if test -s conftest.err; then
1735 grep -v '^ *+' conftest.err >conftest.er1
1736 cat conftest.er1 >&5
1737 mv -f conftest.er1 conftest.err
1738 fi
1739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1740 test $ac_status = 0; } > conftest.i && {
1741 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1742 test ! -s conftest.err
1743 }; then :
1744 ac_retval=0
1745else
1746 $as_echo "$as_me: failed program was:" >&5
1747sed 's/^/| /' conftest.$ac_ext >&5
1748
1749 ac_retval=1
1750fi
1751 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1752 as_fn_set_status $ac_retval
1753
1754} # ac_fn_c_try_cpp
1755
Matthias Kloseb9621712010-04-24 17:59:49 +00001756# ac_fn_c_try_link LINENO
1757# -----------------------
1758# Try to link conftest.$ac_ext, and return whether this succeeded.
1759ac_fn_c_try_link ()
1760{
1761 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1762 rm -f conftest.$ac_objext conftest$ac_exeext
1763 if { { ac_try="$ac_link"
1764case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767esac
1768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1769$as_echo "$ac_try_echo"; } >&5
1770 (eval "$ac_link") 2>conftest.err
1771 ac_status=$?
1772 if test -s conftest.err; then
1773 grep -v '^ *+' conftest.err >conftest.er1
1774 cat conftest.er1 >&5
1775 mv -f conftest.er1 conftest.err
1776 fi
1777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1778 test $ac_status = 0; } && {
1779 test -z "$ac_c_werror_flag" ||
1780 test ! -s conftest.err
1781 } && test -s conftest$ac_exeext && {
1782 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001783 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001784 }; then :
1785 ac_retval=0
1786else
1787 $as_echo "$as_me: failed program was:" >&5
1788sed 's/^/| /' conftest.$ac_ext >&5
1789
1790 ac_retval=1
1791fi
1792 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1793 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1794 # interfere with the next link command; also delete a directory that is
1795 # left behind by Apple's compiler. We do this before executing the actions.
1796 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001798 as_fn_set_status $ac_retval
1799
1800} # ac_fn_c_try_link
1801
Matthias Kloseb9621712010-04-24 17:59:49 +00001802# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1803# -------------------------------------------------------
1804# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1805# the include files in INCLUDES and setting the cache variable VAR
1806# accordingly.
1807ac_fn_c_check_header_mongrel ()
1808{
1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001810 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001813if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 $as_echo_n "(cached) " >&6
1815fi
1816eval ac_res=\$$3
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1818$as_echo "$ac_res" >&6; }
1819else
1820 # Is the header compilable?
1821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1822$as_echo_n "checking $2 usability... " >&6; }
1823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1824/* end confdefs.h. */
1825$4
1826#include <$2>
1827_ACEOF
1828if ac_fn_c_try_compile "$LINENO"; then :
1829 ac_header_compiler=yes
1830else
1831 ac_header_compiler=no
1832fi
1833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1835$as_echo "$ac_header_compiler" >&6; }
1836
1837# Is the header present?
1838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1839$as_echo_n "checking $2 presence... " >&6; }
1840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1841/* end confdefs.h. */
1842#include <$2>
1843_ACEOF
1844if ac_fn_c_try_cpp "$LINENO"; then :
1845 ac_header_preproc=yes
1846else
1847 ac_header_preproc=no
1848fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001849rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1851$as_echo "$ac_header_preproc" >&6; }
1852
1853# So? What about this header?
1854case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1855 yes:no: )
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1857$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1859$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1860 ;;
1861 no:yes:* )
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1863$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1865$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1867$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1869$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1871$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001872( $as_echo "## --------------------------------------- ##
1873## Report this to https://bugs.python.org/ ##
1874## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001875 ) | sed "s/^/$as_me: WARNING: /" >&2
1876 ;;
1877esac
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1879$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001880if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001881 $as_echo_n "(cached) " >&6
1882else
1883 eval "$3=\$ac_header_compiler"
1884fi
1885eval ac_res=\$$3
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1887$as_echo "$ac_res" >&6; }
1888fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001889 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001890
1891} # ac_fn_c_check_header_mongrel
1892
1893# ac_fn_c_try_run LINENO
1894# ----------------------
1895# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1896# that executables *can* be run.
1897ac_fn_c_try_run ()
1898{
1899 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1900 if { { ac_try="$ac_link"
1901case "(($ac_try" in
1902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1903 *) ac_try_echo=$ac_try;;
1904esac
1905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1906$as_echo "$ac_try_echo"; } >&5
1907 (eval "$ac_link") 2>&5
1908 ac_status=$?
1909 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1910 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1911 { { case "(($ac_try" in
1912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1913 *) ac_try_echo=$ac_try;;
1914esac
1915eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1916$as_echo "$ac_try_echo"; } >&5
1917 (eval "$ac_try") 2>&5
1918 ac_status=$?
1919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1920 test $ac_status = 0; }; }; then :
1921 ac_retval=0
1922else
1923 $as_echo "$as_me: program exited with status $ac_status" >&5
1924 $as_echo "$as_me: failed program was:" >&5
1925sed 's/^/| /' conftest.$ac_ext >&5
1926
1927 ac_retval=$ac_status
1928fi
1929 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001931 as_fn_set_status $ac_retval
1932
1933} # ac_fn_c_try_run
1934
1935# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1936# -------------------------------------------------------
1937# Tests whether HEADER exists and can be compiled using the include files in
1938# INCLUDES, setting the cache variable VAR accordingly.
1939ac_fn_c_check_header_compile ()
1940{
1941 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1943$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001944if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001945 $as_echo_n "(cached) " >&6
1946else
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$4
1950#include <$2>
1951_ACEOF
1952if ac_fn_c_try_compile "$LINENO"; then :
1953 eval "$3=yes"
1954else
1955 eval "$3=no"
1956fi
1957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1958fi
1959eval ac_res=\$$3
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1961$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001962 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001963
1964} # ac_fn_c_check_header_compile
1965
Matthias Kloseb9621712010-04-24 17:59:49 +00001966# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1967# -------------------------------------------
1968# Tests whether TYPE exists after having included INCLUDES, setting cache
1969# variable VAR accordingly.
1970ac_fn_c_check_type ()
1971{
1972 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1974$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001975if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001976 $as_echo_n "(cached) " >&6
1977else
1978 eval "$3=no"
1979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1980/* end confdefs.h. */
1981$4
1982int
1983main ()
1984{
1985if (sizeof ($2))
1986 return 0;
1987 ;
1988 return 0;
1989}
1990_ACEOF
1991if ac_fn_c_try_compile "$LINENO"; then :
1992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998if (sizeof (($2)))
1999 return 0;
2000 ;
2001 return 0;
2002}
2003_ACEOF
2004if ac_fn_c_try_compile "$LINENO"; then :
2005
2006else
2007 eval "$3=yes"
2008fi
2009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2010fi
2011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002016 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018} # ac_fn_c_check_type
2019
Matthias Kloseb9621712010-04-24 17:59:49 +00002020# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2021# --------------------------------------------
2022# Tries to find the compile-time value of EXPR in a program that includes
2023# INCLUDES, setting VAR accordingly. Returns whether the value could be
2024# computed
2025ac_fn_c_compute_int ()
2026{
2027 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2028 if test "$cross_compiling" = yes; then
2029 # Depending upon the size, compute the lo and hi bounds.
2030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002037test_array [0] = 0;
2038return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045 ac_lo=0 ac_mid=0
2046 while :; do
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002054test_array [0] = 0;
2055return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_hi=$ac_mid; break
2063else
2064 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2065 if test $ac_lo -le $ac_mid; then
2066 ac_lo= ac_hi=
2067 break
2068 fi
2069 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 done
2073else
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002081test_array [0] = 0;
2082return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_hi=-1 ac_mid=-1
2090 while :; do
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002098test_array [0] = 0;
2099return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_lo=$ac_mid; break
2107else
2108 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2109 if test $ac_mid -le $ac_hi; then
2110 ac_lo= ac_hi=
2111 break
2112 fi
2113 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2114fi
2115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116 done
2117else
2118 ac_lo= ac_hi=
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123# Binary search between lo and hi bounds.
2124while test "x$ac_lo" != "x$ac_hi"; do
2125 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129int
2130main ()
2131{
2132static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002133test_array [0] = 0;
2134return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002135
2136 ;
2137 return 0;
2138}
2139_ACEOF
2140if ac_fn_c_try_compile "$LINENO"; then :
2141 ac_hi=$ac_mid
2142else
2143 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146done
2147case $ac_lo in #((
2148?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2149'') ac_retval=1 ;;
2150esac
2151 else
2152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2153/* end confdefs.h. */
2154$4
2155static long int longval () { return $2; }
2156static unsigned long int ulongval () { return $2; }
2157#include <stdio.h>
2158#include <stdlib.h>
2159int
2160main ()
2161{
2162
2163 FILE *f = fopen ("conftest.val", "w");
2164 if (! f)
2165 return 1;
2166 if (($2) < 0)
2167 {
2168 long int i = longval ();
2169 if (i != ($2))
2170 return 1;
2171 fprintf (f, "%ld", i);
2172 }
2173 else
2174 {
2175 unsigned long int i = ulongval ();
2176 if (i != ($2))
2177 return 1;
2178 fprintf (f, "%lu", i);
2179 }
2180 /* Do not output a trailing newline, as this causes \r\n confusion
2181 on some platforms. */
2182 return ferror (f) || fclose (f) != 0;
2183
2184 ;
2185 return 0;
2186}
2187_ACEOF
2188if ac_fn_c_try_run "$LINENO"; then :
2189 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2190else
2191 ac_retval=1
2192fi
2193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2194 conftest.$ac_objext conftest.beam conftest.$ac_ext
2195rm -f conftest.val
2196
2197 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002198 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002199 as_fn_set_status $ac_retval
2200
2201} # ac_fn_c_compute_int
2202
2203# ac_fn_c_check_func LINENO FUNC VAR
2204# ----------------------------------
2205# Tests whether FUNC exists, setting the cache variable VAR accordingly
2206ac_fn_c_check_func ()
2207{
2208 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2210$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002211if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002212 $as_echo_n "(cached) " >&6
2213else
2214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215/* end confdefs.h. */
2216/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2217 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2218#define $2 innocuous_$2
2219
2220/* System header to define __stub macros and hopefully few prototypes,
2221 which can conflict with char $2 (); below.
2222 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2223 <limits.h> exists even on freestanding compilers. */
2224
2225#ifdef __STDC__
2226# include <limits.h>
2227#else
2228# include <assert.h>
2229#endif
2230
2231#undef $2
2232
2233/* Override any GCC internal prototype to avoid an error.
2234 Use char because int might match the return type of a GCC
2235 builtin and then its argument prototype would still apply. */
2236#ifdef __cplusplus
2237extern "C"
2238#endif
2239char $2 ();
2240/* The GNU C library defines this for functions which it implements
2241 to always fail with ENOSYS. Some functions are actually named
2242 something starting with __ and the normal name is an alias. */
2243#if defined __stub_$2 || defined __stub___$2
2244choke me
2245#endif
2246
2247int
2248main ()
2249{
2250return $2 ();
2251 ;
2252 return 0;
2253}
2254_ACEOF
2255if ac_fn_c_try_link "$LINENO"; then :
2256 eval "$3=yes"
2257else
2258 eval "$3=no"
2259fi
2260rm -f core conftest.err conftest.$ac_objext \
2261 conftest$ac_exeext conftest.$ac_ext
2262fi
2263eval ac_res=\$$3
2264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2265$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002266 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002267
2268} # ac_fn_c_check_func
2269
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002270# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2271# ---------------------------------------------
2272# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2273# accordingly.
2274ac_fn_c_check_decl ()
2275{
2276 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2277 as_decl_name=`echo $2|sed 's/ *(.*//'`
2278 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2280$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2281if eval \${$3+:} false; then :
2282 $as_echo_n "(cached) " >&6
2283else
2284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h. */
2286$4
2287int
2288main ()
2289{
2290#ifndef $as_decl_name
2291#ifdef __cplusplus
2292 (void) $as_decl_use;
2293#else
2294 (void) $as_decl_name;
2295#endif
2296#endif
2297
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302if ac_fn_c_try_compile "$LINENO"; then :
2303 eval "$3=yes"
2304else
2305 eval "$3=no"
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308fi
2309eval ac_res=\$$3
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2311$as_echo "$ac_res" >&6; }
2312 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2313
2314} # ac_fn_c_check_decl
2315
Matthias Kloseb9621712010-04-24 17:59:49 +00002316# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2317# ----------------------------------------------------
2318# Tries to find if the field MEMBER exists in type AGGR, after including
2319# INCLUDES, setting cache variable VAR accordingly.
2320ac_fn_c_check_member ()
2321{
2322 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2324$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002325if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002326 $as_echo_n "(cached) " >&6
2327else
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h. */
2330$5
2331int
2332main ()
2333{
2334static $2 ac_aggr;
2335if (ac_aggr.$3)
2336return 0;
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341if ac_fn_c_try_compile "$LINENO"; then :
2342 eval "$4=yes"
2343else
2344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2345/* end confdefs.h. */
2346$5
2347int
2348main ()
2349{
2350static $2 ac_aggr;
2351if (sizeof ac_aggr.$3)
2352return 0;
2353 ;
2354 return 0;
2355}
2356_ACEOF
2357if ac_fn_c_try_compile "$LINENO"; then :
2358 eval "$4=yes"
2359else
2360 eval "$4=no"
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363fi
2364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2365fi
2366eval ac_res=\$$4
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2368$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002369 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002370
2371} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002373This file contains any messages produced by compilers while
2374running configure, to aid debugging if configure makes a mistake.
2375
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002376It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002377generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379 $ $0 $@
2380
2381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002383{
2384cat <<_ASUNAME
2385## --------- ##
2386## Platform. ##
2387## --------- ##
2388
2389hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2390uname -m = `(uname -m) 2>/dev/null || echo unknown`
2391uname -r = `(uname -r) 2>/dev/null || echo unknown`
2392uname -s = `(uname -s) 2>/dev/null || echo unknown`
2393uname -v = `(uname -v) 2>/dev/null || echo unknown`
2394
2395/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2396/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2397
2398/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2399/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2400/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002401/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002402/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2403/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2404/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2405
2406_ASUNAME
2407
2408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2409for as_dir in $PATH
2410do
2411 IFS=$as_save_IFS
2412 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 $as_echo "PATH: $as_dir"
2414 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002416
2417} >&5
2418
2419cat >&5 <<_ACEOF
2420
2421
2422## ----------- ##
2423## Core tests. ##
2424## ----------- ##
2425
2426_ACEOF
2427
2428
2429# Keep a trace of the command line.
2430# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002431# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002432# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002433# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002434ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002435ac_configure_args0=
2436ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002437ac_must_keep_next=false
2438for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002439do
Skip Montanaro6dead952003-09-25 14:50:04 +00002440 for ac_arg
2441 do
2442 case $ac_arg in
2443 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2444 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2445 | -silent | --silent | --silen | --sile | --sil)
2446 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002448 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 esac
2450 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002451 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002453 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002454 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002455 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002456 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002457 case $ac_arg in
2458 *=* | --config-cache | -C | -disable-* | --disable-* \
2459 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2460 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2461 | -with-* | --with-* | -without-* | --without-* | --x)
2462 case "$ac_configure_args0 " in
2463 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2464 esac
2465 ;;
2466 -* ) ac_must_keep_next=true ;;
2467 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002468 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002470 ;;
2471 esac
2472 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002473done
Matthias Kloseb9621712010-04-24 17:59:49 +00002474{ ac_configure_args0=; unset ac_configure_args0;}
2475{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002476
2477# When interrupted or exit'd, cleanup temporary files, and complete
2478# config.log. We remove comments because anyway the quotes in there
2479# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480# WARNING: Use '\'' to represent an apostrophe within the trap.
2481# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002482trap 'exit_status=$?
2483 # Save into config.log some information that might help in debugging.
2484 {
2485 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002486
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002488## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 echo
2491 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492(
2493 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2494 eval ac_val=\$$ac_var
2495 case $ac_val in #(
2496 *${as_nl}*)
2497 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2499$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
2501 case $ac_var in #(
2502 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2504 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 esac ;;
2506 esac
2507 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2510 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 "s/'\''/'\''\\\\'\'''\''/g;
2513 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2514 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002515 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002517 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 esac |
2519 sort
2520)
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002522
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002524## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 echo
2527 for ac_var in $ac_subst_vars
2528 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 eval ac_val=\$$ac_var
2530 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002534 done | sort
2535 echo
2536
2537 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002538 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002540## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 echo
2542 for ac_var in $ac_subst_files
2543 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 eval ac_val=\$$ac_var
2545 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002549 done | sort
2550 echo
2551 fi
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002554 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002555## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002556## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 echo
2560 fi
2561 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002562 $as_echo "$as_me: caught signal $ac_signal"
2563 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 rm -f core *.core core.conftest.* &&
2566 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002569for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002570 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002571done
2572ac_signal=0
2573
2574# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002576
Matthias Kloseb9621712010-04-24 17:59:49 +00002577$as_echo "/* confdefs.h */" > confdefs.h
2578
Martin v. Löwis11437992002-04-12 09:54:03 +00002579# Predefined preprocessor variables.
2580
2581cat >>confdefs.h <<_ACEOF
2582#define PACKAGE_NAME "$PACKAGE_NAME"
2583_ACEOF
2584
Martin v. Löwis11437992002-04-12 09:54:03 +00002585cat >>confdefs.h <<_ACEOF
2586#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2587_ACEOF
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589cat >>confdefs.h <<_ACEOF
2590#define PACKAGE_VERSION "$PACKAGE_VERSION"
2591_ACEOF
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593cat >>confdefs.h <<_ACEOF
2594#define PACKAGE_STRING "$PACKAGE_STRING"
2595_ACEOF
2596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597cat >>confdefs.h <<_ACEOF
2598#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2599_ACEOF
2600
Matthias Kloseb9621712010-04-24 17:59:49 +00002601cat >>confdefs.h <<_ACEOF
2602#define PACKAGE_URL "$PACKAGE_URL"
2603_ACEOF
2604
Martin v. Löwis11437992002-04-12 09:54:03 +00002605
2606# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002607# Prefer an explicitly selected file to automatically selected ones.
2608ac_site_file1=NONE
2609ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002611 # We do not want a PATH search for config.site.
2612 case $CONFIG_SITE in #((
2613 -*) ac_site_file1=./$CONFIG_SITE;;
2614 */*) ac_site_file1=$CONFIG_SITE;;
2615 *) ac_site_file1=./$CONFIG_SITE;;
2616 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 ac_site_file1=$prefix/share/config.site
2619 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620else
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 ac_site_file1=$ac_default_prefix/share/config.site
2622 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002624for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625do
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 test "x$ac_site_file" = xNONE && continue
2627 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2628 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2629$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002631 . "$ac_site_file" \
2632 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2634as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002635See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002636 fi
2637done
2638
2639if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002640 # Some versions of bash will fail to source /dev/null (special files
2641 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2642 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2644$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2647 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 esac
2649 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002650else
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2652$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 >$cache_file
2654fi
2655
2656# Check that the precious variables saved in the cache have kept the same
2657# value.
2658ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002659for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2661 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2663 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 case $ac_old_set,$ac_new_set in
2665 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2667$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 ac_cache_corrupted=: ;;
2669 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2671$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 ac_cache_corrupted=: ;;
2673 ,);;
2674 *)
2675 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 # differences in whitespace do not lead to failure.
2677 ac_old_val_w=`echo x $ac_old_val`
2678 ac_new_val_w=`echo x $ac_new_val`
2679 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2681$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2682 ac_cache_corrupted=:
2683 else
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2685$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2686 eval $ac_var=\$ac_old_val
2687 fi
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2689$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2691$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 fi;;
2693 esac
2694 # Pass precious variables to config.status.
2695 if test "$ac_new_set" = set; then
2696 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 *) ac_arg=$ac_var=$ac_new_val ;;
2699 esac
2700 case " $ac_configure_args " in
2701 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 esac
2704 fi
2705done
2706if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002707 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2710$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002711 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002713## -------------------- ##
2714## Main body of script. ##
2715## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002716
Guido van Rossum7f43da71994-08-01 12:15:30 +00002717ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002718ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2721ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722
Guido van Rossum627b2d71993-12-24 10:39:16 +00002723
Michael W. Hudson54241132001-12-07 15:38:26 +00002724
Trent Nelson4d4ec652012-10-16 08:51:24 -04002725
Christian Heimesff5be6e2018-01-20 13:19:21 +01002726
2727
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002728if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002729 # If we're building out-of-tree, we need to make sure the following
2730 # resources get picked up before their $srcdir counterparts.
2731 # Objects/ -> typeslots.inc
2732 # Include/ -> Python-ast.h, graminit.h
2733 # Python/ -> importlib.h
2734 # (A side effect of this is that these resources will automatically be
2735 # regenerated when building out-of-tree, regardless of whether or not
2736 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2737 # off.)
2738 BASECPPFLAGS="-IObjects -IInclude -IPython"
2739else
2740 BASECPPFLAGS=""
2741fi
2742
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743
2744
2745
2746
Victor Stinner9ed34a82017-05-02 22:35:58 +02002747if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002748then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002749# Extract the first word of "git", so it can be a program name with args.
2750set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2752$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754 $as_echo_n "(cached) " >&6
2755else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756 if test -n "$HAS_GIT"; then
2757 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758else
2759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2760for as_dir in $PATH
2761do
2762 IFS=$as_save_IFS
2763 test -z "$as_dir" && as_dir=.
2764 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002765 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002766 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2768 break 2
2769 fi
2770done
2771 done
2772IFS=$as_save_IFS
2773
Ned Deily5c4b0d02017-03-04 00:19:55 -05002774 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002775fi
2776fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002777HAS_GIT=$ac_cv_prog_HAS_GIT
2778if test -n "$HAS_GIT"; then
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2780$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002781else
2782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2783$as_echo "no" >&6; }
2784fi
2785
2786
2787else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002788HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002789fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002790if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791then
Xiang Zhang4c855572018-08-20 22:36:19 +08002792 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2793 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2794 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002795else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002796 GITVERSION=""
2797 GITTAG=""
2798 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002799fi
2800
2801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002803
2804
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002805ac_aux_dir=
2806for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2807 if test -f "$ac_dir/install-sh"; then
2808 ac_aux_dir=$ac_dir
2809 ac_install_sh="$ac_aux_dir/install-sh -c"
2810 break
2811 elif test -f "$ac_dir/install.sh"; then
2812 ac_aux_dir=$ac_dir
2813 ac_install_sh="$ac_aux_dir/install.sh -c"
2814 break
2815 elif test -f "$ac_dir/shtool"; then
2816 ac_aux_dir=$ac_dir
2817 ac_install_sh="$ac_aux_dir/shtool install -c"
2818 break
2819 fi
2820done
2821if test -z "$ac_aux_dir"; then
2822 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2823fi
2824
2825# These three variables are undocumented and unsupported,
2826# and are intended to be withdrawn in a future Autoconf release.
2827# They can cause serious problems if a builder's source tree is in a directory
2828# whose full name contains unusual characters.
2829ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2830ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2831ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2832
2833
2834# Make sure we can run config.sub.
2835$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2836 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2837
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2839$as_echo_n "checking build system type... " >&6; }
2840if ${ac_cv_build+:} false; then :
2841 $as_echo_n "(cached) " >&6
2842else
2843 ac_build_alias=$build_alias
2844test "x$ac_build_alias" = x &&
2845 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2846test "x$ac_build_alias" = x &&
2847 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2848ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2849 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2850
2851fi
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2853$as_echo "$ac_cv_build" >&6; }
2854case $ac_cv_build in
2855*-*-*) ;;
2856*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2857esac
2858build=$ac_cv_build
2859ac_save_IFS=$IFS; IFS='-'
2860set x $ac_cv_build
2861shift
2862build_cpu=$1
2863build_vendor=$2
2864shift; shift
2865# Remember, the first character of IFS is used to create $*,
2866# except with old shells:
2867build_os=$*
2868IFS=$ac_save_IFS
2869case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2870
2871
2872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2873$as_echo_n "checking host system type... " >&6; }
2874if ${ac_cv_host+:} false; then :
2875 $as_echo_n "(cached) " >&6
2876else
2877 if test "x$host_alias" = x; then
2878 ac_cv_host=$ac_cv_build
2879else
2880 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2881 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2882fi
2883
2884fi
2885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2886$as_echo "$ac_cv_host" >&6; }
2887case $ac_cv_host in
2888*-*-*) ;;
2889*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2890esac
2891host=$ac_cv_host
2892ac_save_IFS=$IFS; IFS='-'
2893set x $ac_cv_host
2894shift
2895host_cpu=$1
2896host_vendor=$2
2897shift; shift
2898# Remember, the first character of IFS is used to create $*,
2899# except with old shells:
2900host_os=$*
2901IFS=$ac_save_IFS
2902case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2903
2904
2905
doko@python.orga10e4a92013-01-25 18:45:12 +01002906
2907
Ned Deilyfcbc2462014-08-22 13:32:49 -07002908# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2909rm -f pybuilddir.txt
2910
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911for ac_prog in python$PACKAGE_VERSION python3 python
2912do
2913 # Extract the first word of "$ac_prog", so it can be a program name with args.
2914set dummy $ac_prog; ac_word=$2
2915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2916$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002917if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918 $as_echo_n "(cached) " >&6
2919else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002920 if test -n "$PYTHON_FOR_REGEN"; then
2921 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922else
2923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2924for as_dir in $PATH
2925do
2926 IFS=$as_save_IFS
2927 test -z "$as_dir" && as_dir=.
2928 for ac_exec_ext in '' $ac_executable_extensions; do
2929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002930 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2932 break 2
2933 fi
2934done
2935 done
2936IFS=$as_save_IFS
2937
2938fi
2939fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002940PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2941if test -n "$PYTHON_FOR_REGEN"; then
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2943$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002944else
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2946$as_echo "no" >&6; }
2947fi
2948
2949
Victor Stinnera5c62a82017-05-03 18:21:48 +02002950 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002951done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002952test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002953
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002954
2955
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002956if test "$cross_compiling" = yes; then
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2958$as_echo_n "checking for python interpreter for cross build... " >&6; }
2959 if test -z "$PYTHON_FOR_BUILD"; then
2960 for interp in python$PACKAGE_VERSION python3 python; do
2961 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002962 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002963 break
2964 fi
2965 interp=
2966 done
2967 if test x$interp = x; then
2968 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2969 fi
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2971$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002972 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002973 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002974elif test "$cross_compiling" = maybe; then
2975 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002976else
2977 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2978fi
2979
2980
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
Benjamin Petersond23f8222009-04-05 19:13:16 +00002982if test "$prefix" != "/"; then
2983 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2984fi
2985
2986
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
2988
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002989# We don't use PACKAGE_ variables, and they cause conflicts
2990# with other autoconf-based packages that include Python.h
2991grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2992rm confdefs.h
2993mv confdefs.h.new confdefs.h
2994
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002995
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002996VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002997
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002998# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002999
3000SOVERSION=1.0
3001
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002# The later defininition of _XOPEN_SOURCE disables certain features
3003# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
3007
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003008# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3009# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3010# them.
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003013
3014
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003015# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3016# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3017# them.
3018
Matthias Kloseb9621712010-04-24 17:59:49 +00003019$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003020
3021
Martin v. Löwisd6320502004-08-12 13:45:08 +00003022# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003023# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3024# them.
3025
Matthias Kloseb9621712010-04-24 17:59:49 +00003026$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003027
3028
3029
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003030define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003031
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003032# Arguments passed to configure.
3033
3034CONFIG_ARGS="$ac_configure_args"
3035
Matthias Kloseb9621712010-04-24 17:59:49 +00003036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3037$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003039if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041 case $enableval in
3042 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003043 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003044 # information
3045 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003046 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003048 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3049 if test ! -d "${enableval}"
3050 then
3051 enableval=/
3052 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003054 ;;
3055 esac
3056 case $enableval in
3057 no)
3058 UNIVERSALSDK=
3059 enable_universalsdk=
3060 ;;
3061 *)
3062 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063 if test ! -d "${UNIVERSALSDK}"
3064 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003065 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003067 ;;
3068 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003069
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003070
Thomas Wouters477c8d52006-05-27 19:21:47 +00003071else
3072
3073 UNIVERSALSDK=
3074 enable_universalsdk=
3075
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003078if test -n "${UNIVERSALSDK}"
3079then
Matthias Kloseb9621712010-04-24 17:59:49 +00003080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3081$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003082else
Matthias Kloseb9621712010-04-24 17:59:49 +00003083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3084$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003087
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003088
Ned Deily87adb6e2013-10-18 21:09:56 -07003089ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003090
Ned Deilycbfb9a52012-06-23 16:02:19 -07003091# For backward compatibility reasons we prefer to select '32-bit' if available,
3092# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003094if test "`uname -s`" = "Darwin"
3095then
3096 if test -n "${UNIVERSALSDK}"
3097 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003098 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003099 then
3100 UNIVERSAL_ARCHS="intel"
3101 fi
3102 fi
3103fi
3104
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003105
Matthias Kloseb9621712010-04-24 17:59:49 +00003106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3107$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003108
3109# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003110if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003111 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003112 UNIVERSAL_ARCHS="$withval"
3113
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114fi
3115
Ned Deily87adb6e2013-10-18 21:09:56 -07003116if test -n "${UNIVERSALSDK}"
3117then
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3119$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3120else
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3122$as_echo "no" >&6; }
3123fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003124
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003125
3126# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003127if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003128 withval=$with_framework_name;
3129 PYTHONFRAMEWORK=${withval}
3130 PYTHONFRAMEWORKDIR=${withval}.framework
3131 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3132
3133else
3134
3135 PYTHONFRAMEWORK=Python
3136 PYTHONFRAMEWORKDIR=Python.framework
3137 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3138
3139fi
3140
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003142if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003144 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003145 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003146 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003147 esac
3148 case $enableval in
3149 no)
3150 PYTHONFRAMEWORK=
3151 PYTHONFRAMEWORKDIR=no-framework
3152 PYTHONFRAMEWORKPREFIX=
3153 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003154 FRAMEWORKINSTALLFIRST=
3155 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003156 FRAMEWORKALTINSTALLFIRST=
3157 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003158 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 if test "x${prefix}" = "xNONE"; then
3160 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3161 else
3162 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3163 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003164 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003165 ;;
3166 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003167 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003168 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003169 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003170 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003171 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3172 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003173 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003175
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003176 if test "x${prefix}" = "xNONE" ; then
3177 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003178
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003179 else
3180 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3181 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003182
3183 case "${enableval}" in
3184 /System*)
3185 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3186 if test "${prefix}" = "NONE" ; then
3187 # See below
3188 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3189 fi
3190 ;;
3191
3192 /Library*)
3193 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3194 ;;
3195
3196 */Library/Frameworks)
3197 MDIR="`dirname "${enableval}"`"
3198 MDIR="`dirname "${MDIR}"`"
3199 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3200
3201 if test "${prefix}" = "NONE"; then
3202 # User hasn't specified the
3203 # --prefix option, but wants to install
3204 # the framework in a non-default location,
3205 # ensure that the compatibility links get
3206 # installed relative to that prefix as well
3207 # instead of in /usr/local.
3208 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3209 fi
3210 ;;
3211
3212 *)
3213 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3214 ;;
3215 esac
3216
Jack Jansen127e56e2001-09-11 14:41:54 +00003217 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003219 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3226
3227 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3228
Jack Jansene578a632001-08-15 01:27:14 +00003229 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003230
Guido van Rossum563e7081996-09-10 18:20:48 +00003231else
Martin v. Löwis11437992002-04-12 09:54:03 +00003232
Jack Jansene578a632001-08-15 01:27:14 +00003233 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003234 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003235 PYTHONFRAMEWORKPREFIX=
3236 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003237 FRAMEWORKINSTALLFIRST=
3238 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003239 FRAMEWORKALTINSTALLFIRST=
3240 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003241 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003242 if test "x${prefix}" = "xNONE" ; then
3243 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3244 else
3245 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3246 fi
Jack Jansene578a632001-08-15 01:27:14 +00003247 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003250fi
3251
Thomas Wouters477c8d52006-05-27 19:21:47 +00003252
3253
Michael W. Hudson54241132001-12-07 15:38:26 +00003254
3255
3256
3257
Jack Jansene578a632001-08-15 01:27:14 +00003258
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003259
3260
3261
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003262
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003263
Ned Deilyb8f944f2013-11-21 22:42:25 -08003264
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003265
3266cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003267#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003268_ACEOF
3269
3270
Jack Jansene578a632001-08-15 01:27:14 +00003271##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003272## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003273## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003274##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275# Set name for machine-dependent library files
3276
Matthias Kloseb9621712010-04-24 17:59:49 +00003277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3278$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279if test -z "$MACHDEP"
3280then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 # avoid using uname for cross builds
3282 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003283 # ac_sys_system and ac_sys_release are used for setting
3284 # a lot of different things including 'define_xopen_source'
3285 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003287 *-*-linux-android*)
3288 ac_sys_system=Linux-android
3289 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 *-*-linux*)
3291 ac_sys_system=Linux
3292 ;;
3293 *-*-cygwin*)
3294 ac_sys_system=Cygwin
3295 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003296 *-*-vxworks*)
3297 ac_sys_system=VxWorks
3298 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003299 *)
3300 # for now, limit cross builds to known configurations
3301 MACHDEP="unknown"
3302 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3303 esac
3304 ac_sys_release=
3305 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003306 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003307 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003308 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003309 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003310 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003311 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003312 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003313 fi
3314 ac_md_system=`echo $ac_sys_system |
3315 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3316 ac_md_release=`echo $ac_sys_release |
3317 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3318 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003319
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003320 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003321 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003322 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003323 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003324 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003325 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003326 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003327fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3329$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003330
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003331
3332if test "$cross_compiling" = yes; then
3333 case "$host" in
3334 *-*-linux*)
3335 case "$host_cpu" in
3336 arm*)
3337 _host_cpu=arm
3338 ;;
3339 *)
3340 _host_cpu=$host_cpu
3341 esac
3342 ;;
3343 *-*-cygwin*)
3344 _host_cpu=
3345 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003346 *-*-vxworks*)
3347 _host_cpu=$host_cpu
3348 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003349 *)
3350 # for now, limit cross builds to known configurations
3351 MACHDEP="unknown"
3352 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3353 esac
3354 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3355fi
3356
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003357# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3358# disable features if it is defined, without any means to access these
3359# features as extensions. For these systems, we skip the definition of
3360# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3361# some feature, make sure there is no alternative way to access this
3362# feature. Also, when using wildcards, make sure you have verified the
3363# need for not defining _XOPEN_SOURCE on all systems matching the
3364# wildcard, and that the wildcard does not include future systems
3365# (which may remove their limitations).
3366case $ac_sys_system/$ac_sys_release in
3367 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3368 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003369 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003370 # In addition, Stefan Krah confirms that issue #1244610 exists through
3371 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003372 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003373 define_xopen_source=no
3374 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3375 # also defined. This can be overridden by defining _BSD_SOURCE
3376 # As this has a different meaning on Linux, only define it on OpenBSD
3377
Matthias Kloseb9621712010-04-24 17:59:49 +00003378$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003379
3380 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003381 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003382 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3383 # also defined. This can be overridden by defining _BSD_SOURCE
3384 # As this has a different meaning on Linux, only define it on OpenBSD
3385
Matthias Kloseb9621712010-04-24 17:59:49 +00003386$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003387
3388 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003389 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3390 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3391 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003392 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003393 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003394 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3395 # request to enable features supported by the standard as a request
3396 # to disable features not supported by the standard. The best way
3397 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3398 # entirely and define __EXTENSIONS__ instead.
3399 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003400 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003401 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3402 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003403 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003404 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003405 define_xopen_source=no;;
3406 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003407 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003408 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003409 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003410 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3411 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3412 # identifies itself as Darwin/7.*
3413 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3414 # disables platform specific features beyond repair.
3415 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3416 # has no effect, don't bother defining them
3417 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003418 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003419 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003420 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003421 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3422 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3423 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003424 AIX/4)
3425 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003426 AIX/5)
3427 if test `uname -r` -eq 1; then
3428 define_xopen_source=no
3429 fi
3430 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003431 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3432 # defining NI_NUMERICHOST.
3433 QNX/6.3.2)
3434 define_xopen_source=no
3435 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003436 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3437 # in network headers still using system V types.
3438 VxWorks/*)
3439 define_xopen_source=no
3440 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003441
Ian Nortona9edf442020-02-14 03:09:11 +00003442 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3443 # chroot() and other functions
3444 hp*|HP*)
3445 define_xopen_source=no
3446 ;;
3447
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003448esac
3449
3450if test $define_xopen_source = yes
3451then
Victor Stinner14d098d2011-09-07 22:29:43 +02003452 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003453
Victor Stinner14d098d2011-09-07 22:29:43 +02003454$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003455
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003456
3457 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3458 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3459 # several APIs are not declared. Since this is also needed in some
3460 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003461
Matthias Kloseb9621712010-04-24 17:59:49 +00003462$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003463
3464
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003465
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003466$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003467
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003468fi
3469
Christian Heimes647cd872013-12-07 23:39:33 +01003470# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3471case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003472 hp*|HP*)
3473 define_stdc_a1=yes;;
3474 *)
3475 define_stdc_a1=no;;
3476esac
3477
3478if test $define_stdc_a1 = yes
3479then
Christian Heimes647cd872013-12-07 23:39:33 +01003480
3481$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3482
Christian Heimesb02bcae2013-12-08 15:21:08 +01003483fi
Christian Heimes647cd872013-12-07 23:39:33 +01003484
Jack Jansen6b08a402004-06-03 12:41:45 +00003485# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3486# it may influence the way we can build extensions, so distutils
3487# needs to check it
3488
Thomas Wouters477c8d52006-05-27 19:21:47 +00003489
Jack Jansen6b08a402004-06-03 12:41:45 +00003490CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003491EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003492
Guido van Rossum627b2d71993-12-24 10:39:16 +00003493# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003494
3495# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3496# for debug/optimization stuff. BASECFLAGS is for flags that are required
3497# just to get things to compile and link. Users are free to override OPT
3498# when running configure or make. The build should not break if they do.
3499# BASECFLAGS should generally not be messed with, however.
3500
Guido van Rossum8b131c51995-03-09 14:10:13 +00003501# If the user switches compilers, we can't believe the cache
3502if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3503then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003504 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003505(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003506fi
3507
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003508# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3509# when the compiler supports them, but we don't always want -O2, and
3510# we set -g later.
3511if test -z "$CFLAGS"; then
3512 CFLAGS=
3513fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003514
3515if test "$ac_sys_system" = "Darwin"
3516then
3517 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003518 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003519 # information
3520 if test -z "${CC}"
3521 then
3522 found_gcc=
3523 found_clang=
3524 as_save_IFS=$IFS; IFS=:
3525 for as_dir in $PATH
3526 do
3527 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003528 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003529 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003530 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003531 fi
3532 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003533 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003534 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003535 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003536 fi
3537 fi
3538 done
3539 IFS=$as_save_IFS
3540
3541 if test -n "$found_gcc" -a -n "$found_clang"
3542 then
3543 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3544 then
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3546$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3547 CC="$found_clang"
3548 CXX="$found_clang++"
3549 fi
3550
3551
3552 elif test -z "$found_gcc" -a -n "$found_clang"
3553 then
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3555$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3556 CC="$found_clang"
3557 CXX="$found_clang++"
3558
3559 elif test -z "$found_gcc" -a -z "$found_clang"
3560 then
3561 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3562 if test -n "${found_clang}"
3563 then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3565$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3566 CC="${found_clang}"
3567 CXX="`/usr/bin/xcrun -find clang++`"
3568
3569 # else: use default behaviour
3570 fi
3571 fi
3572 fi
3573fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003574ac_ext=c
3575ac_cpp='$CPP $CPPFLAGS'
3576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3578ac_compiler_gnu=$ac_cv_c_compiler_gnu
3579if test -n "$ac_tool_prefix"; then
3580 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3581set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3583$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003584if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003586else
3587 if test -n "$CC"; then
3588 ac_cv_prog_CC="$CC" # Let the user override the test.
3589else
Martin v. Löwis11437992002-04-12 09:54:03 +00003590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591for as_dir in $PATH
3592do
3593 IFS=$as_save_IFS
3594 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 break 2
3600 fi
3601done
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003604
Jack Jansendd19cf82001-12-06 22:36:17 +00003605fi
3606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003608if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3610$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003611else
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003614fi
3615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003616
Martin v. Löwis11437992002-04-12 09:54:03 +00003617fi
3618if test -z "$ac_cv_prog_CC"; then
3619 ac_ct_CC=$CC
3620 # Extract the first word of "gcc", so it can be a program name with args.
3621set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3623$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003624if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003626else
3627 if test -n "$ac_ct_CC"; then
3628 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3629else
3630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3631for as_dir in $PATH
3632do
3633 IFS=$as_save_IFS
3634 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 break 2
3640 fi
3641done
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003644
3645fi
3646fi
3647ac_ct_CC=$ac_cv_prog_ac_ct_CC
3648if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3650$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003651else
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3653$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003654fi
3655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656 if test "x$ac_ct_CC" = x; then
3657 CC=""
3658 else
3659 case $cross_compiling:$ac_tool_warned in
3660yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003661{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3662$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663ac_tool_warned=yes ;;
3664esac
3665 CC=$ac_ct_CC
3666 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
3668 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003669fi
3670
Jack Jansendd19cf82001-12-06 22:36:17 +00003671if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 if test -n "$ac_tool_prefix"; then
3673 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003674set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3676$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003677if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003679else
3680 if test -n "$CC"; then
3681 ac_cv_prog_CC="$CC" # Let the user override the test.
3682else
Martin v. Löwis11437992002-04-12 09:54:03 +00003683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3684for as_dir in $PATH
3685do
3686 IFS=$as_save_IFS
3687 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 break 2
3693 fi
3694done
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003697
3698fi
3699fi
3700CC=$ac_cv_prog_CC
3701if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3703$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003704else
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3706$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003707fi
3708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003709
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003711fi
3712if test -z "$CC"; then
3713 # Extract the first word of "cc", so it can be a program name with args.
3714set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3716$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003717if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003719else
3720 if test -n "$CC"; then
3721 ac_cv_prog_CC="$CC" # Let the user override the test.
3722else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003723 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3725for as_dir in $PATH
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3732 ac_prog_rejected=yes
3733 continue
3734 fi
3735 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 break 2
3738 fi
3739done
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003742
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743if test $ac_prog_rejected = yes; then
3744 # We found a bogon in the path, so make sure we never use it.
3745 set dummy $ac_cv_prog_CC
3746 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748 # We chose a different compiler from the bogus one.
3749 # However, it has the same basename, so the bogon will be chosen
3750 # first if we set CC to just the basename; use the full file name.
3751 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003752 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753 fi
3754fi
3755fi
3756fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003757CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3760$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761else
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3763$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764fi
3765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766
Martin v. Löwis11437992002-04-12 09:54:03 +00003767fi
3768if test -z "$CC"; then
3769 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 do
3772 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3773set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3775$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003776if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003778else
3779 if test -n "$CC"; then
3780 ac_cv_prog_CC="$CC" # Let the user override the test.
3781else
Martin v. Löwis11437992002-04-12 09:54:03 +00003782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3783for as_dir in $PATH
3784do
3785 IFS=$as_save_IFS
3786 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003792 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793done
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003796
3797fi
3798fi
3799CC=$ac_cv_prog_CC
3800if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3802$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003803else
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3805$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003806fi
3807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 test -n "$CC" && break
3810 done
3811fi
3812if test -z "$CC"; then
3813 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003815do
3816 # Extract the first word of "$ac_prog", so it can be a program name with args.
3817set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3819$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003820if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003822else
3823 if test -n "$ac_ct_CC"; then
3824 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3825else
3826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3827for as_dir in $PATH
3828do
3829 IFS=$as_save_IFS
3830 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003833 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 break 2
3836 fi
3837done
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841fi
3842fi
3843ac_ct_CC=$ac_cv_prog_ac_ct_CC
3844if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3846$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003847else
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3849$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 test -n "$ac_ct_CC" && break
3854done
Michael W. Hudson54241132001-12-07 15:38:26 +00003855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856 if test "x$ac_ct_CC" = x; then
3857 CC=""
3858 else
3859 case $cross_compiling:$ac_tool_warned in
3860yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863ac_tool_warned=yes ;;
3864esac
3865 CC=$ac_ct_CC
3866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003867fi
3868
3869fi
3870
3871
Matthias Kloseb9621712010-04-24 17:59:49 +00003872test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003874as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003875See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
3877# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003878$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3879set X $ac_compile
3880ac_compiler=$2
3881for ac_option in --version -v -V -qversion; do
3882 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883case "(($ac_try" in
3884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3885 *) ac_try_echo=$ac_try;;
3886esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3888$as_echo "$ac_try_echo"; } >&5
3889 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003890 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003891 if test -s conftest.err; then
3892 sed '10a\
3893... rest of stderr output deleted ...
3894 10q' conftest.err >conftest.er1
3895 cat conftest.er1 >&5
3896 fi
3897 rm -f conftest.er1 conftest.err
3898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899 test $ac_status = 0; }
3900done
Martin v. Löwis11437992002-04-12 09:54:03 +00003901
Matthias Kloseb9621712010-04-24 17:59:49 +00003902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003903/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003904
Martin v. Löwis11437992002-04-12 09:54:03 +00003905int
3906main ()
3907{
3908
3909 ;
3910 return 0;
3911}
3912_ACEOF
3913ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003914ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003915# Try to create an executable without -o first, disregard a.out.
3916# It will help us diagnose broken compilers, and finding out an intuition
3917# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3919$as_echo_n "checking whether the C compiler works... " >&6; }
3920ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3921
3922# The possible output files:
3923ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925ac_rmfiles=
3926for ac_file in $ac_files
3927do
3928 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3931 esac
3932done
3933rm -f $ac_rmfiles
3934
Matthias Kloseb9621712010-04-24 17:59:49 +00003935if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936case "(($ac_try" in
3937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3938 *) ac_try_echo=$ac_try;;
3939esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3941$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3945 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3947# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3948# in a Makefile. We should not override ac_cv_exeext if it was cached,
3949# so that the user can short-circuit this test for compilers unknown to
3950# Autoconf.
3951for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003952do
3953 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956 ;;
3957 [ab].out )
3958 # We found the default executable, but exeext='' is most
3959 # certainly right.
3960 break;;
3961 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 then :; else
3964 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3965 fi
3966 # We set ac_cv_exeext here because the later test for it is not
3967 # safe: cross compilers may not add the suffix if given an `-o'
3968 # argument, so we may need to know it at that point already.
3969 # Even if this section looks crufty: it has the advantage of
3970 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971 break;;
3972 * )
3973 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003974 esac
3975done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976test "$ac_cv_exeext" = no && ac_cv_exeext=
3977
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003978else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 ac_file=''
3980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003981if test -z "$ac_file"; then :
3982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3983$as_echo "no" >&6; }
3984$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003985sed 's/^/| /' conftest.$ac_ext >&5
3986
Matthias Kloseb9621712010-04-24 17:59:49 +00003987{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3988$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003989as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003990See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003991else
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3993$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3996$as_echo_n "checking for C compiler default output file name... " >&6; }
3997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3998$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000
Matthias Kloseb9621712010-04-24 17:59:49 +00004001rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004002ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4004$as_echo_n "checking for suffix of executables... " >&6; }
4005if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006case "(($ac_try" in
4007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4008 *) ac_try_echo=$ac_try;;
4009esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004010eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4011$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004013 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004014 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4015 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4017# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4018# work properly (i.e., refer to `conftest.exe'), while it won't with
4019# `rm'.
4020for ac_file in conftest.exe conftest conftest.*; do
4021 test -f "$ac_file" || continue
4022 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004024 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4025 break;;
4026 * ) break;;
4027 esac
4028done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004029else
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004032as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004033See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004035rm -f conftest conftest$ac_cv_exeext
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4037$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004038
4039rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004040EXEEXT=$ac_cv_exeext
4041ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4043/* end confdefs.h. */
4044#include <stdio.h>
4045int
4046main ()
4047{
4048FILE *f = fopen ("conftest.out", "w");
4049 return ferror (f) || fclose (f) != 0;
4050
4051 ;
4052 return 0;
4053}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004055ac_clean_files="$ac_clean_files conftest.out"
4056# Check that the compiler produces executables we can run. If not, either
4057# the compiler is broken, or we cross compile.
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4059$as_echo_n "checking whether we are cross compiling... " >&6; }
4060if test "$cross_compiling" != yes; then
4061 { { ac_try="$ac_link"
4062case "(($ac_try" in
4063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4064 *) ac_try_echo=$ac_try;;
4065esac
4066eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4067$as_echo "$ac_try_echo"; } >&5
4068 (eval "$ac_link") 2>&5
4069 ac_status=$?
4070 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4071 test $ac_status = 0; }
4072 if { ac_try='./conftest$ac_cv_exeext'
4073 { { case "(($ac_try" in
4074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075 *) ac_try_echo=$ac_try;;
4076esac
4077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4078$as_echo "$ac_try_echo"; } >&5
4079 (eval "$ac_try") 2>&5
4080 ac_status=$?
4081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4082 test $ac_status = 0; }; }; then
4083 cross_compiling=no
4084 else
4085 if test "$cross_compiling" = maybe; then
4086 cross_compiling=yes
4087 else
4088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004090as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004091If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004092See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 fi
4094 fi
4095fi
4096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4097$as_echo "$cross_compiling" >&6; }
4098
4099rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4100ac_clean_files=$ac_clean_files_save
4101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4102$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004103if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 $as_echo_n "(cached) " >&6
4105else
4106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004107/* end confdefs.h. */
4108
4109int
4110main ()
4111{
4112
4113 ;
4114 return 0;
4115}
4116_ACEOF
4117rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004118if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004119case "(($ac_try" in
4120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4121 *) ac_try_echo=$ac_try;;
4122esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004123eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4124$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4128 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129 for ac_file in conftest.o conftest.obj conftest.*; do
4130 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004133 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4134 break;;
4135 esac
4136done
4137else
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004139sed 's/^/| /' conftest.$ac_ext >&5
4140
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004143as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004144See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004145fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004146rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4149$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004150OBJEXT=$ac_cv_objext
4151ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4153$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004154if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004155 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004156else
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004159
Martin v. Löwis11437992002-04-12 09:54:03 +00004160int
4161main ()
4162{
4163#ifndef __GNUC__
4164 choke me
4165#endif
4166
4167 ;
4168 return 0;
4169}
4170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 ac_compiler_gnu=yes
4173else
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004177ac_cv_c_compiler_gnu=$ac_compiler_gnu
4178
4179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4181$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4182if test $ac_compiler_gnu = yes; then
4183 GCC=yes
4184else
4185 GCC=
4186fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004187ac_test_CFLAGS=${CFLAGS+set}
4188ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4190$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004191if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004193else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194 ac_save_c_werror_flag=$ac_c_werror_flag
4195 ac_c_werror_flag=yes
4196 ac_cv_prog_cc_g=no
4197 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004200
Martin v. Löwis11437992002-04-12 09:54:03 +00004201int
4202main ()
4203{
4204
4205 ;
4206 return 0;
4207}
4208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004209if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004210 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004211else
Matthias Kloseb9621712010-04-24 17:59:49 +00004212 CFLAGS=""
4213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214/* end confdefs.h. */
4215
4216int
4217main ()
4218{
4219
4220 ;
4221 return 0;
4222}
4223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004224if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225
Matthias Kloseb9621712010-04-24 17:59:49 +00004226else
4227 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230/* end confdefs.h. */
4231
4232int
4233main ()
4234{
4235
4236 ;
4237 return 0;
4238}
4239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004240if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4248 ac_c_werror_flag=$ac_save_c_werror_flag
4249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4251$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004252if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004254elif test $ac_cv_prog_cc_g = yes; then
4255 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004256 CFLAGS="-g -O2"
4257 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259 fi
4260else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261 if test "$GCC" = yes; then
4262 CFLAGS="-O2"
4263 else
4264 CFLAGS=
4265 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4268$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004269if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004270 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004271else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004273ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* end confdefs.h. */
4276#include <stdarg.h>
4277#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004278struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004279/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4280struct buf { int x; };
4281FILE * (*rcsopen) (struct buf *, struct stat *, int);
4282static char *e (p, i)
4283 char **p;
4284 int i;
4285{
4286 return p[i];
4287}
4288static char *f (char * (*g) (char **, int), char **p, ...)
4289{
4290 char *s;
4291 va_list v;
4292 va_start (v,p);
4293 s = g (p, va_arg (v,int));
4294 va_end (v);
4295 return s;
4296}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004297
4298/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4299 function prototypes and stuff, but not '\xHH' hex character constants.
4300 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004302 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4303 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004305int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4308 inside strings and character constants. */
4309#define FOO(x) 'x'
4310int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4311
Skip Montanaro6dead952003-09-25 14:50:04 +00004312int test (int i, double x);
4313struct s1 {int (*f) (int a);};
4314struct s2 {int (*f) (double a);};
4315int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4316int argc;
4317char **argv;
4318int
4319main ()
4320{
4321return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4322 ;
4323 return 0;
4324}
4325_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4327 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004328do
4329 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333rm -f core conftest.err conftest.$ac_objext
4334 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004335done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004337CC=$ac_save_CC
4338
4339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340# AC_CACHE_VAL
4341case "x$ac_cv_prog_cc_c89" in
4342 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4344$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4347$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004348 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4351$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004352esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004353if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004354
Matthias Kloseb9621712010-04-24 17:59:49 +00004355fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004356
Martin v. Löwis11437992002-04-12 09:54:03 +00004357ac_ext=c
4358ac_cpp='$CPP $CPPFLAGS'
4359ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4360ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4361ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004363ac_ext=c
4364ac_cpp='$CPP $CPPFLAGS'
4365ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4366ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4367ac_compiler_gnu=$ac_cv_c_compiler_gnu
4368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4369$as_echo_n "checking how to run the C preprocessor... " >&6; }
4370# On Suns, sometimes $CPP names a directory.
4371if test -n "$CPP" && test -d "$CPP"; then
4372 CPP=
4373fi
4374if test -z "$CPP"; then
4375 if ${ac_cv_prog_CPP+:} false; then :
4376 $as_echo_n "(cached) " >&6
4377else
4378 # Double quotes because CPP needs to be expanded
4379 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4380 do
4381 ac_preproc_ok=false
4382for ac_c_preproc_warn_flag in '' yes
4383do
4384 # Use a header file that comes with gcc, so configuring glibc
4385 # with a fresh cross-compiler works.
4386 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4387 # <limits.h> exists even on freestanding compilers.
4388 # On the NeXT, cc -E runs the code through the compiler's parser,
4389 # not just through cpp. "Syntax error" is here to catch this case.
4390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4391/* end confdefs.h. */
4392#ifdef __STDC__
4393# include <limits.h>
4394#else
4395# include <assert.h>
4396#endif
4397 Syntax error
4398_ACEOF
4399if ac_fn_c_try_cpp "$LINENO"; then :
4400
4401else
4402 # Broken: fails on valid input.
4403continue
4404fi
4405rm -f conftest.err conftest.i conftest.$ac_ext
4406
4407 # OK, works on sane cases. Now check whether nonexistent headers
4408 # can be detected and how.
4409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4410/* end confdefs.h. */
4411#include <ac_nonexistent.h>
4412_ACEOF
4413if ac_fn_c_try_cpp "$LINENO"; then :
4414 # Broken: success on invalid input.
4415continue
4416else
4417 # Passes both tests.
4418ac_preproc_ok=:
4419break
4420fi
4421rm -f conftest.err conftest.i conftest.$ac_ext
4422
4423done
4424# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4425rm -f conftest.i conftest.err conftest.$ac_ext
4426if $ac_preproc_ok; then :
4427 break
4428fi
4429
4430 done
4431 ac_cv_prog_CPP=$CPP
4432
4433fi
4434 CPP=$ac_cv_prog_CPP
4435else
4436 ac_cv_prog_CPP=$CPP
4437fi
4438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4439$as_echo "$CPP" >&6; }
4440ac_preproc_ok=false
4441for ac_c_preproc_warn_flag in '' yes
4442do
4443 # Use a header file that comes with gcc, so configuring glibc
4444 # with a fresh cross-compiler works.
4445 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4446 # <limits.h> exists even on freestanding compilers.
4447 # On the NeXT, cc -E runs the code through the compiler's parser,
4448 # not just through cpp. "Syntax error" is here to catch this case.
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450/* end confdefs.h. */
4451#ifdef __STDC__
4452# include <limits.h>
4453#else
4454# include <assert.h>
4455#endif
4456 Syntax error
4457_ACEOF
4458if ac_fn_c_try_cpp "$LINENO"; then :
4459
4460else
4461 # Broken: fails on valid input.
4462continue
4463fi
4464rm -f conftest.err conftest.i conftest.$ac_ext
4465
4466 # OK, works on sane cases. Now check whether nonexistent headers
4467 # can be detected and how.
4468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4469/* end confdefs.h. */
4470#include <ac_nonexistent.h>
4471_ACEOF
4472if ac_fn_c_try_cpp "$LINENO"; then :
4473 # Broken: success on invalid input.
4474continue
4475else
4476 # Passes both tests.
4477ac_preproc_ok=:
4478break
4479fi
4480rm -f conftest.err conftest.i conftest.$ac_ext
4481
4482done
4483# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4484rm -f conftest.i conftest.err conftest.$ac_ext
4485if $ac_preproc_ok; then :
4486
4487else
4488 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4489$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4490as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4491See \`config.log' for more details" "$LINENO" 5; }
4492fi
4493
4494ac_ext=c
4495ac_cpp='$CPP $CPPFLAGS'
4496ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4497ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4498ac_compiler_gnu=$ac_cv_c_compiler_gnu
4499
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4501$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4502if ${ac_cv_path_GREP+:} false; then :
4503 $as_echo_n "(cached) " >&6
4504else
4505 if test -z "$GREP"; then
4506 ac_path_GREP_found=false
4507 # Loop through the user's path and test for each of PROGNAME-LIST
4508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4510do
4511 IFS=$as_save_IFS
4512 test -z "$as_dir" && as_dir=.
4513 for ac_prog in grep ggrep; do
4514 for ac_exec_ext in '' $ac_executable_extensions; do
4515 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4516 as_fn_executable_p "$ac_path_GREP" || continue
4517# Check for GNU ac_path_GREP and select it if it is found.
4518 # Check for GNU $ac_path_GREP
4519case `"$ac_path_GREP" --version 2>&1` in
4520*GNU*)
4521 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4522*)
4523 ac_count=0
4524 $as_echo_n 0123456789 >"conftest.in"
4525 while :
4526 do
4527 cat "conftest.in" "conftest.in" >"conftest.tmp"
4528 mv "conftest.tmp" "conftest.in"
4529 cp "conftest.in" "conftest.nl"
4530 $as_echo 'GREP' >> "conftest.nl"
4531 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4532 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4533 as_fn_arith $ac_count + 1 && ac_count=$as_val
4534 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4535 # Best one so far, save it but keep looking for a better one
4536 ac_cv_path_GREP="$ac_path_GREP"
4537 ac_path_GREP_max=$ac_count
4538 fi
4539 # 10*(2^10) chars as input seems more than enough
4540 test $ac_count -gt 10 && break
4541 done
4542 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4543esac
4544
4545 $ac_path_GREP_found && break 3
4546 done
4547 done
4548 done
4549IFS=$as_save_IFS
4550 if test -z "$ac_cv_path_GREP"; then
4551 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4552 fi
4553else
4554 ac_cv_path_GREP=$GREP
4555fi
4556
4557fi
4558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4559$as_echo "$ac_cv_path_GREP" >&6; }
4560 GREP="$ac_cv_path_GREP"
4561
4562
Łukasz Langaa785c872016-09-09 17:37:37 -07004563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4564$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4565if ${ac_cv_path_SED+:} false; then :
4566 $as_echo_n "(cached) " >&6
4567else
4568 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4569 for ac_i in 1 2 3 4 5 6 7; do
4570 ac_script="$ac_script$as_nl$ac_script"
4571 done
4572 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4573 { ac_script=; unset ac_script;}
4574 if test -z "$SED"; then
4575 ac_path_SED_found=false
4576 # Loop through the user's path and test for each of PROGNAME-LIST
4577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578for as_dir in $PATH
4579do
4580 IFS=$as_save_IFS
4581 test -z "$as_dir" && as_dir=.
4582 for ac_prog in sed gsed; do
4583 for ac_exec_ext in '' $ac_executable_extensions; do
4584 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4585 as_fn_executable_p "$ac_path_SED" || continue
4586# Check for GNU ac_path_SED and select it if it is found.
4587 # Check for GNU $ac_path_SED
4588case `"$ac_path_SED" --version 2>&1` in
4589*GNU*)
4590 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4591*)
4592 ac_count=0
4593 $as_echo_n 0123456789 >"conftest.in"
4594 while :
4595 do
4596 cat "conftest.in" "conftest.in" >"conftest.tmp"
4597 mv "conftest.tmp" "conftest.in"
4598 cp "conftest.in" "conftest.nl"
4599 $as_echo '' >> "conftest.nl"
4600 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4601 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4602 as_fn_arith $ac_count + 1 && ac_count=$as_val
4603 if test $ac_count -gt ${ac_path_SED_max-0}; then
4604 # Best one so far, save it but keep looking for a better one
4605 ac_cv_path_SED="$ac_path_SED"
4606 ac_path_SED_max=$ac_count
4607 fi
4608 # 10*(2^10) chars as input seems more than enough
4609 test $ac_count -gt 10 && break
4610 done
4611 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4612esac
4613
4614 $ac_path_SED_found && break 3
4615 done
4616 done
4617 done
4618IFS=$as_save_IFS
4619 if test -z "$ac_cv_path_SED"; then
4620 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4621 fi
4622else
4623 ac_cv_path_SED=$SED
4624fi
4625
4626fi
4627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4628$as_echo "$ac_cv_path_SED" >&6; }
4629 SED="$ac_cv_path_SED"
4630 rm -f conftest.sed
4631
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004632
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004633
4634
Matthias Kloseb9621712010-04-24 17:59:49 +00004635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4636$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004638# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004639if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004640 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004641
4642 case $withval in
4643 no) with_cxx_main=no
4644 MAINCC='$(CC)';;
4645 yes) with_cxx_main=yes
4646 MAINCC='$(CXX)';;
4647 *) with_cxx_main=yes
4648 MAINCC=$withval
4649 if test -z "$CXX"
4650 then
4651 CXX=$withval
4652 fi;;
4653 esac
4654else
4655
4656 with_cxx_main=no
4657 MAINCC='$(CC)'
4658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004659fi
4660
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4662$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
4664preset_cxx="$CXX"
4665if test -z "$CXX"
4666then
4667 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004668 gcc) if test -n "$ac_tool_prefix"; then
4669 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4670set dummy ${ac_tool_prefix}g++; ac_word=$2
4671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672$as_echo_n "checking for $ac_word... " >&6; }
4673if ${ac_cv_path_CXX+:} false; then :
4674 $as_echo_n "(cached) " >&6
4675else
4676 case $CXX in
4677 [\\/]* | ?:[\\/]*)
4678 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4679 ;;
4680 *)
4681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682for as_dir in notfound
4683do
4684 IFS=$as_save_IFS
4685 test -z "$as_dir" && as_dir=.
4686 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4690 break 2
4691 fi
4692done
4693 done
4694IFS=$as_save_IFS
4695
4696 ;;
4697esac
4698fi
4699CXX=$ac_cv_path_CXX
4700if test -n "$CXX"; then
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4702$as_echo "$CXX" >&6; }
4703else
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4705$as_echo "no" >&6; }
4706fi
4707
4708
4709fi
4710if test -z "$ac_cv_path_CXX"; then
4711 ac_pt_CXX=$CXX
4712 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004713set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004716if ${ac_cv_path_ac_pt_CXX+:} false; then :
4717 $as_echo_n "(cached) " >&6
4718else
4719 case $ac_pt_CXX in
4720 [\\/]* | ?:[\\/]*)
4721 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4722 ;;
4723 *)
4724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725for as_dir in notfound
4726do
4727 IFS=$as_save_IFS
4728 test -z "$as_dir" && as_dir=.
4729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004731 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733 break 2
4734 fi
4735done
4736 done
4737IFS=$as_save_IFS
4738
4739 ;;
4740esac
4741fi
4742ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4743if test -n "$ac_pt_CXX"; then
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4745$as_echo "$ac_pt_CXX" >&6; }
4746else
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4748$as_echo "no" >&6; }
4749fi
4750
4751 if test "x$ac_pt_CXX" = x; then
4752 CXX="g++"
4753 else
4754 case $cross_compiling:$ac_tool_warned in
4755yes:)
4756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4758ac_tool_warned=yes ;;
4759esac
4760 CXX=$ac_pt_CXX
4761 fi
4762else
4763 CXX="$ac_cv_path_CXX"
4764fi
4765 ;;
4766 cc) if test -n "$ac_tool_prefix"; then
4767 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4768set dummy ${ac_tool_prefix}c++; ac_word=$2
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4770$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004771if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004772 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004773else
4774 case $CXX in
4775 [\\/]* | ?:[\\/]*)
4776 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4777 ;;
4778 *)
4779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780for as_dir in notfound
4781do
4782 IFS=$as_save_IFS
4783 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788 break 2
4789 fi
4790done
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004792IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 ;;
4795esac
4796fi
4797CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004798if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4800$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004801else
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4803$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004805
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004806
4807fi
4808if test -z "$ac_cv_path_CXX"; then
4809 ac_pt_CXX=$CXX
4810 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4813$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004815 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004817 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004819 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820 ;;
4821 *)
4822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4823for as_dir in notfound
4824do
4825 IFS=$as_save_IFS
4826 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831 break 2
4832 fi
4833done
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004835IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837 ;;
4838esac
4839fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4841if test -n "$ac_pt_CXX"; then
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4843$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004844else
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4846$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004848
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004849 if test "x$ac_pt_CXX" = x; then
4850 CXX="c++"
4851 else
4852 case $cross_compiling:$ac_tool_warned in
4853yes:)
4854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4856ac_tool_warned=yes ;;
4857esac
4858 CXX=$ac_pt_CXX
4859 fi
4860else
4861 CXX="$ac_cv_path_CXX"
4862fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004864 clang|*/clang) if test -n "$ac_tool_prefix"; then
4865 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4866set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4868$as_echo_n "checking for $ac_word... " >&6; }
4869if ${ac_cv_path_CXX+:} false; then :
4870 $as_echo_n "(cached) " >&6
4871else
4872 case $CXX in
4873 [\\/]* | ?:[\\/]*)
4874 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4875 ;;
4876 *)
4877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878for as_dir in notfound
4879do
4880 IFS=$as_save_IFS
4881 test -z "$as_dir" && as_dir=.
4882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004884 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886 break 2
4887 fi
4888done
4889 done
4890IFS=$as_save_IFS
4891
Ned Deilycbfb9a52012-06-23 16:02:19 -07004892 ;;
4893esac
4894fi
4895CXX=$ac_cv_path_CXX
4896if test -n "$CXX"; then
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4898$as_echo "$CXX" >&6; }
4899else
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901$as_echo "no" >&6; }
4902fi
4903
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004904
4905fi
4906if test -z "$ac_cv_path_CXX"; then
4907 ac_pt_CXX=$CXX
4908 # Extract the first word of "clang++", so it can be a program name with args.
4909set dummy clang++; ac_word=$2
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4911$as_echo_n "checking for $ac_word... " >&6; }
4912if ${ac_cv_path_ac_pt_CXX+:} false; then :
4913 $as_echo_n "(cached) " >&6
4914else
4915 case $ac_pt_CXX in
4916 [\\/]* | ?:[\\/]*)
4917 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4918 ;;
4919 *)
4920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921for as_dir in notfound
4922do
4923 IFS=$as_save_IFS
4924 test -z "$as_dir" && as_dir=.
4925 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004927 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4929 break 2
4930 fi
4931done
4932 done
4933IFS=$as_save_IFS
4934
4935 ;;
4936esac
4937fi
4938ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4939if test -n "$ac_pt_CXX"; then
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4941$as_echo "$ac_pt_CXX" >&6; }
4942else
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944$as_echo "no" >&6; }
4945fi
4946
4947 if test "x$ac_pt_CXX" = x; then
4948 CXX="clang++"
4949 else
4950 case $cross_compiling:$ac_tool_warned in
4951yes:)
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4953$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4954ac_tool_warned=yes ;;
4955esac
4956 CXX=$ac_pt_CXX
4957 fi
4958else
4959 CXX="$ac_cv_path_CXX"
4960fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004961 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004962 icc|*/icc) if test -n "$ac_tool_prefix"; then
4963 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4964set dummy ${ac_tool_prefix}icpc; ac_word=$2
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4966$as_echo_n "checking for $ac_word... " >&6; }
4967if ${ac_cv_path_CXX+:} false; then :
4968 $as_echo_n "(cached) " >&6
4969else
4970 case $CXX in
4971 [\\/]* | ?:[\\/]*)
4972 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4973 ;;
4974 *)
4975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4976for as_dir in notfound
4977do
4978 IFS=$as_save_IFS
4979 test -z "$as_dir" && as_dir=.
4980 for ac_exec_ext in '' $ac_executable_extensions; do
4981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4982 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4984 break 2
4985 fi
4986done
4987 done
4988IFS=$as_save_IFS
4989
4990 ;;
4991esac
4992fi
4993CXX=$ac_cv_path_CXX
4994if test -n "$CXX"; then
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4996$as_echo "$CXX" >&6; }
4997else
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999$as_echo "no" >&6; }
5000fi
5001
5002
5003fi
5004if test -z "$ac_cv_path_CXX"; then
5005 ac_pt_CXX=$CXX
5006 # Extract the first word of "icpc", so it can be a program name with args.
5007set dummy icpc; ac_word=$2
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
5010if ${ac_cv_path_ac_pt_CXX+:} false; then :
5011 $as_echo_n "(cached) " >&6
5012else
5013 case $ac_pt_CXX in
5014 [\\/]* | ?:[\\/]*)
5015 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5016 ;;
5017 *)
5018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019for as_dir in notfound
5020do
5021 IFS=$as_save_IFS
5022 test -z "$as_dir" && as_dir=.
5023 for ac_exec_ext in '' $ac_executable_extensions; do
5024 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5025 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5027 break 2
5028 fi
5029done
5030 done
5031IFS=$as_save_IFS
5032
5033 ;;
5034esac
5035fi
5036ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5037if test -n "$ac_pt_CXX"; then
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5039$as_echo "$ac_pt_CXX" >&6; }
5040else
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
5043fi
5044
5045 if test "x$ac_pt_CXX" = x; then
5046 CXX="icpc"
5047 else
5048 case $cross_compiling:$ac_tool_warned in
5049yes:)
5050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5052ac_tool_warned=yes ;;
5053esac
5054 CXX=$ac_pt_CXX
5055 fi
5056else
5057 CXX="$ac_cv_path_CXX"
5058fi
5059 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060 esac
5061 if test "$CXX" = "notfound"
5062 then
5063 CXX=""
5064 fi
5065fi
5066if test -z "$CXX"
5067then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005068 if test -n "$ac_tool_prefix"; then
5069 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5070 do
5071 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5074$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005075if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005077else
5078 if test -n "$CXX"; then
5079 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5080else
5081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5082for as_dir in $PATH
5083do
5084 IFS=$as_save_IFS
5085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005088 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090 break 2
5091 fi
5092done
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095
5096fi
5097fi
5098CXX=$ac_cv_prog_CXX
5099if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5101$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102else
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5104$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005105fi
5106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005107
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005108 test -n "$CXX" && break
5109 done
5110fi
5111if test -z "$CXX"; then
5112 ac_ct_CXX=$CXX
5113 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5114do
5115 # Extract the first word of "$ac_prog", so it can be a program name with args.
5116set dummy $ac_prog; ac_word=$2
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5118$as_echo_n "checking for $ac_word... " >&6; }
5119if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5120 $as_echo_n "(cached) " >&6
5121else
5122 if test -n "$ac_ct_CXX"; then
5123 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5124else
5125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5126for as_dir in $PATH
5127do
5128 IFS=$as_save_IFS
5129 test -z "$as_dir" && as_dir=.
5130 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005132 ac_cv_prog_ac_ct_CXX="$ac_prog"
5133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5134 break 2
5135 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005136done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005137 done
5138IFS=$as_save_IFS
5139
5140fi
5141fi
5142ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5143if test -n "$ac_ct_CXX"; then
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5145$as_echo "$ac_ct_CXX" >&6; }
5146else
5147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5148$as_echo "no" >&6; }
5149fi
5150
5151
5152 test -n "$ac_ct_CXX" && break
5153done
5154
5155 if test "x$ac_ct_CXX" = x; then
5156 CXX="notfound"
5157 else
5158 case $cross_compiling:$ac_tool_warned in
5159yes:)
5160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5162ac_tool_warned=yes ;;
5163esac
5164 CXX=$ac_ct_CXX
5165 fi
5166fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167
5168 if test "$CXX" = "notfound"
5169 then
5170 CXX=""
5171 fi
5172fi
5173if test "$preset_cxx" != "$CXX"
5174then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005175 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005176
5177 By default, distutils will build C++ extension modules with \"$CXX\".
5178 If this is not intended, then set CXX on the configure command line.
5179 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005180$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005181
5182 By default, distutils will build C++ extension modules with \"$CXX\".
5183 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005184 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185fi
5186
5187
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005188MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5189
5190
5191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5192$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5193cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005194#undef bfin
5195#undef cris
5196#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005197#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005198#undef hppa
5199#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005200#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005201#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005202#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005203#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005205#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005206 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005207#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208# if defined(__x86_64__) && defined(__LP64__)
5209 x86_64-linux-gnu
5210# elif defined(__x86_64__) && defined(__ILP32__)
5211 x86_64-linux-gnux32
5212# elif defined(__i386__)
5213 i386-linux-gnu
5214# elif defined(__aarch64__) && defined(__AARCH64EL__)
5215# if defined(__ILP32__)
5216 aarch64_ilp32-linux-gnu
5217# else
5218 aarch64-linux-gnu
5219# endif
5220# elif defined(__aarch64__) && defined(__AARCH64EB__)
5221# if defined(__ILP32__)
5222 aarch64_be_ilp32-linux-gnu
5223# else
5224 aarch64_be-linux-gnu
5225# endif
5226# elif defined(__alpha__)
5227 alpha-linux-gnu
5228# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5229# if defined(__ARMEL__)
5230 arm-linux-gnueabihf
5231# else
5232 armeb-linux-gnueabihf
5233# endif
5234# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5235# if defined(__ARMEL__)
5236 arm-linux-gnueabi
5237# else
5238 armeb-linux-gnueabi
5239# endif
5240# elif defined(__hppa__)
5241 hppa-linux-gnu
5242# elif defined(__ia64__)
5243 ia64-linux-gnu
5244# elif defined(__m68k__) && !defined(__mcoldfire__)
5245 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005246# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5247# if _MIPS_SIM == _ABIO32
5248 mipsisa32r6el-linux-gnu
5249# elif _MIPS_SIM == _ABIN32
5250 mipsisa64r6el-linux-gnuabin32
5251# elif _MIPS_SIM == _ABI64
5252 mipsisa64r6el-linux-gnuabi64
5253# else
5254# error unknown platform triplet
5255# endif
5256# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5257# if _MIPS_SIM == _ABIO32
5258 mipsisa32r6-linux-gnu
5259# elif _MIPS_SIM == _ABIN32
5260 mipsisa64r6-linux-gnuabin32
5261# elif _MIPS_SIM == _ABI64
5262 mipsisa64r6-linux-gnuabi64
5263# else
5264# error unknown platform triplet
5265# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005266# elif defined(__mips_hard_float) && defined(_MIPSEL)
5267# if _MIPS_SIM == _ABIO32
5268 mipsel-linux-gnu
5269# elif _MIPS_SIM == _ABIN32
5270 mips64el-linux-gnuabin32
5271# elif _MIPS_SIM == _ABI64
5272 mips64el-linux-gnuabi64
5273# else
5274# error unknown platform triplet
5275# endif
5276# elif defined(__mips_hard_float)
5277# if _MIPS_SIM == _ABIO32
5278 mips-linux-gnu
5279# elif _MIPS_SIM == _ABIN32
5280 mips64-linux-gnuabin32
5281# elif _MIPS_SIM == _ABI64
5282 mips64-linux-gnuabi64
5283# else
5284# error unknown platform triplet
5285# endif
5286# elif defined(__or1k__)
5287 or1k-linux-gnu
5288# elif defined(__powerpc__) && defined(__SPE__)
5289 powerpc-linux-gnuspe
5290# elif defined(__powerpc64__)
5291# if defined(__LITTLE_ENDIAN__)
5292 powerpc64le-linux-gnu
5293# else
5294 powerpc64-linux-gnu
5295# endif
5296# elif defined(__powerpc__)
5297 powerpc-linux-gnu
5298# elif defined(__s390x__)
5299 s390x-linux-gnu
5300# elif defined(__s390__)
5301 s390-linux-gnu
5302# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5303 sh4-linux-gnu
5304# elif defined(__sparc__) && defined(__arch64__)
5305 sparc64-linux-gnu
5306# elif defined(__sparc__)
5307 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005308# elif defined(__riscv)
5309# if __riscv_xlen == 32
5310 riscv32-linux-gnu
5311# elif __riscv_xlen == 64
5312 riscv64-linux-gnu
5313# else
5314# error unknown platform triplet
5315# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005316# else
5317# error unknown platform triplet
5318# endif
5319#elif defined(__FreeBSD_kernel__)
5320# if defined(__LP64__)
5321 x86_64-kfreebsd-gnu
5322# elif defined(__i386__)
5323 i386-kfreebsd-gnu
5324# else
5325# error unknown platform triplet
5326# endif
5327#elif defined(__gnu_hurd__)
5328 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005329#elif defined(__APPLE__)
5330 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005331#elif defined(__VXWORKS__)
5332 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005333#else
5334# error unknown platform triplet
5335#endif
5336
5337EOF
5338
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005339if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005340 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5342$as_echo "$PLATFORM_TRIPLET" >&6; }
5343else
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5345$as_echo "none" >&6; }
5346fi
5347rm -f conftest.c conftest.out
5348
5349if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5350 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5351 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5352 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005353elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5354 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005355fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005356
doko@ubuntu.com55532312016-06-14 08:55:19 +02005357if test x$MULTIARCH != x; then
5358 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5359fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005360
5361
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5363$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5364save_LDFLAGS="$LDFLAGS"
5365LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005366
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5368/* end confdefs.h. */
5369
5370int
5371main ()
5372{
5373
5374 ;
5375 return 0;
5376}
5377_ACEOF
5378if ac_fn_c_try_link "$LINENO"; then :
5379 NO_AS_NEEDED="-Wl,--no-as-needed"
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5381$as_echo "yes" >&6; }
5382else
5383 NO_AS_NEEDED=""
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5385$as_echo "no" >&6; }
5386fi
5387rm -f core conftest.err conftest.$ac_objext \
5388 conftest$ac_exeext conftest.$ac_ext
5389LDFLAGS="$save_LDFLAGS"
5390
5391
5392
5393# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394
Matthias Kloseb9621712010-04-24 17:59:49 +00005395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5396$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005397if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399else
5400 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5401 then ac_cv_path_EGREP="$GREP -E"
5402 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 # Loop through the user's path and test for each of PROGNAME-LIST
5406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5408do
5409 IFS=$as_save_IFS
5410 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 for ac_prog in egrep; do
5412 for ac_exec_ext in '' $ac_executable_extensions; do
5413 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005414 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005415# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416 # Check for GNU $ac_path_EGREP
5417case `"$ac_path_EGREP" --version 2>&1` in
5418*GNU*)
5419 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5420*)
5421 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 while :
5424 do
5425 cat "conftest.in" "conftest.in" >"conftest.tmp"
5426 mv "conftest.tmp" "conftest.in"
5427 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5430 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5433 # Best one so far, save it but keep looking for a better one
5434 ac_cv_path_EGREP="$ac_path_EGREP"
5435 ac_path_EGREP_max=$ac_count
5436 fi
5437 # 10*(2^10) chars as input seems more than enough
5438 test $ac_count -gt 10 && break
5439 done
5440 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5441esac
5442
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 $ac_path_EGREP_found && break 3
5444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005449 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451else
5452 ac_cv_path_EGREP=$EGREP
5453fi
5454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455 fi
5456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5458$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005460
5461
Matthias Kloseb9621712010-04-24 17:59:49 +00005462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5463$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005464if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 $as_echo_n "(cached) " >&6
5466else
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005468/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005469#include <stdlib.h>
5470#include <stdarg.h>
5471#include <string.h>
5472#include <float.h>
5473
5474int
5475main ()
5476{
5477
5478 ;
5479 return 0;
5480}
5481_ACEOF
5482if ac_fn_c_try_compile "$LINENO"; then :
5483 ac_cv_header_stdc=yes
5484else
5485 ac_cv_header_stdc=no
5486fi
5487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5488
5489if test $ac_cv_header_stdc = yes; then
5490 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5492/* end confdefs.h. */
5493#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005494
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005495_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005499else
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005501fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005502rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503
Matthias Kloseb9621712010-04-24 17:59:49 +00005504fi
5505
5506if test $ac_cv_header_stdc = yes; then
5507 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5509/* end confdefs.h. */
5510#include <stdlib.h>
5511
5512_ACEOF
5513if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5514 $EGREP "free" >/dev/null 2>&1; then :
5515
5516else
5517 ac_cv_header_stdc=no
5518fi
5519rm -f conftest*
5520
5521fi
5522
5523if test $ac_cv_header_stdc = yes; then
5524 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5525 if test "$cross_compiling" = yes; then :
5526 :
5527else
5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5529/* end confdefs.h. */
5530#include <ctype.h>
5531#include <stdlib.h>
5532#if ((' ' & 0x0FF) == 0x020)
5533# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5534# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5535#else
5536# define ISLOWER(c) \
5537 (('a' <= (c) && (c) <= 'i') \
5538 || ('j' <= (c) && (c) <= 'r') \
5539 || ('s' <= (c) && (c) <= 'z'))
5540# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5541#endif
5542
5543#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5544int
5545main ()
5546{
5547 int i;
5548 for (i = 0; i < 256; i++)
5549 if (XOR (islower (i), ISLOWER (i))
5550 || toupper (i) != TOUPPER (i))
5551 return 2;
5552 return 0;
5553}
5554_ACEOF
5555if ac_fn_c_try_run "$LINENO"; then :
5556
5557else
5558 ac_cv_header_stdc=no
5559fi
5560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5561 conftest.$ac_objext conftest.beam conftest.$ac_ext
5562fi
5563
5564fi
5565fi
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5567$as_echo "$ac_cv_header_stdc" >&6; }
5568if test $ac_cv_header_stdc = yes; then
5569
5570$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5571
5572fi
5573
5574# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5575for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5576 inttypes.h stdint.h unistd.h
5577do :
5578 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5579ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5580"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005581if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005582 cat >>confdefs.h <<_ACEOF
5583#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5584_ACEOF
5585
5586fi
5587
5588done
5589
5590
5591
5592 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005593if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005594 MINIX=yes
5595else
5596 MINIX=
5597fi
5598
5599
5600 if test "$MINIX" = yes; then
5601
5602$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5603
5604
5605$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5606
5607
5608$as_echo "#define _MINIX 1" >>confdefs.h
5609
5610 fi
5611
5612
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5614$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005615if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005616 $as_echo_n "(cached) " >&6
5617else
5618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5619/* end confdefs.h. */
5620
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005621# define __EXTENSIONS__ 1
5622 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005623int
5624main ()
5625{
5626
5627 ;
5628 return 0;
5629}
5630_ACEOF
5631if ac_fn_c_try_compile "$LINENO"; then :
5632 ac_cv_safe_to_define___extensions__=yes
5633else
5634 ac_cv_safe_to_define___extensions__=no
5635fi
5636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5637fi
5638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5639$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5640 test $ac_cv_safe_to_define___extensions__ = yes &&
5641 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5642
5643 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5644
5645 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5646
5647 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5648
5649 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5650
5651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652
Xavier de Gaye95750b12016-07-09 11:05:42 +02005653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5654$as_echo_n "checking for the Android API level... " >&6; }
5655cat >> conftest.c <<EOF
5656#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005657android_api = __ANDROID_API__
5658arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659#else
5660#error not Android
5661#endif
5662EOF
5663
5664if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005665 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5666 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5668$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005669 if test -z "$ANDROID_API_LEVEL"; then
5670 echo 'Fatal: you must define __ANDROID_API__'
5671 exit 1
5672 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005673
5674cat >>confdefs.h <<_ACEOF
5675#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5676_ACEOF
5677
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005678
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5680$as_echo_n "checking for the Android arm ABI... " >&6; }
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5682$as_echo "$_arm_arch" >&6; }
5683 if test "$_arm_arch" = 7; then
5684 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5685 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5686 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005687else
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5689$as_echo "not Android" >&6; }
5690fi
5691rm -f conftest.c conftest.out
5692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693# Check for unsupported systems
5694case $ac_sys_system/$ac_sys_release in
5695atheos*|Linux*/1*)
5696 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5697 echo See README for details.
5698 exit 1;;
5699esac
5700
5701
Matthias Kloseb9621712010-04-24 17:59:49 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5703$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704
5705# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005706if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 withval=$with_suffix;
5708 case $withval in
5709 no) EXEEXT=;;
5710 yes) EXEEXT=.exe;;
5711 *) EXEEXT=$withval;;
5712 esac
5713fi
5714
Matthias Kloseb9621712010-04-24 17:59:49 +00005715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5716$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
5718# Test whether we're running on a non-case-sensitive system, in which
5719# case we give a warning if no ext is given
5720
Matthias Kloseb9621712010-04-24 17:59:49 +00005721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5722$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723if test ! -d CaseSensitiveTestDir; then
5724mkdir CaseSensitiveTestDir
5725fi
5726
5727if test -d casesensitivetestdir
5728then
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5730$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731 BUILDEXEEXT=.exe
5732else
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735 BUILDEXEEXT=$EXEEXT
5736fi
5737rmdir CaseSensitiveTestDir
5738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739case $ac_sys_system in
5740hp*|HP*)
5741 case $CC in
5742 cc|*/cc) CC="$CC -Ae";;
5743 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744esac
5745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
Matthias Kloseb9621712010-04-24 17:59:49 +00005747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5748$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749if test -z "$LIBRARY"
5750then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005751 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5754$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755
5756# LDLIBRARY is the name of the library to link against (as opposed to the
5757# name of the library into which to insert object files). BLDLIBRARY is also
5758# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5759# is blank as the main program is not linked directly against LDLIBRARY.
5760# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5761# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5762# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5763# DLLLIBRARY is the shared (i.e., DLL) library.
5764#
5765# RUNSHARED is used to run shared python without installed libraries
5766#
5767# INSTSONAME is the name of the shared library that will be use to install
5768# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005769#
5770# LDVERSION is the shared library version number, normally the Python version
5771# with the ABI build flags appended.
5772
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773
5774
5775
5776
5777
5778
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780LDLIBRARY="$LIBRARY"
5781BLDLIBRARY='$(LDLIBRARY)'
5782INSTSONAME='$(LDLIBRARY)'
5783DLLLIBRARY=''
5784LDLIBRARYDIR=''
5785RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005786LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787
5788# LINKCC is the command that links the python executable -- default is $(CC).
5789# If CXX is set, and if it is needed to link a main function that was
5790# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5791# python might then depend on the C++ runtime
5792# This is altered for AIX in order to build the export list before
5793# linking.
5794
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5796$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797if test -z "$LINKCC"
5798then
5799 LINKCC='$(PURIFY) $(MAINCC)'
5800 case $ac_sys_system in
5801 AIX*)
5802 exp_extra="\"\""
5803 if test $ac_sys_release -ge 5 -o \
5804 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5805 exp_extra="."
5806 fi
5807 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808 QNX*)
5809 # qcc must be used because the other compilers do not
5810 # support -N.
5811 LINKCC=qcc;;
5812 esac
5813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5815$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816
5817# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5818# make sure we default having it set to "no": this is used by
5819# distutils.unixccompiler to know if it should add --enable-new-dtags
5820# to linker command lines, and failing to detect GNU ld simply results
5821# in the same bahaviour as before.
5822
Matthias Kloseb9621712010-04-24 17:59:49 +00005823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5824$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825ac_prog=ld
5826if test "$GCC" = yes; then
5827 ac_prog=`$CC -print-prog-name=ld`
5828fi
5829case `"$ac_prog" -V 2>&1 < /dev/null` in
5830 *GNU*)
5831 GNULD=yes;;
5832 *)
5833 GNULD=no;;
5834esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5836$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837
Matthias Kloseb9621712010-04-24 17:59:49 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5839$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005841if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842 enableval=$enable_shared;
5843fi
5844
5845
5846if test -z "$enable_shared"
5847then
5848 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005849 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850 enable_shared="yes";;
5851 *)
5852 enable_shared="no";;
5853 esac
5854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5856$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5859$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005861if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005862 enableval=$enable_profiling;
5863fi
5864
5865if test "x$enable_profiling" = xyes; then
5866 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005867 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869/* end confdefs.h. */
5870int main() { return 0; }
5871_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005872if ac_fn_c_try_link "$LINENO"; then :
5873
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005875 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005877rm -f core conftest.err conftest.$ac_objext \
5878 conftest$ac_exeext conftest.$ac_ext
5879 CC="$ac_save_cc"
5880else
5881 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5884$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885
doko@ubuntu.comba015832012-06-30 16:52:05 +02005886if test "x$enable_profiling" = xyes; then
5887 BASECFLAGS="-pg $BASECFLAGS"
5888 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889fi
5890
Matthias Kloseb9621712010-04-24 17:59:49 +00005891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5892$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893
5894# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5895# library that we build, but we do not want to link against it (we
5896# will find it with a -framework option). For this reason there is an
5897# extra variable BLDLIBRARY against which Python and the extension
5898# modules are linked, BLDLIBRARY. This is normally the same as
5899# LDLIBRARY, but empty for MacOSX framework builds.
5900if test "$enable_framework"
5901then
5902 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005903 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 BLDLIBRARY=''
5905else
5906 BLDLIBRARY='$(LDLIBRARY)'
5907fi
5908
5909# Other platforms follow
5910if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005911 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912
Matthias Kloseb9621712010-04-24 17:59:49 +00005913$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914
5915 case $ac_sys_system in
5916 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).dll.a'
5918 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 ;;
5920 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 LDLIBRARY='libpython$(LDVERSION).so'
5922 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005923 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005925 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005926 then
5927 PY3LIBRARY=libpython3.so
5928 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005930 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005931 LDLIBRARY='libpython$(LDVERSION).so'
5932 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005933 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005935 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005936 then
5937 PY3LIBRARY=libpython3.so
5938 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ;;
5940 hp*|HP*)
5941 case `uname -m` in
5942 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005943 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
5945 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ;;
5948 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005950 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005953 LDLIBRARY='libpython$(LDVERSION).dylib'
5954 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005955 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005957 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005959 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005960 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961
5962 esac
5963else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005964 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 case $ac_sys_system in
5966 CYGWIN*)
5967 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 ;;
5970 esac
5971fi
5972
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005973if test "$cross_compiling" = yes; then
5974 RUNSHARED=
5975fi
5976
Matthias Kloseb9621712010-04-24 17:59:49 +00005977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5978$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005981if test -n "$ac_tool_prefix"; then
5982 for ac_prog in ar aal
5983 do
5984 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5985set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005988if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990else
5991 if test -n "$AR"; then
5992 ac_cv_prog_AR="$AR" # Let the user override the test.
5993else
5994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997 IFS=$as_save_IFS
5998 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006001 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003 break 2
6004 fi
6005done
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007IFS=$as_save_IFS
6008
6009fi
6010fi
6011AR=$ac_cv_prog_AR
6012if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6014$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015else
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018fi
6019
6020
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006021 test -n "$AR" && break
6022 done
6023fi
6024if test -z "$AR"; then
6025 ac_ct_AR=$AR
6026 for ac_prog in ar aal
6027do
6028 # Extract the first word of "$ac_prog", so it can be a program name with args.
6029set dummy $ac_prog; ac_word=$2
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
6032if ${ac_cv_prog_ac_ct_AR+:} false; then :
6033 $as_echo_n "(cached) " >&6
6034else
6035 if test -n "$ac_ct_AR"; then
6036 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6037else
6038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6039for as_dir in $PATH
6040do
6041 IFS=$as_save_IFS
6042 test -z "$as_dir" && as_dir=.
6043 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006045 ac_cv_prog_ac_ct_AR="$ac_prog"
6046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6047 break 2
6048 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006050 done
6051IFS=$as_save_IFS
6052
6053fi
6054fi
6055ac_ct_AR=$ac_cv_prog_ac_ct_AR
6056if test -n "$ac_ct_AR"; then
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6058$as_echo "$ac_ct_AR" >&6; }
6059else
6060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6061$as_echo "no" >&6; }
6062fi
6063
6064
6065 test -n "$ac_ct_AR" && break
6066done
6067
6068 if test "x$ac_ct_AR" = x; then
6069 AR="ar"
6070 else
6071 case $cross_compiling:$ac_tool_warned in
6072yes:)
6073{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6074$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6075ac_tool_warned=yes ;;
6076esac
6077 AR=$ac_ct_AR
6078 fi
6079fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080
6081
6082# tweak ARFLAGS only if the user didn't set it on the command line
6083
6084if test -z "$ARFLAGS"
6085then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006086 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087fi
6088
doko@ubuntu.com58844492012-06-30 18:25:32 +02006089if test -n "$ac_tool_prefix"; then
6090 for ac_prog in readelf
6091 do
6092 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6093set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6095$as_echo_n "checking for $ac_word... " >&6; }
6096if ${ac_cv_prog_READELF+:} false; then :
6097 $as_echo_n "(cached) " >&6
6098else
6099 if test -n "$READELF"; then
6100 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6101else
6102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6103for as_dir in $PATH
6104do
6105 IFS=$as_save_IFS
6106 test -z "$as_dir" && as_dir=.
6107 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006109 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6111 break 2
6112 fi
6113done
6114 done
6115IFS=$as_save_IFS
6116
6117fi
6118fi
6119READELF=$ac_cv_prog_READELF
6120if test -n "$READELF"; then
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6122$as_echo "$READELF" >&6; }
6123else
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6125$as_echo "no" >&6; }
6126fi
6127
6128
6129 test -n "$READELF" && break
6130 done
6131fi
6132if test -z "$READELF"; then
6133 ac_ct_READELF=$READELF
6134 for ac_prog in readelf
6135do
6136 # Extract the first word of "$ac_prog", so it can be a program name with args.
6137set dummy $ac_prog; ac_word=$2
6138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6139$as_echo_n "checking for $ac_word... " >&6; }
6140if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6141 $as_echo_n "(cached) " >&6
6142else
6143 if test -n "$ac_ct_READELF"; then
6144 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6145else
6146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6147for as_dir in $PATH
6148do
6149 IFS=$as_save_IFS
6150 test -z "$as_dir" && as_dir=.
6151 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006152 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006153 ac_cv_prog_ac_ct_READELF="$ac_prog"
6154 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6155 break 2
6156 fi
6157done
6158 done
6159IFS=$as_save_IFS
6160
6161fi
6162fi
6163ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6164if test -n "$ac_ct_READELF"; then
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6166$as_echo "$ac_ct_READELF" >&6; }
6167else
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6169$as_echo "no" >&6; }
6170fi
6171
6172
6173 test -n "$ac_ct_READELF" && break
6174done
6175
6176 if test "x$ac_ct_READELF" = x; then
6177 READELF=":"
6178 else
6179 case $cross_compiling:$ac_tool_warned in
6180yes:)
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6183ac_tool_warned=yes ;;
6184esac
6185 READELF=$ac_ct_READELF
6186 fi
6187fi
6188
6189if test "$cross_compiling" = yes; then
6190 case "$READELF" in
6191 readelf|:)
6192 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6193 ;;
6194 esac
6195fi
6196
6197
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006200hp*|HP*)
6201 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202 if test -z "$INSTALL"
6203 then
6204 INSTALL="${srcdir}/install-sh -c"
6205 fi
6206esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207# Find a good install program. We prefer a C program (faster),
6208# so one script is as good as another. But avoid the broken or
6209# incompatible versions:
6210# SysV /etc/install, /usr/sbin/install
6211# SunOS /usr/etc/install
6212# IRIX /sbin/install
6213# AIX /bin/install
6214# AmigaOS /C/install, which installs bootblocks on floppy discs
6215# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6216# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6217# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6218# OS/2's system install, which has a completely different semantic
6219# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006220# Reject install programs that cannot install multiple files.
6221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6222$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006224if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006225 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226else
6227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6228for as_dir in $PATH
6229do
6230 IFS=$as_save_IFS
6231 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006232 # Account for people who put trailing slashes in PATH elements.
6233case $as_dir/ in #((
6234 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006236 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237 /usr/ucb/* ) ;;
6238 *)
6239 # OSF1 and SCO ODT 3.0 have their own names for install.
6240 # Don't use installbsd from OSF since it installs stuff as root
6241 # by default.
6242 for ac_prog in ginstall scoinst install; do
6243 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006244 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006245 if test $ac_prog = install &&
6246 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6247 # AIX install. It has an incompatible calling convention.
6248 :
6249 elif test $ac_prog = install &&
6250 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6251 # program-specific install script used by HP pwplus--don't use.
6252 :
6253 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006254 rm -rf conftest.one conftest.two conftest.dir
6255 echo one > conftest.one
6256 echo two > conftest.two
6257 mkdir conftest.dir
6258 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6259 test -s conftest.one && test -s conftest.two &&
6260 test -s conftest.dir/conftest.one &&
6261 test -s conftest.dir/conftest.two
6262 then
6263 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6264 break 3
6265 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266 fi
6267 fi
6268 done
6269 done
6270 ;;
6271esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006272
6273 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274IFS=$as_save_IFS
6275
Matthias Kloseb9621712010-04-24 17:59:49 +00006276rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277
6278fi
6279 if test "${ac_cv_path_install+set}" = set; then
6280 INSTALL=$ac_cv_path_install
6281 else
6282 # As a last resort, use the slow shell script. Don't cache a
6283 # value for INSTALL within a source directory, because that will
6284 # break other packages using the cache if that directory is
6285 # removed, or if the value is a relative name.
6286 INSTALL=$ac_install_sh
6287 fi
6288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6290$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291
6292# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6293# It thinks the first close brace ends the variable substitution.
6294test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6295
6296test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6297
6298test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6299
Matthias Klose93a0ef12012-03-15 18:08:34 +01006300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6301$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6302if test -z "$MKDIR_P"; then
6303 if ${ac_cv_path_mkdir+:} false; then :
6304 $as_echo_n "(cached) " >&6
6305else
6306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6307for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6308do
6309 IFS=$as_save_IFS
6310 test -z "$as_dir" && as_dir=.
6311 for ac_prog in mkdir gmkdir; do
6312 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006313 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006314 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6315 'mkdir (GNU coreutils) '* | \
6316 'mkdir (coreutils) '* | \
6317 'mkdir (fileutils) '4.1*)
6318 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6319 break 3;;
6320 esac
6321 done
6322 done
6323 done
6324IFS=$as_save_IFS
6325
6326fi
6327
6328 test -d ./--version && rmdir ./--version
6329 if test "${ac_cv_path_mkdir+set}" = set; then
6330 MKDIR_P="$ac_cv_path_mkdir -p"
6331 else
6332 # As a last resort, use the slow shell script. Don't cache a
6333 # value for MKDIR_P within a source directory, because that will
6334 # break other packages using the cache if that directory is
6335 # removed, or if the value is a relative name.
6336 MKDIR_P="$ac_install_sh -d"
6337 fi
6338fi
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6340$as_echo "$MKDIR_P" >&6; }
6341
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342
6343# Not every filesystem supports hard links
6344
6345if test -z "$LN" ; then
6346 case $ac_sys_system in
6347 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348 *) LN=ln;;
6349 esac
6350fi
6351
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006352# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006353
6354ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006355
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006356# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6358$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359
6360# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006361if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362 withval=$with_pydebug;
6363if test "$withval" != no
6364then
6365
Matthias Kloseb9621712010-04-24 17:59:49 +00006366$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367
Matthias Kloseb9621712010-04-24 17:59:49 +00006368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6369$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006370 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006371 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006372else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6373$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374fi
6375else
Matthias Kloseb9621712010-04-24 17:59:49 +00006376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6377$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006378fi
6379
6380
Victor Stinnerf4e47032019-04-25 00:56:28 +02006381# Check for --with-trace-refs
6382# --with-trace-refs
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6384$as_echo_n "checking for --with-trace-refs... " >&6; }
6385
6386# Check whether --with-trace-refs was given.
6387if test "${with_trace_refs+set}" = set; then :
6388 withval=$with_trace_refs;
6389else
6390 with_trace_refs=no
6391fi
6392
6393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6394$as_echo "$with_trace_refs" >&6; }
6395
6396if test "$with_trace_refs" = "yes"
6397then
6398
6399$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6400
6401fi
6402
6403# Check for --with-assertions.
6404# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006405assertions='false'
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6407$as_echo_n "checking for --with-assertions... " >&6; }
6408
6409# Check whether --with-assertions was given.
6410if test "${with_assertions+set}" = set; then :
6411 withval=$with_assertions;
6412if test "$withval" != no
6413then
6414 assertions='true'
6415fi
6416fi
6417
6418if test "$assertions" = 'true'; then
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6420$as_echo "yes" >&6; }
6421elif test "$Py_DEBUG" = 'true'; then
6422 assertions='true'
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6424$as_echo "implied by --with-pydebug" >&6; }
6425else
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6427$as_echo "no" >&6; }
6428fi
6429
Brett Cannon63d98bc2016-09-06 17:12:40 -07006430# Enable optimization flags
6431
6432
6433Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6435$as_echo_n "checking for --enable-optimizations... " >&6; }
6436# Check whether --enable-optimizations was given.
6437if test "${enable_optimizations+set}" = set; then :
6438 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006439if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006440then
6441 Py_OPT='true'
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6443$as_echo "yes" >&6; };
6444else
6445 Py_OPT='false'
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6447$as_echo "no" >&6; };
6448fi
6449else
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006455 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6456 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006457 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006458 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006459 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006460 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006461 DEF_MAKE_RULE="build_all"
6462else
6463 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006464 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006465 DEF_MAKE_RULE="all"
6466fi
6467
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006468
6469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6470$as_echo_n "checking PROFILE_TASK... " >&6; }
6471if test -z "$PROFILE_TASK"
6472then
6473 PROFILE_TASK='-m test --pgo'
6474fi
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6476$as_echo "$PROFILE_TASK" >&6; }
6477
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006478# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6479# normal names in the default $PATH (ie: Ubuntu). They exist under the
6480# non-suffixed name in their versioned llvm directory.
6481
6482llvm_bin_dir=''
6483llvm_path="${PATH}"
6484if test "${CC}" = "clang"
6485then
6486 clang_bin=`which clang`
6487 # Some systems install clang elsewhere as a symlink to the real path
6488 # which is where the related llvm tools are located.
6489 if test -L "${clang_bin}"
6490 then
6491 clang_dir=`dirname "${clang_bin}"`
6492 clang_bin=`readlink "${clang_bin}"`
6493 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6494 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6495 fi
6496fi
6497
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006498# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6500$as_echo_n "checking for --with-lto... " >&6; }
6501
6502# Check whether --with-lto was given.
6503if test "${with_lto+set}" = set; then :
6504 withval=$with_lto;
6505if test "$withval" != no
6506then
6507 Py_LTO='true'
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6509$as_echo "yes" >&6; };
6510else
6511 Py_LTO='false'
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6513$as_echo "no" >&6; };
6514fi
6515else
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6517$as_echo "no" >&6; }
6518fi
6519
6520if test "$Py_LTO" = 'true' ; then
6521 case $CC in
6522 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006523
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006524 if test -n "$ac_tool_prefix"; then
6525 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6526set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6528$as_echo_n "checking for $ac_word... " >&6; }
6529if ${ac_cv_path_LLVM_AR+:} false; then :
6530 $as_echo_n "(cached) " >&6
6531else
6532 case $LLVM_AR in
6533 [\\/]* | ?:[\\/]*)
6534 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6535 ;;
6536 *)
6537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6538for as_dir in ${llvm_path}
6539do
6540 IFS=$as_save_IFS
6541 test -z "$as_dir" && as_dir=.
6542 for ac_exec_ext in '' $ac_executable_extensions; do
6543 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6544 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6546 break 2
6547 fi
6548done
6549 done
6550IFS=$as_save_IFS
6551
6552 ;;
6553esac
6554fi
6555LLVM_AR=$ac_cv_path_LLVM_AR
6556if test -n "$LLVM_AR"; then
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6558$as_echo "$LLVM_AR" >&6; }
6559else
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6561$as_echo "no" >&6; }
6562fi
6563
6564
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006565fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006566if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006567 ac_pt_LLVM_AR=$LLVM_AR
6568 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006569set dummy llvm-ar; ac_word=$2
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571$as_echo_n "checking for $ac_word... " >&6; }
6572if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6573 $as_echo_n "(cached) " >&6
6574else
6575 case $ac_pt_LLVM_AR in
6576 [\\/]* | ?:[\\/]*)
6577 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6578 ;;
6579 *)
6580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6581for as_dir in ${llvm_path}
6582do
6583 IFS=$as_save_IFS
6584 test -z "$as_dir" && as_dir=.
6585 for ac_exec_ext in '' $ac_executable_extensions; do
6586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6587 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6589 break 2
6590 fi
6591done
6592 done
6593IFS=$as_save_IFS
6594
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006595 ;;
6596esac
6597fi
6598ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6599if test -n "$ac_pt_LLVM_AR"; then
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6601$as_echo "$ac_pt_LLVM_AR" >&6; }
6602else
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006607 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006608 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006609 else
6610 case $cross_compiling:$ac_tool_warned in
6611yes:)
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6613$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6614ac_tool_warned=yes ;;
6615esac
6616 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006617 fi
6618else
6619 LLVM_AR="$ac_cv_path_LLVM_AR"
6620fi
6621
6622
6623 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6624 then
6625 LLVM_AR_FOUND="found"
6626 else
6627 LLVM_AR_FOUND="not-found"
6628 fi
6629 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6630 then
6631 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6632 if test -n "${found_llvm_ar}"
6633 then
6634 LLVM_AR='/usr/bin/xcrun llvm-ar'
6635 LLVM_AR_FOUND=found
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6637$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6638 fi
6639 fi
6640 if test $LLVM_AR_FOUND = not-found
6641 then
6642 LLVM_PROFR_ERR=yes
6643 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6644 else
6645 LLVM_AR_ERR=no
6646 fi
6647 AR="${LLVM_AR}"
6648 case $ac_sys_system in
6649 Darwin*)
6650 # Any changes made here should be reflected in the GCC+Darwin case below
6651 LTOFLAGS="-flto -Wl,-export_dynamic"
6652 ;;
6653 *)
6654 LTOFLAGS="-flto"
6655 ;;
6656 esac
6657 ;;
6658 *gcc*)
6659 case $ac_sys_system in
6660 Darwin*)
6661 LTOFLAGS="-flto -Wl,-export_dynamic"
6662 ;;
6663 *)
6664 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6665 ;;
6666 esac
6667 ;;
6668 esac
6669
6670 if test "$ac_cv_prog_cc_g" = "yes"
6671 then
6672 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6673 # to get debug symbols.
6674 LTOFLAGS="$LTOFLAGS -g"
6675 fi
6676
stratakisf92c7aa2018-12-04 15:54:01 +01006677 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006678 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006679fi
6680
6681# Enable PGO flags.
6682
6683
6684
6685
6686
6687
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006688if test -n "$ac_tool_prefix"; then
6689 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6690set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6692$as_echo_n "checking for $ac_word... " >&6; }
6693if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6694 $as_echo_n "(cached) " >&6
6695else
6696 case $LLVM_PROFDATA in
6697 [\\/]* | ?:[\\/]*)
6698 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6699 ;;
6700 *)
6701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6702for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006703do
6704 IFS=$as_save_IFS
6705 test -z "$as_dir" && as_dir=.
6706 for ac_exec_ext in '' $ac_executable_extensions; do
6707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006708 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6710 break 2
6711 fi
6712done
6713 done
6714IFS=$as_save_IFS
6715
Gregory P. Smith799520c2016-09-07 16:10:00 -07006716 ;;
6717esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006718fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006719LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6720if test -n "$LLVM_PROFDATA"; then
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6722$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006723else
6724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6725$as_echo "no" >&6; }
6726fi
6727
6728
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006729fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006730if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006731 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6732 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006733set dummy llvm-profdata; ac_word=$2
6734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6735$as_echo_n "checking for $ac_word... " >&6; }
6736if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6737 $as_echo_n "(cached) " >&6
6738else
6739 case $ac_pt_LLVM_PROFDATA in
6740 [\\/]* | ?:[\\/]*)
6741 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6742 ;;
6743 *)
6744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6745for as_dir in ${llvm_path}
6746do
6747 IFS=$as_save_IFS
6748 test -z "$as_dir" && as_dir=.
6749 for ac_exec_ext in '' $ac_executable_extensions; do
6750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6751 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6753 break 2
6754 fi
6755done
6756 done
6757IFS=$as_save_IFS
6758
Gregory P. Smith799520c2016-09-07 16:10:00 -07006759 ;;
6760esac
6761fi
6762ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6763if test -n "$ac_pt_LLVM_PROFDATA"; then
6764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6765$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6766else
6767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6768$as_echo "no" >&6; }
6769fi
6770
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006771 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006772 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006773 else
6774 case $cross_compiling:$ac_tool_warned in
6775yes:)
6776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6778ac_tool_warned=yes ;;
6779esac
6780 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006781 fi
6782else
6783 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6784fi
6785
6786
6787if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6788then
6789 LLVM_PROF_FOUND="found"
6790else
6791 LLVM_PROF_FOUND="not-found"
6792fi
6793if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6794then
6795 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6796 if test -n "${found_llvm_profdata}"
6797 then
6798 # llvm-profdata isn't directly in $PATH in some cases.
6799 # https://apple.stackexchange.com/questions/197053/
6800 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6801 LLVM_PROF_FOUND=found
6802 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6803$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6804 fi
6805fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006806LLVM_PROF_ERR=no
6807case $CC in
6808 *clang*)
6809 # Any changes made here should be reflected in the GCC+Darwin case below
6810 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6811 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006812 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006813 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6814 if test $LLVM_PROF_FOUND = not-found
6815 then
6816 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006817 if test "${REQUIRE_PGO}" = "yes"
6818 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006819 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006820 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006821 fi
6822 ;;
6823 *gcc*)
6824 case $ac_sys_system in
6825 Darwin*)
6826 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6827 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006828 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006829 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006830 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006831 then
6832 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006833 if test "${REQUIRE_PGO}" = "yes"
6834 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006835 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006836 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006837 fi
6838 ;;
6839 *)
6840 PGO_PROF_GEN_FLAG="-fprofile-generate"
6841 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6842 LLVM_PROF_MERGER="true"
6843 LLVM_PROF_FILE=""
6844 ;;
6845 esac
6846 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006847 *icc*)
6848 PGO_PROF_GEN_FLAG="-prof-gen"
6849 PGO_PROF_USE_FLAG="-prof-use"
6850 LLVM_PROF_MERGER="true"
6851 LLVM_PROF_FILE=""
6852 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006853esac
6854
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6856# merged with this chunk of code?
6857
6858# Optimizer/debugger flags
6859# ------------------------
6860# (The following bit of code is complicated enough - please keep things
6861# indented properly. Just pretend you're editing Python code. ;-)
6862
6863# There are two parallel sets of case statements below, one that checks to
6864# see if OPT was set and one that does BASECFLAGS setting based upon
6865# compiler and platform. BASECFLAGS tweaks need to be made even if the
6866# user set OPT.
6867
Victor Stinner23a683a2019-04-12 21:27:37 +02006868case $CC in
6869 *clang*)
6870 cc_is_clang=1
6871 ;;
6872 *)
6873 if $CC --version 2>&1 | grep -q clang
6874 then
6875 cc_is_clang=1
6876 else
6877 cc_is_clang=
6878 fi
6879esac
6880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006881# tweak OPT based on compiler and platform, only if the user didn't set
6882# it on the command line
6883
Victor Stinner9ed34a82017-05-02 22:35:58 +02006884
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006885if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006886then
6887 case $GCC in
6888 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6890 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6891 WRAP="-fwrapv"
6892 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006893
Victor Stinner35f3d242017-04-21 12:35:24 +02006894 if test -n "${cc_is_clang}"
6895 then
6896 # Clang also needs -fwrapv
6897 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006898 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6899 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006900 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006901 fi
6902
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903 case $ac_cv_prog_cc_g in
6904 yes)
6905 if test "$Py_DEBUG" = 'true' ; then
6906 # Optimization messes up debuggers, so turn it off for
6907 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006908 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006909 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006910 else
Victor Stinner28205b22017-04-21 11:24:34 +02006911 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006912 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006913 else
Victor Stinner28205b22017-04-21 11:24:34 +02006914 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915 fi
6916 ;;
6917 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006918 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919 ;;
6920 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922 case $ac_sys_system in
6923 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6924 ;;
6925 esac
6926 ;;
6927
6928 *)
6929 OPT="-O"
6930 ;;
6931 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932fi
6933
6934
6935
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006936
stratakiscf10a752018-12-19 18:19:01 +01006937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938# The -arch flags for universal builds on OSX
6939UNIVERSAL_ARCH_FLAGS=
6940
6941
6942# tweak BASECFLAGS based on compiler and platform
6943case $GCC in
6944yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006945 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006946
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6948$as_echo_n "checking for -Wextra... " >&6; }
6949 ac_save_cc="$CC"
6950 CC="$CC -Wextra -Werror"
6951 if ${ac_cv_extra_warnings+:} false; then :
6952 $as_echo_n "(cached) " >&6
6953else
6954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6955/* end confdefs.h. */
6956
6957
6958int
6959main ()
6960{
6961
6962 ;
6963 return 0;
6964}
6965
6966_ACEOF
6967if ac_fn_c_try_compile "$LINENO"; then :
6968
6969 ac_cv_extra_warnings=yes
6970
6971else
6972
6973 ac_cv_extra_warnings=no
6974
6975fi
6976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6977fi
6978
6979 CC="$ac_save_cc"
6980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6981$as_echo "$ac_cv_extra_warnings" >&6; }
6982
6983 if test $ac_cv_extra_warnings = yes
6984 then
6985 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6986 fi
6987
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988 # Python doesn't violate C99 aliasing rules, but older versions of
6989 # GCC produce warnings for legal Python code. Enable
6990 # -fno-strict-aliasing on versions of GCC that support but produce
6991 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6993$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994 ac_save_cc="$CC"
6995 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006996 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006997 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006998 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006999else
Matthias Kloseb9621712010-04-24 17:59:49 +00007000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007001/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007002
Matthias Kloseb159a552010-04-25 21:00:44 +00007003
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007004int
7005main ()
7006{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007007
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007008 ;
7009 return 0;
7010}
Matthias Kloseb159a552010-04-25 21:00:44 +00007011
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007013if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007014
7015 CC="$ac_save_cc -fstrict-aliasing"
7016 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007018/* end confdefs.h. */
7019
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007020 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021int
7022main ()
7023{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007024double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025 ;
7026 return 0;
7027}
Matthias Kloseb159a552010-04-25 21:00:44 +00007028
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007030if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007031
7032 ac_cv_no_strict_aliasing=no
7033
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007034else
Matthias Kloseb159a552010-04-25 21:00:44 +00007035
7036 ac_cv_no_strict_aliasing=yes
7037
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007038fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007040
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007041else
Matthias Kloseb159a552010-04-25 21:00:44 +00007042
7043 ac_cv_no_strict_aliasing=no
7044
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007045fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007047fi
7048
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007049 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007050 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7052$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007053 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007054 then
7055 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7056 fi
7057
Zachary Ware5af85642015-12-21 12:09:17 -06007058 # ICC doesn't recognize the option, but only emits a warning
7059 ## XXX does it emit an unused result warning and can it be disabled?
7060 case "$CC" in
7061 *icc*)
7062 ac_cv_disable_unused_result_warning=no
7063 ;;
7064 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7066$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7067 ac_save_cc="$CC"
7068 CC="$CC -Wunused-result -Werror"
7069 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007070 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007071 $as_echo_n "(cached) " >&6
7072else
7073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7074/* end confdefs.h. */
7075
7076
7077int
7078main ()
7079{
7080
7081 ;
7082 return 0;
7083}
7084
7085_ACEOF
7086if ac_fn_c_try_compile "$LINENO"; then :
7087
7088 ac_cv_disable_unused_result_warning=yes
7089
7090else
7091
7092 ac_cv_disable_unused_result_warning=no
7093
7094fi
7095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7096fi
7097
7098 CFLAGS="$save_CFLAGS"
7099 CC="$ac_save_cc"
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7101$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007102 ;;
7103 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007104
7105 if test $ac_cv_disable_unused_result_warning = yes
7106 then
7107 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007108 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7109 fi
7110
7111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7112$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7113 ac_save_cc="$CC"
7114 CC="$CC -Wunused-parameter -Werror"
7115 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7116 $as_echo_n "(cached) " >&6
7117else
7118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7119/* end confdefs.h. */
7120
7121
7122int
7123main ()
7124{
7125
7126 ;
7127 return 0;
7128}
7129
7130_ACEOF
7131if ac_fn_c_try_compile "$LINENO"; then :
7132
7133 ac_cv_disable_unused_parameter_warning=yes
7134
7135else
7136
7137 ac_cv_disable_unused_parameter_warning=no
7138
7139fi
7140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7141fi
7142
7143 CC="$ac_save_cc"
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7145$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7146
7147 if test $ac_cv_disable_unused_parameter_warning = yes
7148 then
7149 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7150 fi
7151
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7153$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7154 ac_save_cc="$CC"
7155 CC="$CC -Wmissing-field-initializers -Werror"
7156 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7157 $as_echo_n "(cached) " >&6
7158else
7159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7160/* end confdefs.h. */
7161
7162
7163int
7164main ()
7165{
7166
7167 ;
7168 return 0;
7169}
7170
7171_ACEOF
7172if ac_fn_c_try_compile "$LINENO"; then :
7173
7174 ac_cv_disable_missing_field_initializers=yes
7175
7176else
7177
7178 ac_cv_disable_missing_field_initializers=no
7179
7180fi
7181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7182fi
7183
7184 CC="$ac_save_cc"
7185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7186$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7187
7188 if test $ac_cv_disable_missing_field_initializers = yes
7189 then
7190 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007191 fi
7192
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7194$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7195 ac_save_cc="$CC"
7196 CC="$CC -Wsign-compare"
7197 save_CFLAGS="$CFLAGS"
7198 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7199 $as_echo_n "(cached) " >&6
7200else
7201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7202/* end confdefs.h. */
7203
7204
7205int
7206main ()
7207{
7208
7209 ;
7210 return 0;
7211}
7212
7213_ACEOF
7214if ac_fn_c_try_compile "$LINENO"; then :
7215
7216 ac_cv_enable_sign_compare_warning=yes
7217
7218else
7219
7220 ac_cv_enable_sign_compare_warning=no
7221
7222fi
7223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7224fi
7225
7226 CFLAGS="$save_CFLAGS"
7227 CC="$ac_save_cc"
7228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7229$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7230
7231 if test $ac_cv_enable_sign_compare_warning = yes
7232 then
7233 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7234 fi
7235
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7237$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7238 ac_save_cc="$CC"
7239 CC="$CC -Wunreachable-code"
7240 save_CFLAGS="$CFLAGS"
7241 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7242 $as_echo_n "(cached) " >&6
7243else
7244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245/* end confdefs.h. */
7246
7247
7248int
7249main ()
7250{
7251
7252 ;
7253 return 0;
7254}
7255
7256_ACEOF
7257if ac_fn_c_try_compile "$LINENO"; then :
7258
7259 ac_cv_enable_unreachable_code_warning=yes
7260
7261else
7262
7263 ac_cv_enable_unreachable_code_warning=no
7264
7265fi
7266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7267fi
7268
7269 CFLAGS="$save_CFLAGS"
7270 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007271
7272 # Don't enable unreachable code warning in debug mode, since it usually
7273 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007274 # Issue #24324: Unfortunately, the unreachable code warning does not work
7275 # correctly on gcc and has been silently removed from the compiler.
7276 # It is supported on clang but on OS X systems gcc may be an alias
7277 # for clang. Try to determine if the compiler is not really gcc and,
7278 # if so, only then enable the warning.
7279 if test $ac_cv_enable_unreachable_code_warning = yes && \
7280 test "$Py_DEBUG" != "true" && \
7281 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007282 then
7283 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007284 else
7285 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007286 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7288$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007289
INADA Naokie3364842018-06-05 20:40:53 +09007290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7291$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7292 ac_save_cc="$CC"
7293 CC="$CC -Werror -Wstrict-prototypes"
7294 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7295 $as_echo_n "(cached) " >&6
7296else
7297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7298/* end confdefs.h. */
7299
7300
7301int
7302main ()
7303{
7304
7305 ;
7306 return 0;
7307}
7308
7309_ACEOF
7310if ac_fn_c_try_compile "$LINENO"; then :
7311
7312 ac_cv_enable_strict_prototypes_warning=yes
7313
7314else
7315
7316 ac_cv_enable_strict_prototypes_warning=no
7317
7318fi
7319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7320fi
7321
7322 CC="$ac_save_cc"
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7324$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7325
7326 if test $ac_cv_enable_strict_prototypes_warning = yes
7327 then
7328 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7329 fi
7330
Victor Stinner193ee0a2017-02-06 14:24:00 +01007331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7332$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7333 ac_save_cc="$CC"
7334 CC="$CC -Werror=implicit-function-declaration"
7335 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7336 $as_echo_n "(cached) " >&6
7337else
7338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7339/* end confdefs.h. */
7340
7341
7342int
7343main ()
7344{
7345
7346 ;
7347 return 0;
7348}
7349
7350_ACEOF
7351if ac_fn_c_try_compile "$LINENO"; then :
7352
7353 ac_cv_enable_implicit_function_declaration_error=yes
7354
7355else
7356
7357 ac_cv_enable_implicit_function_declaration_error=no
7358
7359fi
7360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7361fi
7362
7363 CC="$ac_save_cc"
7364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7365$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7366
7367 if test $ac_cv_enable_implicit_function_declaration_error = yes
7368 then
7369 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7370 fi
7371
Vinay Sajip0b60f642019-10-15 08:26:12 +01007372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7373$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7374 ac_save_cc="$CC"
7375 CC="$CC -fvisibility=hidden"
7376 if ${ac_cv_enable_visibility+:} false; then :
7377 $as_echo_n "(cached) " >&6
7378else
7379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7380/* end confdefs.h. */
7381
7382
7383int
7384main ()
7385{
7386
7387 ;
7388 return 0;
7389}
7390
7391_ACEOF
7392if ac_fn_c_try_compile "$LINENO"; then :
7393
7394 ac_cv_enable_visibility=yes
7395
7396else
7397
7398 ac_cv_enable_visibility=no
7399
7400fi
7401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7402fi
7403
7404 CC="$ac_save_cc"
7405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7406$as_echo "$ac_cv_enable_visibility" >&6; }
7407
7408 if test $ac_cv_enable_visibility = yes
7409 then
7410 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7411 fi
7412
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7414 # support. Without this, treatment of subnormals doesn't follow
7415 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007416 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417 alpha*)
7418 BASECFLAGS="$BASECFLAGS -mieee"
7419 ;;
7420 esac
7421
7422 case $ac_sys_system in
7423 SCO_SV*)
7424 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7425 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007426
Ned Deily87adb6e2013-10-18 21:09:56 -07007427 Darwin*)
7428 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7429 # used to be here, but non-Apple gcc doesn't accept them.
7430 if test "${CC}" = gcc
7431 then
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007433$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007434 case "${UNIVERSALSDK}" in
7435 */MacOSX10.4u.sdk)
7436 # Build using 10.4 SDK, force usage of gcc when the
7437 # compiler is gcc, otherwise the user will get very
7438 # confusing error messages when building on OSX 10.6
7439 CC=gcc-4.0
7440 CPP=cpp-4.0
7441 ;;
7442 esac
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007444$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007445 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446
Ned Deily87adb6e2013-10-18 21:09:56 -07007447 if test "${enable_universalsdk}"
7448 then
7449 case "$UNIVERSAL_ARCHS" in
7450 32-bit)
7451 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7452 LIPO_32BIT_FLAGS=""
7453 ARCH_RUN_32BIT=""
7454 ;;
7455 64-bit)
7456 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7457 LIPO_32BIT_FLAGS=""
7458 ARCH_RUN_32BIT="true"
7459 ;;
7460 all)
7461 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7462 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7463 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7464 ;;
7465 intel)
7466 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7467 LIPO_32BIT_FLAGS="-extract i386"
7468 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7469 ;;
7470 intel-32)
7471 UNIVERSAL_ARCH_FLAGS="-arch i386"
7472 LIPO_32BIT_FLAGS=""
7473 ARCH_RUN_32BIT=""
7474 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007475 intel-64)
7476 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7477 LIPO_32BIT_FLAGS=""
7478 ARCH_RUN_32BIT="true"
7479 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007480 3-way)
7481 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7482 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7483 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7484 ;;
7485 *)
7486 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7487 ;;
7488 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489
Ned Deily87adb6e2013-10-18 21:09:56 -07007490 if test "${UNIVERSALSDK}" != "/"
7491 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007492 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7493 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007494 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007495 else
7496 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7497 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007498 fi
7499 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500
Ned Deily87adb6e2013-10-18 21:09:56 -07007501 # Calculate an appropriate deployment target for this build:
7502 # The deployment target value is used explicitly to enable certain
7503 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007504 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007505 # component of the string returned by distutils.get_platform().
7506 #
7507 # Use the value from:
7508 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7509 # 2. the operating system version of the build machine if >= 10.6
7510 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7511 # below to pick either 10.3, 10.4, or 10.5 as the target.
7512 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007513
Ned Deily87adb6e2013-10-18 21:09:56 -07007514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7515$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007516 cur_target_major=`sw_vers -productVersion | \
7517 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7518 cur_target_minor=`sw_vers -productVersion | \
7519 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7520 cur_target="${cur_target_major}.${cur_target_minor}"
7521 if test ${cur_target_major} -eq 10 && \
7522 test ${cur_target_minor} -ge 3 && \
7523 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007524 then
Ned Deily36820b62014-06-25 13:44:22 -07007525 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007526 cur_target=10.3
7527 if test ${enable_universalsdk}
7528 then
7529 case "$UNIVERSAL_ARCHS" in
7530 all|3-way|intel|64-bit)
7531 # These configurations were first supported in 10.5
7532 cur_target='10.5'
7533 ;;
7534 esac
7535 else
7536 if test `/usr/bin/arch` = "i386"
7537 then
7538 # 10.4 was the first release to support Intel archs
7539 cur_target="10.4"
7540 fi
7541 fi
7542 fi
7543 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007544
Ned Deily87adb6e2013-10-18 21:09:56 -07007545 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7546 # environment with a value that is the same as what we'll use
7547 # in the Makefile to ensure that we'll get the same compiler
7548 # environment during configure and build time.
7549 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7550 export MACOSX_DEPLOYMENT_TARGET
7551 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7553$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007554
Ned Deily87adb6e2013-10-18 21:09:56 -07007555 # end of Darwin* tests
7556 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557 esac
7558 ;;
7559
7560*)
7561 case $ac_sys_system in
7562 OpenUNIX*|UnixWare*)
7563 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7564 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565 SCO_SV*)
7566 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7567 ;;
7568 esac
7569 ;;
7570esac
7571
Zachary Ware5af85642015-12-21 12:09:17 -06007572# ICC needs -fp-model strict or floats behave badly
7573case "$CC" in
7574*icc*)
7575 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7576 ;;
7577esac
7578
T. Woutersddbfa2c2017-05-23 01:30:49 +02007579if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580 :
7581else
7582 OPT="-DNDEBUG $OPT"
7583fi
7584
7585if test "$ac_arch_flags"
7586then
7587 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7588fi
7589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590# On some compilers, pthreads are available without further options
7591# (e.g. MacOS X). On some of these systems, the compiler will not
7592# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7593# So we have to see first whether pthreads are available without
7594# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7596$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007597if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599else
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601 ac_cv_pthread_is_default=no
7602else
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604/* end confdefs.h. */
7605
Stefan Krah7dba5942012-11-22 22:49:11 +01007606#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607#include <pthread.h>
7608
7609void* routine(void* p){return NULL;}
7610
7611int main(){
7612 pthread_t p;
7613 if(pthread_create(&p,NULL,routine,NULL)!=0)
7614 return 1;
7615 (void)pthread_detach(p);
7616 return 0;
7617}
7618
7619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007620if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621
7622 ac_cv_pthread_is_default=yes
7623 ac_cv_kthread=no
7624 ac_cv_pthread=no
7625
7626else
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7630 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631fi
7632
7633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634fi
7635
Matthias Kloseb9621712010-04-24 17:59:49 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7637$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638
7639
7640if test $ac_cv_pthread_is_default = yes
7641then
7642 ac_cv_kpthread=no
7643else
7644# -Kpthread, if available, provides the right #defines
7645# and linker options to make pthread_create available
7646# Some compilers won't report that they do not support -Kpthread,
7647# so we need to run a program to see whether it really made the
7648# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7650$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007651if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653else
7654 ac_save_cc="$CC"
7655CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007656if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657 ac_cv_kpthread=no
7658else
Matthias Kloseb9621712010-04-24 17:59:49 +00007659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660/* end confdefs.h. */
7661
Stefan Krah7dba5942012-11-22 22:49:11 +01007662#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663#include <pthread.h>
7664
7665void* routine(void* p){return NULL;}
7666
7667int main(){
7668 pthread_t p;
7669 if(pthread_create(&p,NULL,routine,NULL)!=0)
7670 return 1;
7671 (void)pthread_detach(p);
7672 return 0;
7673}
7674
7675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007676if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007677 ac_cv_kpthread=yes
7678else
Matthias Kloseb9621712010-04-24 17:59:49 +00007679 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7682 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683fi
7684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685CC="$ac_save_cc"
7686fi
7687
Matthias Kloseb9621712010-04-24 17:59:49 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7689$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690fi
7691
7692if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7693then
7694# -Kthread, if available, provides the right #defines
7695# and linker options to make pthread_create available
7696# Some compilers won't report that they do not support -Kthread,
7697# so we need to run a program to see whether it really made the
7698# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7700$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007701if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007702 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703else
7704 ac_save_cc="$CC"
7705CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007706if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707 ac_cv_kthread=no
7708else
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710/* end confdefs.h. */
7711
Stefan Krah7dba5942012-11-22 22:49:11 +01007712#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713#include <pthread.h>
7714
7715void* routine(void* p){return NULL;}
7716
7717int main(){
7718 pthread_t p;
7719 if(pthread_create(&p,NULL,routine,NULL)!=0)
7720 return 1;
7721 (void)pthread_detach(p);
7722 return 0;
7723}
7724
7725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007726if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727 ac_cv_kthread=yes
7728else
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733fi
7734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735CC="$ac_save_cc"
7736fi
7737
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7739$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007740fi
7741
7742if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7743then
7744# -pthread, if available, provides the right #defines
7745# and linker options to make pthread_create available
7746# Some compilers won't report that they do not support -pthread,
7747# so we need to run a program to see whether it really made the
7748# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7750$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007751if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007753else
7754 ac_save_cc="$CC"
7755CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007756if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757 ac_cv_pthread=no
7758else
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007760/* end confdefs.h. */
7761
Stefan Krah7dba5942012-11-22 22:49:11 +01007762#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763#include <pthread.h>
7764
7765void* routine(void* p){return NULL;}
7766
7767int main(){
7768 pthread_t p;
7769 if(pthread_create(&p,NULL,routine,NULL)!=0)
7770 return 1;
7771 (void)pthread_detach(p);
7772 return 0;
7773}
7774
7775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007776if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007777 ac_cv_pthread=yes
7778else
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783fi
7784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007785CC="$ac_save_cc"
7786fi
7787
Matthias Kloseb9621712010-04-24 17:59:49 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7789$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790fi
7791
7792# If we have set a CC compiler flag for thread support then
7793# check if it works for CXX, too.
7794ac_cv_cxx_thread=no
7795if test ! -z "$CXX"
7796then
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7798$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799ac_save_cxx="$CXX"
7800
7801if test "$ac_cv_kpthread" = "yes"
7802then
7803 CXX="$CXX -Kpthread"
7804 ac_cv_cxx_thread=yes
7805elif test "$ac_cv_kthread" = "yes"
7806then
7807 CXX="$CXX -Kthread"
7808 ac_cv_cxx_thread=yes
7809elif test "$ac_cv_pthread" = "yes"
7810then
7811 CXX="$CXX -pthread"
7812 ac_cv_cxx_thread=yes
7813fi
7814
7815if test $ac_cv_cxx_thread = yes
7816then
7817 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7818 $CXX -c conftest.$ac_ext 2>&5
7819 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7820 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7821 then
7822 ac_cv_cxx_thread=yes
7823 else
7824 ac_cv_cxx_thread=no
7825 fi
7826 rm -fr conftest*
7827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7829$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007830fi
7831CXX="$ac_save_cxx"
7832
7833
7834# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7836$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007837if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007839else
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007841/* end confdefs.h. */
7842#include <stdlib.h>
7843#include <stdarg.h>
7844#include <string.h>
7845#include <float.h>
7846
7847int
7848main ()
7849{
7850
7851 ;
7852 return 0;
7853}
7854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007855if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007856 ac_cv_header_stdc=yes
7857else
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007859fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7861
7862if test $ac_cv_header_stdc = yes; then
7863 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007865/* end confdefs.h. */
7866#include <string.h>
7867
7868_ACEOF
7869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 $EGREP "memchr" >/dev/null 2>&1; then :
7871
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007872else
7873 ac_cv_header_stdc=no
7874fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007875rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007876
7877fi
7878
7879if test $ac_cv_header_stdc = yes; then
7880 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007882/* end confdefs.h. */
7883#include <stdlib.h>
7884
7885_ACEOF
7886if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 $EGREP "free" >/dev/null 2>&1; then :
7888
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007889else
7890 ac_cv_header_stdc=no
7891fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007892rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893
7894fi
7895
7896if test $ac_cv_header_stdc = yes; then
7897 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007899 :
7900else
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007902/* end confdefs.h. */
7903#include <ctype.h>
7904#include <stdlib.h>
7905#if ((' ' & 0x0FF) == 0x020)
7906# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7907# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7908#else
7909# define ISLOWER(c) \
7910 (('a' <= (c) && (c) <= 'i') \
7911 || ('j' <= (c) && (c) <= 'r') \
7912 || ('s' <= (c) && (c) <= 'z'))
7913# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7914#endif
7915
7916#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7917int
7918main ()
7919{
7920 int i;
7921 for (i = 0; i < 256; i++)
7922 if (XOR (islower (i), ISLOWER (i))
7923 || toupper (i) != TOUPPER (i))
7924 return 2;
7925 return 0;
7926}
7927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007928if ac_fn_c_try_run "$LINENO"; then :
7929
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007930else
Matthias Kloseb9621712010-04-24 17:59:49 +00007931 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007935fi
7936
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007937fi
7938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7940$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007941if test $ac_cv_header_stdc = yes; then
7942
Matthias Kloseb9621712010-04-24 17:59:49 +00007943$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007944
7945fi
7946
stratakise768c862018-01-23 16:11:24 +01007947for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007948fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007949ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007950sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007951utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007952poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007953sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007954sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007955sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007956sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007957sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007958libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007959linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007960sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007961do :
7962 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7963ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007964if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007966#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007967_ACEOF
7968
7969fi
7970
Guido van Rossum627b2d71993-12-24 10:39:16 +00007971done
7972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007973ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007974for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7977$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007978if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007980else
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007982/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007983#include <sys/types.h>
7984#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007985
Martin v. Löwis11437992002-04-12 09:54:03 +00007986int
7987main ()
7988{
7989if ((DIR *) 0)
7990return 0;
7991 ;
7992 return 0;
7993}
7994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007995if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007996 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007997else
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002eval ac_res=\$$as_ac_Header
8003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8004$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008005if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008007#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008008_ACEOF
8009
8010ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008011fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008012
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008013done
8014# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8015if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8017$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008018if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008020else
Martin v. Löwis11437992002-04-12 09:54:03 +00008021 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025/* Override any GCC internal prototype to avoid an error.
8026 Use char because int might match the return type of a GCC
8027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008028#ifdef __cplusplus
8029extern "C"
8030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008031char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008032int
8033main ()
8034{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008036 ;
8037 return 0;
8038}
8039_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040for ac_lib in '' dir; do
8041 if test -z "$ac_lib"; then
8042 ac_res="none required"
8043 else
8044 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008045 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008050rm -f core conftest.err conftest.$ac_objext \
8051 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008052 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008053 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055done
Victor Stinnere0be4232011-10-25 13:06:09 +02008056if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058else
8059 ac_cv_search_opendir=no
8060fi
8061rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008062LIBS=$ac_func_search_save_LIBS
8063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8065$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008067if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008070fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008071
Michael W. Hudson54241132001-12-07 15:38:26 +00008072else
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8074$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008075if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008077else
8078 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082/* Override any GCC internal prototype to avoid an error.
8083 Use char because int might match the return type of a GCC
8084 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008085#ifdef __cplusplus
8086extern "C"
8087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008088char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008089int
8090main ()
8091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008093 ;
8094 return 0;
8095}
8096_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097for ac_lib in '' x; do
8098 if test -z "$ac_lib"; then
8099 ac_res="none required"
8100 else
8101 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008102 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008107rm -f core conftest.err conftest.$ac_objext \
8108 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008109 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112done
Victor Stinnere0be4232011-10-25 13:06:09 +02008113if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115else
8116 ac_cv_search_opendir=no
8117fi
8118rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008119LIBS=$ac_func_search_save_LIBS
8120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8122$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008124if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008125 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008127fi
8128
8129fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008130
Matthias Kloseb9621712010-04-24 17:59:49 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8132$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008133if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008135else
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008137/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008138#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008139int
8140main ()
8141{
8142return makedev(0, 0);
8143 ;
8144 return 0;
8145}
8146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008148 ac_cv_header_sys_types_h_makedev=yes
8149else
Matthias Kloseb9621712010-04-24 17:59:49 +00008150 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008152rm -f core conftest.err conftest.$ac_objext \
8153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008154
8155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8157$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008158
8159if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008160ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008161if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008162
Matthias Kloseb9621712010-04-24 17:59:49 +00008163$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008164
8165fi
8166
8167
8168
8169 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008171if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008172
Matthias Kloseb9621712010-04-24 17:59:49 +00008173$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008174
8175fi
8176
8177
8178 fi
8179fi
8180
Michael W. Hudson54241132001-12-07 15:38:26 +00008181
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008182# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8183# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8184SAVE_CFLAGS=$CFLAGS
8185CFLAGS="-std=c99 $CFLAGS"
8186for ac_header in bluetooth/bluetooth.h
8187do :
8188 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8189if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8190 cat >>confdefs.h <<_ACEOF
8191#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8192_ACEOF
8193
8194fi
8195
8196done
8197
8198CFLAGS=$SAVE_CFLAGS
8199
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008200# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8201for ac_header in net/if.h
8202do :
8203 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8204#ifdef STDC_HEADERS
8205# include <stdlib.h>
8206# include <stddef.h>
8207#else
8208# ifdef HAVE_STDLIB_H
8209# include <stdlib.h>
8210# endif
8211#endif
8212#ifdef HAVE_SYS_SOCKET_H
8213# include <sys/socket.h>
8214#endif
8215
8216"
Victor Stinnere0be4232011-10-25 13:06:09 +02008217if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008218 cat >>confdefs.h <<_ACEOF
8219#define HAVE_NET_IF_H 1
8220_ACEOF
8221
8222fi
8223
8224done
8225
8226
Martin v. Löwis11017b12006-01-14 18:12:57 +00008227# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008228for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008229do :
8230 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00008231#ifdef HAVE_ASM_TYPES_H
8232#include <asm/types.h>
8233#endif
8234#ifdef HAVE_SYS_SOCKET_H
8235#include <sys/socket.h>
8236#endif
8237
Matthias Kloseb9621712010-04-24 17:59:49 +00008238"
Victor Stinnere0be4232011-10-25 13:06:09 +02008239if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008240 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008241#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008242_ACEOF
8243
8244fi
8245
8246done
8247
8248
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008249# On Linux, qrtr.h requires asm/types.h
8250for ac_header in linux/qrtr.h
8251do :
8252 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8253#ifdef HAVE_ASM_TYPES_H
8254#include <asm/types.h>
8255#endif
8256#ifdef HAVE_SYS_SOCKET_H
8257#include <sys/socket.h>
8258#endif
8259
8260"
8261if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8262 cat >>confdefs.h <<_ACEOF
8263#define HAVE_LINUX_QRTR_H 1
8264_ACEOF
8265
8266fi
8267
8268done
8269
8270
caaveryeffc12f2017-09-06 18:18:10 -04008271for ac_header in linux/vm_sockets.h
8272do :
8273 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8274#ifdef HAVE_SYS_SOCKET_H
8275#include <sys/socket.h>
8276#endif
8277
8278"
8279if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8280 cat >>confdefs.h <<_ACEOF
8281#define HAVE_LINUX_VM_SOCKETS_H 1
8282_ACEOF
8283
8284fi
8285
8286done
8287
8288
Charles-François Natali47413c12011-10-06 19:47:44 +02008289# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008290for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008291do :
8292 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8293ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8294#ifdef HAVE_SYS_SOCKET_H
8295#include <sys/socket.h>
8296#endif
8297
8298"
8299if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8300 cat >>confdefs.h <<_ACEOF
8301#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8302_ACEOF
8303
8304fi
8305
8306done
8307
8308
Guido van Rossum627b2d71993-12-24 10:39:16 +00008309# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008310was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8312$as_echo_n "checking for clock_t in time.h... " >&6; }
8313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008314/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008315#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008316
8317_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008320 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008321else
Martin v. Löwis11437992002-04-12 09:54:03 +00008322
8323
Matthias Kloseb9621712010-04-24 17:59:49 +00008324$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008325
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008326
Guido van Rossum627b2d71993-12-24 10:39:16 +00008327fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008328rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8331$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8334$as_echo_n "checking for makedev... " >&6; }
8335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008336/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008337
Jesus Cea740f53a2010-04-28 11:35:30 +00008338#if defined(MAJOR_IN_MKDEV)
8339#include <sys/mkdev.h>
8340#elif defined(MAJOR_IN_SYSMACROS)
8341#include <sys/sysmacros.h>
8342#else
8343#include <sys/types.h>
8344#endif
8345
Neal Norwitz11690112002-07-30 01:08:28 +00008346int
8347main ()
8348{
Jesus Cea740f53a2010-04-28 11:35:30 +00008349
8350 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008351 ;
8352 return 0;
8353}
Matthias Kloseb159a552010-04-25 21:00:44 +00008354
Neal Norwitz11690112002-07-30 01:08:28 +00008355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008356if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008357 ac_cv_has_makedev=yes
8358else
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008361rm -f core conftest.err conftest.$ac_objext \
8362 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8364$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008365if test "$ac_cv_has_makedev" = "yes"; then
8366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008368
8369fi
8370
Christian Heimes985ecdc2013-11-20 11:46:18 +01008371# byte swapping
8372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8373$as_echo_n "checking for le64toh... " >&6; }
8374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8375/* end confdefs.h. */
8376
8377#ifdef HAVE_ENDIAN_H
8378#include <endian.h>
8379#elif defined(HAVE_SYS_ENDIAN_H)
8380#include <sys/endian.h>
8381#endif
8382
8383int
8384main ()
8385{
8386
8387 le64toh(1)
8388 ;
8389 return 0;
8390}
8391
8392_ACEOF
8393if ac_fn_c_try_link "$LINENO"; then :
8394 ac_cv_has_le64toh=yes
8395else
8396 ac_cv_has_le64toh=no
8397fi
8398rm -f core conftest.err conftest.$ac_objext \
8399 conftest$ac_exeext conftest.$ac_ext
8400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8401$as_echo "$ac_cv_has_le64toh" >&6; }
8402if test "$ac_cv_has_le64toh" = "yes"; then
8403
8404$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8405
8406fi
8407
Martin v. Löwis399a6892002-10-04 10:22:02 +00008408use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008409# Don't use largefile support for GNU/Hurd
8410case $ac_sys_system in GNU*)
8411 use_lfs=no
8412esac
8413
Martin v. Löwis399a6892002-10-04 10:22:02 +00008414if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008415# Two defines needed to enable largefile support on various platforms
8416# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008417case $ac_sys_system/$ac_sys_release in
8418AIX*)
8419
8420$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8421
8422 ;;
8423esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008424
Matthias Kloseb9621712010-04-24 17:59:49 +00008425$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008426
8427
Matthias Kloseb9621712010-04-24 17:59:49 +00008428$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008429
Martin v. Löwis399a6892002-10-04 10:22:02 +00008430fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008431
Guido van Rossum84e7b241996-08-19 21:59:00 +00008432# Add some code to confdefs.h so that the test for off_t works on SCO
8433cat >> confdefs.h <<\EOF
8434#if defined(SCO_DS)
8435#undef _OFF_T
8436#endif
8437EOF
8438
Guido van Rossumef2255b2000-03-10 22:30:29 +00008439# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008440ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008441if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008443else
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
8445cat >>confdefs.h <<_ACEOF
8446#define mode_t int
8447_ACEOF
8448
8449fi
8450
Matthias Kloseb9621712010-04-24 17:59:49 +00008451ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008452if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008454else
Martin v. Löwis11437992002-04-12 09:54:03 +00008455
8456cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008458_ACEOF
8459
8460fi
8461
Matthias Kloseb9621712010-04-24 17:59:49 +00008462ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008464
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008465else
Martin v. Löwis11437992002-04-12 09:54:03 +00008466
8467cat >>confdefs.h <<_ACEOF
8468#define pid_t int
8469_ACEOF
8470
8471fi
8472
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008473
Martin v. Löwis11437992002-04-12 09:54:03 +00008474cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008475#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008476_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008477
Matthias Kloseb9621712010-04-24 17:59:49 +00008478ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008479if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008480
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008481else
Martin v. Löwis11437992002-04-12 09:54:03 +00008482
8483cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008485_ACEOF
8486
8487fi
8488
Matthias Kloseb9621712010-04-24 17:59:49 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8490$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008491if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008493else
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008495/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008496#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008497
8498_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008501 ac_cv_type_uid_t=yes
8502else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008503 ac_cv_type_uid_t=no
8504fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008505rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8509$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008510if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008511
Matthias Kloseb9621712010-04-24 17:59:49 +00008512$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008513
8514
Matthias Kloseb9621712010-04-24 17:59:49 +00008515$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008516
8517fi
8518
Mark Dickinson983bc162012-12-02 12:11:38 +00008519
Matthias Kloseb9621712010-04-24 17:59:49 +00008520ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008521if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522
Matthias Kloseb9621712010-04-24 17:59:49 +00008523$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008524
8525fi
8526
Stefan Krah1919b7e2012-03-21 18:25:23 +01008527ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8528if test "x$ac_cv_type___uint128_t" = xyes; then :
8529
8530$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8531
8532fi
8533
Jack Jansendd19cf82001-12-06 22:36:17 +00008534
Michael W. Hudson54241132001-12-07 15:38:26 +00008535# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008536# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537# The cast to long int works around a bug in the HP C Compiler
8538# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8539# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8540# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8542$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008543if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008545else
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
Martin v. Löwis11437992002-04-12 09:54:03 +00008548else
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 if test "$ac_cv_type_int" = yes; then
8550 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8551$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008552as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008553See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554 else
8555 ac_cv_sizeof_int=0
8556 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8561$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562
8563
8564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008566#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008567_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008568
8569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570# The cast to long int works around a bug in the HP C Compiler
8571# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8572# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8573# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8575$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008576if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008578else
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008580
Martin v. Löwis11437992002-04-12 09:54:03 +00008581else
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 if test "$ac_cv_type_long" = yes; then
8583 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008585as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008586See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008587 else
8588 ac_cv_sizeof_long=0
8589 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008591
Martin v. Löwis11437992002-04-12 09:54:03 +00008592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8594$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008595
8596
8597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008599#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008600_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008601
8602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603# The cast to long int works around a bug in the HP C Compiler
8604# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8605# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8606# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8608$as_echo_n "checking size of long long... " >&6; }
8609if ${ac_cv_sizeof_long_long+:} false; then :
8610 $as_echo_n "(cached) " >&6
8611else
8612 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8613
8614else
8615 if test "$ac_cv_type_long_long" = yes; then
8616 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8618as_fn_error 77 "cannot compute sizeof (long long)
8619See \`config.log' for more details" "$LINENO" 5; }
8620 else
8621 ac_cv_sizeof_long_long=0
8622 fi
8623fi
8624
8625fi
8626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8627$as_echo "$ac_cv_sizeof_long_long" >&6; }
8628
8629
8630
8631cat >>confdefs.h <<_ACEOF
8632#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8633_ACEOF
8634
8635
8636# The cast to long int works around a bug in the HP C Compiler
8637# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8638# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8639# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8641$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008642if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008644else
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008646
Martin v. Löwis11437992002-04-12 09:54:03 +00008647else
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 if test "$ac_cv_type_void_p" = yes; then
8649 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008651as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008652See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653 else
8654 ac_cv_sizeof_void_p=0
8655 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008657
Martin v. Löwis11437992002-04-12 09:54:03 +00008658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8660$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661
8662
8663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008665#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008666_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008667
8668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669# The cast to long int works around a bug in the HP C Compiler
8670# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8671# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8672# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8674$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008675if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008677else
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008679
Martin v. Löwis11437992002-04-12 09:54:03 +00008680else
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 if test "$ac_cv_type_short" = yes; then
8682 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008684as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008685See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686 else
8687 ac_cv_sizeof_short=0
8688 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690
Martin v. Löwis11437992002-04-12 09:54:03 +00008691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8693$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694
8695
8696
Martin v. Löwis11437992002-04-12 09:54:03 +00008697cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008698#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008699_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008700
8701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702# The cast to long int works around a bug in the HP C Compiler
8703# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8704# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8705# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8707$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008708if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008710else
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008712
Martin v. Löwis11437992002-04-12 09:54:03 +00008713else
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 if test "$ac_cv_type_float" = yes; then
8715 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8716$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008717as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008718See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719 else
8720 ac_cv_sizeof_float=0
8721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008723
Martin v. Löwis11437992002-04-12 09:54:03 +00008724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8726$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008727
8728
8729
Martin v. Löwis11437992002-04-12 09:54:03 +00008730cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008731#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008732_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008733
8734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008735# The cast to long int works around a bug in the HP C Compiler
8736# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8737# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8738# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8740$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008741if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008745
Martin v. Löwis11437992002-04-12 09:54:03 +00008746else
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 if test "$ac_cv_type_double" = yes; then
8748 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008750as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008751See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752 else
8753 ac_cv_sizeof_double=0
8754 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008756
Martin v. Löwis11437992002-04-12 09:54:03 +00008757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8759$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008760
8761
8762
Martin v. Löwis11437992002-04-12 09:54:03 +00008763cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008764#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008765_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008766
8767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008768# The cast to long int works around a bug in the HP C Compiler
8769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8771# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8773$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008774if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008776else
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008778
Martin v. Löwis11437992002-04-12 09:54:03 +00008779else
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 if test "$ac_cv_type_fpos_t" = yes; then
8781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008783as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008784See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008785 else
8786 ac_cv_sizeof_fpos_t=0
8787 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008789
Martin v. Löwis11437992002-04-12 09:54:03 +00008790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8792$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793
8794
8795
Martin v. Löwis11437992002-04-12 09:54:03 +00008796cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008797#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008798_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008799
Michael W. Hudson54241132001-12-07 15:38:26 +00008800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801# The cast to long int works around a bug in the HP C Compiler
8802# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8803# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8804# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8806$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008807if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008809else
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00008811
Martin v. Löwis18e16552006-02-15 17:27:45 +00008812else
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 if test "$ac_cv_type_size_t" = yes; then
8814 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008816as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008817See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008818 else
8819 ac_cv_sizeof_size_t=0
8820 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822
Martin v. Löwis18e16552006-02-15 17:27:45 +00008823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8825$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826
8827
8828
Martin v. Löwis18e16552006-02-15 17:27:45 +00008829cat >>confdefs.h <<_ACEOF
8830#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8831_ACEOF
8832
8833
Christian Heimes400adb02008-02-01 08:12:03 +00008834# The cast to long int works around a bug in the HP C Compiler
8835# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8836# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8837# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8839$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008840if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008841 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008842else
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00008844
Christian Heimes400adb02008-02-01 08:12:03 +00008845else
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 if test "$ac_cv_type_pid_t" = yes; then
8847 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008849as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008850See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008851 else
8852 ac_cv_sizeof_pid_t=0
8853 fi
8854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008855
Christian Heimes400adb02008-02-01 08:12:03 +00008856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8858$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008859
8860
8861
8862cat >>confdefs.h <<_ACEOF
8863#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8864_ACEOF
8865
8866
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008867# The cast to long int works around a bug in the HP C Compiler
8868# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8869# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8870# This bug is HP SR number 8606223364.
8871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8872$as_echo_n "checking size of uintptr_t... " >&6; }
8873if ${ac_cv_sizeof_uintptr_t+:} false; then :
8874 $as_echo_n "(cached) " >&6
8875else
8876 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8877
8878else
8879 if test "$ac_cv_type_uintptr_t" = yes; then
8880 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8882as_fn_error 77 "cannot compute sizeof (uintptr_t)
8883See \`config.log' for more details" "$LINENO" 5; }
8884 else
8885 ac_cv_sizeof_uintptr_t=0
8886 fi
8887fi
8888
8889fi
8890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8891$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8892
8893
8894
8895cat >>confdefs.h <<_ACEOF
8896#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8897_ACEOF
8898
8899
Michael W. Hudson54241132001-12-07 15:38:26 +00008900
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008901
Eitan Adler3055c942018-05-15 22:58:09 -07008902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8903$as_echo_n "checking for long double... " >&6; }
8904if ${ac_cv_type_long_double+:} false; then :
8905 $as_echo_n "(cached) " >&6
8906else
8907 if test "$GCC" = yes; then
8908 ac_cv_type_long_double=yes
8909 else
8910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8911/* end confdefs.h. */
8912/* The Stardent Vistra knows sizeof (long double), but does
8913 not support it. */
8914 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008915int
8916main ()
8917{
Eitan Adler3055c942018-05-15 22:58:09 -07008918static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8919 sizeof (double) <= sizeof (long double))];
8920test_array [0] = 0;
8921return test_array [0];
8922
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008923 ;
8924 return 0;
8925}
8926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008927if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008928 ac_cv_type_long_double=yes
8929else
8930 ac_cv_type_long_double=no
8931fi
8932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8933 fi
8934fi
8935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8936$as_echo "$ac_cv_type_long_double" >&6; }
8937 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008938
Matthias Kloseb9621712010-04-24 17:59:49 +00008939$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008940
Eitan Adler3055c942018-05-15 22:58:09 -07008941 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008942
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008943# The cast to long int works around a bug in the HP C Compiler
8944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8946# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8948$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008949if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008951else
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008953
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008954else
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 if test "$ac_cv_type_long_double" = yes; then
8956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008958as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008959See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008960 else
8961 ac_cv_sizeof_long_double=0
8962 fi
8963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008964
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8967$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008968
8969
8970
8971cat >>confdefs.h <<_ACEOF
8972#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8973_ACEOF
8974
8975
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977# The cast to long int works around a bug in the HP C Compiler
8978# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8979# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8980# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8982$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008983if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008985else
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008987
Thomas Woutersb2137042007-02-01 18:02:27 +00008988else
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 if test "$ac_cv_type__Bool" = yes; then
8990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008992as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008993See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008994 else
8995 ac_cv_sizeof__Bool=0
8996 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008998
Thomas Woutersb2137042007-02-01 18:02:27 +00008999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9001$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009002
9003
9004
Thomas Woutersb2137042007-02-01 18:02:27 +00009005cat >>confdefs.h <<_ACEOF
9006#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9007_ACEOF
9008
9009
Thomas Woutersb2137042007-02-01 18:02:27 +00009010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009011# The cast to long int works around a bug in the HP C Compiler
9012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9014# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9016$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009017if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009019else
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009021#ifdef HAVE_SYS_TYPES_H
9022#include <sys/types.h>
9023#endif
9024
Matthias Kloseb9621712010-04-24 17:59:49 +00009025"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009026
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009027else
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 if test "$ac_cv_type_off_t" = yes; then
9029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009031as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009032See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009033 else
9034 ac_cv_sizeof_off_t=0
9035 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009037
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9040$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009041
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009042
9043
Martin v. Löwis11437992002-04-12 09:54:03 +00009044cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009045#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009046_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009047
Michael W. Hudson54241132001-12-07 15:38:26 +00009048
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009049
Matthias Kloseb9621712010-04-24 17:59:49 +00009050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9051$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009052if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009053 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009054
Matthias Kloseb9621712010-04-24 17:59:49 +00009055$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009056
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9058$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009059else
Matthias Kloseb9621712010-04-24 17:59:49 +00009060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9061$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009062fi
9063
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009064# The cast to long int works around a bug in the HP C Compiler
9065# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9066# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9067# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9069$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009070if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009071 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009072else
Matthias Kloseb9621712010-04-24 17:59:49 +00009073 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009074#ifdef HAVE_SYS_TYPES_H
9075#include <sys/types.h>
9076#endif
9077#ifdef HAVE_TIME_H
9078#include <time.h>
9079#endif
9080
Matthias Kloseb9621712010-04-24 17:59:49 +00009081"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009082
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009083else
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 if test "$ac_cv_type_time_t" = yes; then
9085 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009087as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009088See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009089 else
9090 ac_cv_sizeof_time_t=0
9091 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009093
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9096$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009097
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009098
9099
Martin v. Löwis11437992002-04-12 09:54:03 +00009100cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009101#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009102_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009103
Michael W. Hudson54241132001-12-07 15:38:26 +00009104
9105
Trent Mick635f6fb2000-08-23 21:33:05 +00009106# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009107ac_save_cc="$CC"
9108if test "$ac_cv_kpthread" = "yes"
9109then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009110elif test "$ac_cv_kthread" = "yes"
9111then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009112elif test "$ac_cv_pthread" = "yes"
9113then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009114fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009115
Matthias Kloseb9621712010-04-24 17:59:49 +00009116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9117$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009118have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009120/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009121
9122 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009123int
9124main ()
9125{
Guido van Rossum12580492000-09-24 16:47:19 +00009126pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009127 ;
9128 return 0;
9129}
Matthias Kloseb159a552010-04-25 21:00:44 +00009130
Martin v. Löwis11437992002-04-12 09:54:03 +00009131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009132if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009133 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9137$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009138if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009139 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009140# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9141# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9142# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9144$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009145if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009147else
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009149#ifdef HAVE_PTHREAD_H
9150#include <pthread.h>
9151#endif
9152
Matthias Kloseb9621712010-04-24 17:59:49 +00009153"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009155else
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 if test "$ac_cv_type_pthread_t" = yes; then
9157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009159as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009160See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009161 else
9162 ac_cv_sizeof_pthread_t=0
9163 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009165
Trent Mick635f6fb2000-08-23 21:33:05 +00009166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9168$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009170
9171
Martin v. Löwis11437992002-04-12 09:54:03 +00009172cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009173#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009174_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009176
Trent Mick635f6fb2000-08-23 21:33:05 +00009177fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009178
9179# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9180# This checking will be unnecessary after removing deprecated TLS API.
9181# The cast to long int works around a bug in the HP C Compiler
9182# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9183# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9184# This bug is HP SR number 8606223364.
9185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9186$as_echo_n "checking size of pthread_key_t... " >&6; }
9187if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9188 $as_echo_n "(cached) " >&6
9189else
9190 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9191"; then :
9192
9193else
9194 if test "$ac_cv_type_pthread_key_t" = yes; then
9195 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9196$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9197as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9198See \`config.log' for more details" "$LINENO" 5; }
9199 else
9200 ac_cv_sizeof_pthread_key_t=0
9201 fi
9202fi
9203
9204fi
9205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9206$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9207
9208
9209
9210cat >>confdefs.h <<_ACEOF
9211#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9212_ACEOF
9213
9214
9215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9216$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9217if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9219/* end confdefs.h. */
9220#include <pthread.h>
9221int
9222main ()
9223{
9224pthread_key_t k; k * 1;
9225 ;
9226 return 0;
9227}
9228_ACEOF
9229if ac_fn_c_try_compile "$LINENO"; then :
9230 ac_pthread_key_t_is_arithmetic_type=yes
9231else
9232 ac_pthread_key_t_is_arithmetic_type=no
9233
9234fi
9235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9237$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9238 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9239
9240$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9241
9242 fi
9243else
9244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9245$as_echo "no" >&6; }
9246fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009247CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009248
Michael W. Hudson54241132001-12-07 15:38:26 +00009249
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009250case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009251 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009252 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9253 ;;
9254 Darwin/*)
9255 OTHER_LIBTOOL_OPT=""
9256 ;;
9257esac
9258
9259
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009260
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009261case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009262 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009263 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9264 if test "${enable_universalsdk}"; then
9265 :
9266 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009267 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009268 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009269 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009270 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009271 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009272 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009273 if test ${gcc_version} '<' 4.0
9274 then
9275 LIBTOOL_CRUFT="-lcc_dynamic"
9276 else
9277 LIBTOOL_CRUFT=""
9278 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009279 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009280 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009281else
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009283/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009284
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009285 #include <unistd.h>
9286 int main(int argc, char*argv[])
9287 {
9288 if (sizeof(long) == 4) {
9289 return 0;
9290 } else {
9291 return 1;
9292 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009293 }
9294
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009296if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009297 ac_osx_32bit=yes
9298else
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009300fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9302 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009303fi
9304
9305
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009306 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009307 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009308 i386)
9309 MACOSX_DEFAULT_ARCH="i386"
9310 ;;
9311 ppc)
9312 MACOSX_DEFAULT_ARCH="ppc"
9313 ;;
9314 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009315 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009316 ;;
9317 esac
9318 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009319 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009320 i386)
9321 MACOSX_DEFAULT_ARCH="x86_64"
9322 ;;
9323 ppc)
9324 MACOSX_DEFAULT_ARCH="ppc64"
9325 ;;
9326 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009327 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009328 ;;
9329 esac
9330
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009331 fi
9332
9333 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009334 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009335 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009336esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9338$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009339if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009340then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009341 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009342 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009343 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009344
Matthias Kloseb9621712010-04-24 17:59:49 +00009345$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009346
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9348$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009349 if test $enable_shared = "yes"
9350 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009351 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00009352 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009353else
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9355$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009356fi
9357
Matthias Kloseb9621712010-04-24 17:59:49 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9359$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009360case $ac_sys_system/$ac_sys_release in
9361 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009362
Matthias Kloseb9621712010-04-24 17:59:49 +00009363$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009364
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9366$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009367 ;;
9368 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9370$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009371 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009372esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009373
Guido van Rossum0a516c91994-09-12 10:58:40 +00009374# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009375
Michael W. Hudson54241132001-12-07 15:38:26 +00009376
9377
9378
9379
Benjamin Peterson99f03762010-04-11 22:15:28 +00009380
Thomas Wouters477c8d52006-05-27 19:21:47 +00009381
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009382# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9383# -- usually .so, .sl on HP-UX, .dll on Cygwin
9384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9385$as_echo_n "checking the extension of shared libraries... " >&6; }
9386if test -z "$SHLIB_SUFFIX"; then
9387 case $ac_sys_system in
9388 hp*|HP*)
9389 case `uname -m` in
9390 ia64) SHLIB_SUFFIX=.so;;
9391 *) SHLIB_SUFFIX=.sl;;
9392 esac
9393 ;;
9394 CYGWIN*) SHLIB_SUFFIX=.dll;;
9395 *) SHLIB_SUFFIX=.so;;
9396 esac
9397fi
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9399$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009400
Guido van Rossum0a516c91994-09-12 10:58:40 +00009401# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009402# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009403# (Shared libraries in this instance are shared modules to be loaded into
9404# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9406$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009407if test -z "$LDSHARED"
9408then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009409 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009410 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009411 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009412 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009413 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009415 if test "$GCC" = "yes" ; then
9416 LDSHARED='$(CC) -shared'
9417 LDCXXSHARED='$(CXX) -shared'
9418 else
9419 LDSHARED='$(CC) -G'
9420 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009421 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009422 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009423 if test "$GCC" = "yes" ; then
9424 LDSHARED='$(CC) -shared'
9425 LDCXXSHARED='$(CXX) -shared'
9426 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009427 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009428 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009429 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009430 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009431 LDSHARED='$(CC) -bundle'
9432 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009433 if test "$enable_framework" ; then
9434 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009435 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9436 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009437 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009438 else
9439 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009440 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009441 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009442 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009443 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009444 LDSHARED='$(CC) -bundle'
9445 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009446 if test "$enable_framework" ; then
9447 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009448 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9449 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009450 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009451 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009452 # No framework, use the Python app as bundle-loader
9453 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009454 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009455 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009456 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009457 Darwin/*)
9458 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9459 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009460
Ned Deily36820b62014-06-25 13:44:22 -07009461 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9462 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9463 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9464 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9465 if test ${dep_target_major} -eq 10 && \
9466 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009467 then
Ned Deily36820b62014-06-25 13:44:22 -07009468 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009469 LDSHARED='$(CC) -bundle'
9470 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009471 if test "$enable_framework" ; then
9472 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009473 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9474 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009475 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009476 else
9477 # No framework, use the Python app as bundle-loader
9478 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9479 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009480 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009481 fi
Ned Deily36820b62014-06-25 13:44:22 -07009482 else
9483 # building for OS X 10.3 and later
9484 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9485 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9486 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009487 fi
9488 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009489 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009490 LDSHARED='$(CC) -shared'
9491 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009492 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009493 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009494 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009495 LDSHARED='$(CC) -shared'
9496 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009497 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009498 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009499 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009500 OpenBSD*)
9501 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9502 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009503 LDSHARED='$(CC) -shared $(CCSHARED)'
9504 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009505 else
9506 case `uname -r` in
9507 [01].* | 2.[0-7] | 2.[0-7].*)
9508 LDSHARED="ld -Bshareable ${LDFLAGS}"
9509 ;;
9510 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009511 LDSHARED='$(CC) -shared $(CCSHARED)'
9512 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009513 ;;
9514 esac
9515 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009516 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009517 LDSHARED='$(CC) -shared'
9518 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009519 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009520 if test "$GCC" = "yes" ; then
9521 LDSHARED='$(CC) -shared'
9522 LDCXXSHARED='$(CXX) -shared'
9523 else
9524 LDSHARED='$(CC) -G'
9525 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009526 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009527 SCO_SV*)
9528 LDSHARED='$(CC) -Wl,-G,-Bexport'
9529 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9530 CYGWIN*)
9531 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9532 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009533 *) LDSHARED="ld";;
9534 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9537$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009538LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009539BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009540# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009541# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9543$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009544if test -z "$CCSHARED"
9545then
Guido van Rossum07397971997-04-29 21:49:50 +00009546 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009547 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009548 then CCSHARED="-fPIC";
9549 elif test `uname -p` = sparc;
9550 then CCSHARED="-xcode=pic32";
9551 else CCSHARED="-Kpic";
9552 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009553 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009554 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009555 else CCSHARED="+z";
9556 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009557 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009558 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009559 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009560 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009561 if test "$GCC" = "yes"
9562 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009563 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009564 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009565 SCO_SV*)
9566 if test "$GCC" = "yes"
9567 then CCSHARED="-fPIC"
9568 else CCSHARED="-Kpic -belf"
9569 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009570 VxWorks*)
9571 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009572 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9575$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009576# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009577# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9579$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009580if test -z "$LINKFORSHARED"
9581then
Guido van Rossum07397971997-04-29 21:49:50 +00009582 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009583 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009584 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009585 LINKFORSHARED="-Wl,-E -Wl,+s";;
9586# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009587 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009588 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009589 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009591 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009592
9593 # Issue #18075: the default maximum stack size (8MBytes) is too
9594 # small for the default recursion limit. Increase the stack size
9595 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009596 # Note: This matches the value of THREAD_STACK_SIZE in
9597 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009598 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9599
Jack Jansene578a632001-08-15 01:27:14 +00009600 if test "$enable_framework"
9601 then
Jack Jansenda49e192005-01-07 13:08:22 +00009602 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009603 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009604 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009605 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009606 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009607 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009608 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009609 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9610 then
9611 LINKFORSHARED="-Wl,--export-dynamic"
9612 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009613 SunOS/5*) case $CC in
9614 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009615 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009616 then
9617 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009618 fi;;
9619 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009620 CYGWIN*)
9621 if test $enable_shared = "no"
9622 then
9623 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9624 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009625 QNX*)
9626 # -Wl,-E causes the symbols to be added to the dynamic
9627 # symbol table so that they can be found when a module
9628 # is loaded. -N 2048K causes the stack size to be set
9629 # to 2048 kilobytes so that the stack doesn't overflow
9630 # when running test_compile.py.
9631 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009632 VxWorks*)
9633 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009634 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9637$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009638
Michael W. Hudson54241132001-12-07 15:38:26 +00009639
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009640
Matthias Kloseb9621712010-04-24 17:59:49 +00009641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9642$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009643if test ! "$LIBRARY" = "$LDLIBRARY"
9644then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009645 case $ac_sys_system in
9646 CYGWIN*)
9647 # Cygwin needs CCSHARED when building extension DLLs
9648 # but not when building the interpreter DLL.
9649 CFLAGSFORSHARED='';;
9650 *)
9651 CFLAGSFORSHARED='$(CCSHARED)'
9652 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9655$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009656
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009657# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9658# library (with --enable-shared).
9659# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009660# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9661# if it is not required, since it creates a dependency of the shared library
9662# to LIBS. This, in turn, means that applications linking the shared libpython
9663# don't need to link LIBS explicitly. The default should be only changed
9664# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009665
Matthias Kloseb9621712010-04-24 17:59:49 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9667$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009668case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009669 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009670 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009671esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9673$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009674
9675
Guido van Rossum627b2d71993-12-24 10:39:16 +00009676# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9678$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009679if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009680 $as_echo_n "(cached) " >&6
9681else
9682 ac_check_lib_save_LIBS=$LIBS
9683LIBS="-lsendfile $LIBS"
9684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9685/* end confdefs.h. */
9686
9687/* Override any GCC internal prototype to avoid an error.
9688 Use char because int might match the return type of a GCC
9689 builtin and then its argument prototype would still apply. */
9690#ifdef __cplusplus
9691extern "C"
9692#endif
9693char sendfile ();
9694int
9695main ()
9696{
9697return sendfile ();
9698 ;
9699 return 0;
9700}
9701_ACEOF
9702if ac_fn_c_try_link "$LINENO"; then :
9703 ac_cv_lib_sendfile_sendfile=yes
9704else
9705 ac_cv_lib_sendfile_sendfile=no
9706fi
9707rm -f core conftest.err conftest.$ac_objext \
9708 conftest$ac_exeext conftest.$ac_ext
9709LIBS=$ac_check_lib_save_LIBS
9710fi
9711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9712$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009713if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009714 cat >>confdefs.h <<_ACEOF
9715#define HAVE_LIBSENDFILE 1
9716_ACEOF
9717
9718 LIBS="-lsendfile $LIBS"
9719
9720fi
9721
Matthias Kloseb9621712010-04-24 17:59:49 +00009722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9723$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009724if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009726else
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009728LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009730/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732/* Override any GCC internal prototype to avoid an error.
9733 Use char because int might match the return type of a GCC
9734 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009735#ifdef __cplusplus
9736extern "C"
9737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009738char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009739int
9740main ()
9741{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ;
9744 return 0;
9745}
9746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009747if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009749else
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009752rm -f core conftest.err conftest.$ac_objext \
9753 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009754LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9757$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009758if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 cat >>confdefs.h <<_ACEOF
9760#define HAVE_LIBDL 1
9761_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009762
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009763 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009764
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009765fi
9766 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9768$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009769if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009770 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009771else
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009773LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777/* Override any GCC internal prototype to avoid an error.
9778 Use char because int might match the return type of a GCC
9779 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009780#ifdef __cplusplus
9781extern "C"
9782#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009783char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009784int
9785main ()
9786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009788 ;
9789 return 0;
9790}
9791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009792if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009794else
Matthias Kloseb9621712010-04-24 17:59:49 +00009795 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009797rm -f core conftest.err conftest.$ac_objext \
9798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009799LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9802$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009803if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 cat >>confdefs.h <<_ACEOF
9805#define HAVE_LIBDLD 1
9806_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009807
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009808 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009809
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009810fi
9811 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009812
Michael Felt0d3ccb42017-12-30 22:39:20 +01009813# checks for uuid.h location
9814for ac_header in uuid/uuid.h uuid.h
9815do :
9816 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9817ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9818if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9819 cat >>confdefs.h <<_ACEOF
9820#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9821_ACEOF
9822
9823fi
9824
9825done
9826
9827
Berker Peksag9a10ff42017-11-08 23:09:16 +03009828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9829$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9831/* end confdefs.h. */
9832#include <uuid/uuid.h>
9833int
9834main ()
9835{
9836
9837#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009838void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009839#endif
9840
9841 ;
9842 return 0;
9843}
9844_ACEOF
9845if ac_fn_c_try_compile "$LINENO"; then :
9846
9847$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9848
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9850$as_echo "yes" >&6; }
9851else
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853$as_echo "no" >&6; }
9854
9855fi
9856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9857
Michael Felt0d3ccb42017-12-30 22:39:20 +01009858# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009859# FreeBSD and OpenBSD provides support as well
9860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9861$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9863/* end confdefs.h. */
9864#include <uuid.h>
9865int
9866main ()
9867{
9868
9869#ifndef uuid_create
9870void *x = uuid_create
9871#endif
9872
9873 ;
9874 return 0;
9875}
9876_ACEOF
9877if ac_fn_c_try_compile "$LINENO"; then :
9878
9879$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9880
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9882$as_echo "yes" >&6; }
9883else
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9885$as_echo "no" >&6; }
9886
9887fi
9888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9889
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009890# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9891# stream in big-endian byte-order
9892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9893$as_echo_n "checking for uuid_enc_be... " >&6; }
9894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9895/* end confdefs.h. */
9896#include <uuid.h>
9897int
9898main ()
9899{
9900
9901#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009902void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009903#endif
9904
9905 ;
9906 return 0;
9907}
9908_ACEOF
9909if ac_fn_c_try_compile "$LINENO"; then :
9910
9911$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9912
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9914$as_echo "yes" >&6; }
9915else
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9917$as_echo "no" >&6; }
9918
9919fi
9920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9921
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009922# 'Real Time' functions on Solaris
9923# posix4 on Solaris 2.6
9924# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009926$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009927if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009929else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009930 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934/* Override any GCC internal prototype to avoid an error.
9935 Use char because int might match the return type of a GCC
9936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009937#ifdef __cplusplus
9938extern "C"
9939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009940char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009941int
9942main ()
9943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 ;
9946 return 0;
9947}
9948_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949for ac_lib in '' pthread rt posix4; do
9950 if test -z "$ac_lib"; then
9951 ac_res="none required"
9952 else
9953 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009954 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009955 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009957 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009959rm -f core conftest.err conftest.$ac_objext \
9960 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009961 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009962 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009964done
Victor Stinnere0be4232011-10-25 13:06:09 +02009965if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967else
9968 ac_cv_search_sem_init=no
9969fi
9970rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009971LIBS=$ac_func_search_save_LIBS
9972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9974$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009976if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009978
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009979fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009980
Martin v. Löwis519adae2003-09-20 10:47:47 +00009981
Martin v. Löwis19d17342003-06-14 21:03:05 +00009982# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9984$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009985if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009987else
9988 ac_check_lib_save_LIBS=$LIBS
9989LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009991/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009993/* Override any GCC internal prototype to avoid an error.
9994 Use char because int might match the return type of a GCC
9995 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009996#ifdef __cplusplus
9997extern "C"
9998#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009999char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010000int
10001main ()
10002{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010003return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010004 ;
10005 return 0;
10006}
10007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010008if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010009 ac_cv_lib_intl_textdomain=yes
10010else
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010013rm -f core conftest.err conftest.$ac_objext \
10014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010015LIBS=$ac_check_lib_save_LIBS
10016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10018$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010019if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010020
Matthias Kloseb9621712010-04-24 17:59:49 +000010021$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010022
Brett Cannonc6d936e2009-06-07 20:09:53 +000010023 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010024fi
10025
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010026
10027# checks for system dependent C++ extensions support
10028case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010029 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10030$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010032/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010033
Georg Brandl59e87bd2011-02-15 19:48:59 +000010034 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010035int
10036main ()
10037{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010038loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010039 ;
10040 return 0;
10041}
Matthias Kloseb159a552010-04-25 21:00:44 +000010042
Martin v. Löwis11437992002-04-12 09:54:03 +000010043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010044if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010045
Matthias Kloseb159a552010-04-25 21:00:44 +000010046
Matthias Kloseb9621712010-04-24 17:59:49 +000010047$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010048
Matthias Kloseb159a552010-04-25 21:00:44 +000010049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010050$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010051
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010052else
Matthias Kloseb159a552010-04-25 21:00:44 +000010053
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010055$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010056
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010058rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010059 conftest$ac_exeext conftest.$ac_ext
10060# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10061# of the AIX system used to build/package Python executable. This tag serves
10062# as a baseline for bdist module packages
10063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10064$as_echo_n "checking for the system builddate... " >&6; }
10065 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10066
10067cat >>confdefs.h <<_ACEOF
10068#define AIX_BUILDDATE $AIX_BUILDDATE
10069_ACEOF
10070
10071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10072$as_echo "$AIX_BUILDDATE" >&6; }
10073 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010074 *) ;;
10075esac
10076
Christian Heimes985ecdc2013-11-20 11:46:18 +010010077# check for systems that require aligned memory access
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10079$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010080if ${ac_cv_aligned_required+:} false; then :
10081 $as_echo_n "(cached) " >&6
10082else
10083 if test "$cross_compiling" = yes; then :
10084 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010085else
10086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10087/* end confdefs.h. */
10088
10089int main()
10090{
10091 char s[16];
10092 int i, *p1, *p2;
10093 for (i=0; i < 16; i++)
10094 s[i] = i;
10095 p1 = (int*)(s+1);
10096 p2 = (int*)(s+2);
10097 if (*p1 == *p2)
10098 return 1;
10099 return 0;
10100}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010101_ACEOF
10102if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010103 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010104else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010105 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010106fi
10107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10108 conftest.$ac_objext conftest.beam conftest.$ac_ext
10109fi
10110
10111
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010112fi
10113
10114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10115$as_echo "$ac_cv_aligned_required" >&6; }
10116if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010117
10118$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10119
10120fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010121
10122# str, bytes and memoryview hash algorithm
10123
10124
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10126$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10127
10128# Check whether --with-hash_algorithm was given.
10129if test "${with_hash_algorithm+set}" = set; then :
10130 withval=$with_hash_algorithm;
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10132$as_echo "$withval" >&6; }
10133case "$withval" in
10134 siphash24)
10135 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10136
10137 ;;
10138 fnv)
10139 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10140
10141 ;;
10142 *)
10143 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10144 ;;
10145esac
10146
10147else
10148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10149$as_echo "default" >&6; }
10150fi
10151
10152
Charles-François Natalid30b0222014-05-08 23:08:51 +010010153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10154$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10155
10156# Check whether --with-address_sanitizer was given.
10157if test "${with_address_sanitizer+set}" = set; then :
10158 withval=$with_address_sanitizer;
10159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10160$as_echo "$withval" >&6; }
10161BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10162LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010163# ASan works by controlling memory allocation, our own malloc interferes.
10164with_pymalloc="no"
10165
10166else
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10168$as_echo "no" >&6; }
10169fi
10170
10171
10172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10173$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10174
10175# Check whether --with-memory_sanitizer was given.
10176if test "${with_memory_sanitizer+set}" = set; then :
10177 withval=$with_memory_sanitizer;
10178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10179$as_echo "$withval" >&6; }
10180BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10181LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10182# MSan works by controlling memory allocation, our own malloc interferes.
10183with_pymalloc="no"
10184
10185else
10186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10187$as_echo "no" >&6; }
10188fi
10189
10190
10191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10192$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10193
10194# Check whether --with-undefined_behavior_sanitizer was given.
10195if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10196 withval=$with_undefined_behavior_sanitizer;
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10198$as_echo "$withval" >&6; }
10199BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10200LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010201
10202else
10203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10204$as_echo "no" >&6; }
10205fi
10206
10207
Guido van Rossum70c7f481998-03-26 18:44:10 +000010208# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10210$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010211if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010213else
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010215LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219/* Override any GCC internal prototype to avoid an error.
10220 Use char because int might match the return type of a GCC
10221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010222#ifdef __cplusplus
10223extern "C"
10224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010225char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010226int
10227main ()
10228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 ;
10231 return 0;
10232}
10233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010236else
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010239rm -f core conftest.err conftest.$ac_objext \
10240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010241LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10244$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010245if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010246 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010247fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010248 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10250$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010251if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010253else
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010255LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259/* Override any GCC internal prototype to avoid an error.
10260 Use char because int might match the return type of a GCC
10261 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010262#ifdef __cplusplus
10263extern "C"
10264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010265char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010266int
10267main ()
10268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 ;
10271 return 0;
10272}
10273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010274if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010276else
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010279rm -f core conftest.err conftest.$ac_objext \
10280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010281LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10284$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010285if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010286 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010287fi
10288 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010289
Matthias Kloseb9621712010-04-24 17:59:49 +000010290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10291$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010294if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10297$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010298LIBS="$withval $LIBS"
10299
10300else
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303fi
10304
Guido van Rossum7f43da71994-08-01 12:15:30 +000010305
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010306
10307
10308
10309
10310
10311
Victor Stinnerb477d192020-01-22 22:48:16 +010010312
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010313if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10314 if test -n "$ac_tool_prefix"; then
10315 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10316set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10318$as_echo_n "checking for $ac_word... " >&6; }
10319if ${ac_cv_path_PKG_CONFIG+:} false; then :
10320 $as_echo_n "(cached) " >&6
10321else
10322 case $PKG_CONFIG in
10323 [\\/]* | ?:[\\/]*)
10324 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10325 ;;
10326 *)
10327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10328for as_dir in $PATH
10329do
10330 IFS=$as_save_IFS
10331 test -z "$as_dir" && as_dir=.
10332 for ac_exec_ext in '' $ac_executable_extensions; do
10333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10334 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10336 break 2
10337 fi
10338done
10339 done
10340IFS=$as_save_IFS
10341
10342 ;;
10343esac
10344fi
10345PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10346if test -n "$PKG_CONFIG"; then
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10348$as_echo "$PKG_CONFIG" >&6; }
10349else
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10351$as_echo "no" >&6; }
10352fi
10353
10354
10355fi
10356if test -z "$ac_cv_path_PKG_CONFIG"; then
10357 ac_pt_PKG_CONFIG=$PKG_CONFIG
10358 # Extract the first word of "pkg-config", so it can be a program name with args.
10359set dummy pkg-config; ac_word=$2
10360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10361$as_echo_n "checking for $ac_word... " >&6; }
10362if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10363 $as_echo_n "(cached) " >&6
10364else
10365 case $ac_pt_PKG_CONFIG in
10366 [\\/]* | ?:[\\/]*)
10367 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10368 ;;
10369 *)
10370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10371for as_dir in $PATH
10372do
10373 IFS=$as_save_IFS
10374 test -z "$as_dir" && as_dir=.
10375 for ac_exec_ext in '' $ac_executable_extensions; do
10376 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10377 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10379 break 2
10380 fi
10381done
10382 done
10383IFS=$as_save_IFS
10384
10385 ;;
10386esac
10387fi
10388ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10389if test -n "$ac_pt_PKG_CONFIG"; then
10390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10391$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10392else
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
10395fi
10396
10397 if test "x$ac_pt_PKG_CONFIG" = x; then
10398 PKG_CONFIG=""
10399 else
10400 case $cross_compiling:$ac_tool_warned in
10401yes:)
10402{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10403$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10404ac_tool_warned=yes ;;
10405esac
10406 PKG_CONFIG=$ac_pt_PKG_CONFIG
10407 fi
10408else
10409 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10410fi
10411
10412fi
10413if test -n "$PKG_CONFIG"; then
10414 _pkg_min_version=0.9.0
10415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10416$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10417 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10419$as_echo "yes" >&6; }
10420 else
10421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10422$as_echo "no" >&6; }
10423 PKG_CONFIG=""
10424 fi
10425fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010426
10427# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10429$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010430
10431# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010432if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010433 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010434else
10435 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010436fi
10437
10438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10440$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010441
10442# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10444$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010445
10446# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010447if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010448 withval=$with_system_ffi;
10449fi
10450
10451
Zachary Waref40d4dd2016-09-17 01:25:24 -050010452if test "$ac_sys_system" = "Darwin"
10453then
10454 case "$with_system_ffi" in
10455 "")
10456 with_system_ffi="no"
10457 ;;
10458 yes|no)
10459 ;;
10460 *)
10461 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10462 ;;
10463 esac
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10465$as_echo "$with_system_ffi" >&6; }
10466else
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10468$as_echo "yes" >&6; }
10469 if test "$with_system_ffi" != ""
10470 then
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10472$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10473 fi
10474 with_system_ffi="yes"
10475fi
Zachary Ware935043d2016-09-09 17:01:21 -070010476
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010477if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010478 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10479else
10480 LIBFFI_INCLUDEDIR=""
10481fi
10482
10483
Stefan Krah60187b52012-03-23 19:06:27 +010010484# Check for use of the system libmpdec library
10485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10486$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10487
10488# Check whether --with-system_libmpdec was given.
10489if test "${with_system_libmpdec+set}" = set; then :
10490 withval=$with_system_libmpdec;
10491else
10492 with_system_libmpdec="no"
10493fi
10494
10495
10496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10497$as_echo "$with_system_libmpdec" >&6; }
10498
Benjamin Peterson076ed002010-10-31 17:11:02 +000010499# Check for support for loadable sqlite extensions
10500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10501$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10502# Check whether --enable-loadable-sqlite-extensions was given.
10503if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10504 enableval=$enable_loadable_sqlite_extensions;
10505else
10506 enable_loadable_sqlite_extensions="no"
10507fi
10508
10509
10510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10511$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10512
Ned Deilyd819b932013-09-06 01:07:05 -070010513# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10514
10515
10516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10517$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10518
10519# Check whether --with-tcltk-includes was given.
10520if test "${with_tcltk_includes+set}" = set; then :
10521 withval=$with_tcltk_includes;
10522else
10523 with_tcltk_includes="default"
10524fi
10525
10526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10527$as_echo "$with_tcltk_includes" >&6; }
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10529$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10530
10531# Check whether --with-tcltk-libs was given.
10532if test "${with_tcltk_libs+set}" = set; then :
10533 withval=$with_tcltk_libs;
10534else
10535 with_tcltk_libs="default"
10536fi
10537
10538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10539$as_echo "$with_tcltk_libs" >&6; }
10540if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10541then
10542 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10543 then
10544 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10545 fi
10546 TCLTK_INCLUDES=""
10547 TCLTK_LIBS=""
10548else
10549 TCLTK_INCLUDES="$with_tcltk_includes"
10550 TCLTK_LIBS="$with_tcltk_libs"
10551fi
10552
Matthias Klose55708cc2009-04-30 08:06:49 +000010553# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10555$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010556
10557# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010558if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010559 withval=$with_dbmliborder;
10560if test x$with_dbmliborder = xyes
10561then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010562as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010563else
10564 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10565 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10566 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010567 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010568 fi
10569 done
10570fi
10571fi
10572
Matthias Kloseb9621712010-04-24 17:59:49 +000010573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10574$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010575
Martin v. Löwis11437992002-04-12 09:54:03 +000010576# Templates for things AC_DEFINEd more than once.
10577# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010578
10579
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010580if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010581then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010582 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010584
10585 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010586 if test "$ac_sys_system" = "SunOS"; then
10587 CFLAGS="$CFLAGS -D_REENTRANT"
10588 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010589elif test "$ac_cv_kpthread" = "yes"
10590then
10591 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010592 if test "$ac_cv_cxx_thread" = "yes"; then
10593 CXX="$CXX -Kpthread"
10594 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010595 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010596elif test "$ac_cv_kthread" = "yes"
10597then
10598 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010599 if test "$ac_cv_cxx_thread" = "yes"; then
10600 CXX="$CXX -Kthread"
10601 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010602 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010603elif test "$ac_cv_pthread" = "yes"
10604then
10605 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010606 if test "$ac_cv_cxx_thread" = "yes"; then
10607 CXX="$CXX -pthread"
10608 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010610else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010611 if test ! -z "$withval" -a -d "$withval"
10612 then LDFLAGS="$LDFLAGS -L$withval"
10613 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010614
10615 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010616 # define _POSIX_THREADS in unistd.h. Some apparently don't
10617 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10619$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010621/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010622
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010623#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010624#ifdef _POSIX_THREADS
10625yes
10626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010627
10628_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010631 unistd_defines_pthreads=yes
10632else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010633 unistd_defines_pthreads=no
10634fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010635rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010636
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10638$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010639
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010641
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010642 # Just looking for pthread_create in libpthread is not enough:
10643 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10644 # So we really have to include pthread.h, and then link.
10645 _libs=$LIBS
10646 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10648$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010650/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010651
10652#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010653#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010654
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010655void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010656int
10657main ()
10658{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010659
10660pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 ;
10662 return 0;
10663}
10664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010665if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010666
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10668$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010669 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010670
Guido van Rossum02a1c402000-02-25 19:26:31 +000010671else
Martin v. Löwis11437992002-04-12 09:54:03 +000010672
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010673 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010675if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010676
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010677 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010678
Guido van Rossumad678af1998-10-02 14:42:15 +000010679else
Guido van Rossumad678af1998-10-02 14:42:15 +000010680
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10682$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010683if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010685else
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010687LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691/* Override any GCC internal prototype to avoid an error.
10692 Use char because int might match the return type of a GCC
10693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010694#ifdef __cplusplus
10695extern "C"
10696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010697char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010698int
10699main ()
10700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010702 ;
10703 return 0;
10704}
10705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010706if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010707 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010708else
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010711rm -f core conftest.err conftest.$ac_objext \
10712 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010713LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10716$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010717if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010718
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010719 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010720 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010721
Greg Steinadf63d62000-07-05 10:38:09 +000010722else
Greg Steinadf63d62000-07-05 10:38:09 +000010723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10725$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010726if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010728else
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010730LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734/* Override any GCC internal prototype to avoid an error.
10735 Use char because int might match the return type of a GCC
10736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010737#ifdef __cplusplus
10738extern "C"
10739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010740char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010741int
10742main ()
10743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010744return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010745 ;
10746 return 0;
10747}
10748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010750 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010751else
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010754rm -f core conftest.err conftest.$ac_objext \
10755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010756LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10759$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010760if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010761
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010762 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010763 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010764
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010765else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010766
Matthias Kloseb9621712010-04-24 17:59:49 +000010767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10768$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010769if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010771else
Martin v. Löwis11437992002-04-12 09:54:03 +000010772 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010773LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010777/* Override any GCC internal prototype to avoid an error.
10778 Use char because int might match the return type of a GCC
10779 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010780#ifdef __cplusplus
10781extern "C"
10782#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010783char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010784int
10785main ()
10786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010787return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010788 ;
10789 return 0;
10790}
10791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010792if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010794else
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010797rm -f core conftest.err conftest.$ac_objext \
10798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010799LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10802$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010803if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010804
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010805 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010806 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010807
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010808else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10811$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010812if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010814else
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010816LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010820/* Override any GCC internal prototype to avoid an error.
10821 Use char because int might match the return type of a GCC
10822 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010823#ifdef __cplusplus
10824extern "C"
10825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010826char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010827int
10828main ()
10829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010830return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 ;
10832 return 0;
10833}
10834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010835if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010836 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010837else
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010840rm -f core conftest.err conftest.$ac_objext \
10841 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010842LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10845$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010846if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010847
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010848 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010849 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010850
Guido van Rossumb93a8621998-05-07 13:27:32 +000010851else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010852
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010853 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10854
Guido van Rossum2d38f911996-06-26 19:47:01 +000010855fi
10856
Guido van Rossum627b2d71993-12-24 10:39:16 +000010857
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010858fi
10859
Guido van Rossum0be3e491997-05-22 20:33:33 +000010860fi
10861
Guido van Rossum49545951997-12-02 19:28:29 +000010862fi
10863
Guido van Rossumb93a8621998-05-07 13:27:32 +000010864fi
10865
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010867rm -f core conftest.err conftest.$ac_objext \
10868 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010869
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10871$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010872if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010874else
Martin v. Löwis11437992002-04-12 09:54:03 +000010875 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010876LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010880/* Override any GCC internal prototype to avoid an error.
10881 Use char because int might match the return type of a GCC
10882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010883#ifdef __cplusplus
10884extern "C"
10885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010886char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010887int
10888main ()
10889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010890return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 ;
10892 return 0;
10893}
10894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010895if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010896 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010897else
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010900rm -f core conftest.err conftest.$ac_objext \
10901 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010902LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10905$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010906if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010907
Martin v. Löwis130fb172001-07-19 11:00:41 +000010908 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010909
Guido van Rossum627b2d71993-12-24 10:39:16 +000010910fi
10911
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010912
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010913fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010914
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010915if test "$posix_threads" = "yes"; then
10916 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010919
10920 fi
10921
10922 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10923 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010924 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010925$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010926
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010927 ;;
10928 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010929$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010930
10931 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010932 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010933$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010934
10935 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010936 esac
10937
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10939$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010940 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010941 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010942else
Matthias Kloseb9621712010-04-24 17:59:49 +000010943 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010944 ac_cv_pthread_system_supported=no
10945else
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010947/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010948
10949 #include <stdio.h>
10950 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010951 void *foo(void *parm) {
10952 return NULL;
10953 }
10954 main() {
10955 pthread_attr_t attr;
10956 pthread_t id;
10957 if (pthread_attr_init(&attr)) exit(-1);
10958 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10959 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10960 exit(0);
10961 }
10962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010963if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010964 ac_cv_pthread_system_supported=yes
10965else
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10969 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010970fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972
Guido van Rossum627b2d71993-12-24 10:39:16 +000010973fi
10974
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10976$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010977 if test "$ac_cv_pthread_system_supported" = "yes"; then
10978
Matthias Kloseb9621712010-04-24 17:59:49 +000010979$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010980
10981 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010982 for ac_func in pthread_sigmask
10983do :
10984 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010985if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010986 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010987#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010988_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010989 case $ac_sys_system in
10990 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010991
Matthias Kloseb9621712010-04-24 17:59:49 +000010992$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010993
10994 ;;
10995 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010996fi
10997done
10998
pdoxe14679c2017-10-05 00:01:56 -070010999 for ac_func in pthread_getcpuclockid
11000do :
11001 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11002if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11003 cat >>confdefs.h <<_ACEOF
11004#define HAVE_PTHREAD_GETCPUCLOCKID 1
11005_ACEOF
11006
11007fi
11008done
11009
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011010fi
11011
11012
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011013# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11016$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011017# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011018if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011019 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011020 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11022$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023 ipv6=no
11024 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11026$as_echo "yes" >&6; }
11027 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028
11029 ipv6=yes
11030 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011031 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011032else
Martin v. Löwis11437992002-04-12 09:54:03 +000011033
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011035/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011036 /* AF_INET6 available check */
11037#include <sys/types.h>
11038#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011039int
11040main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011041{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011042int domain = AF_INET6;
11043 ;
11044 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045}
Martin v. Löwis11437992002-04-12 09:54:03 +000011046_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011047if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11050$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011051 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011052
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011053else
Matthias Kloseb159a552010-04-25 21:00:44 +000011054
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11056$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011057 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011058
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011062if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11064$as_echo_n "checking if RFC2553 API is available... " >&6; }
11065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011066/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011067
11068 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011069#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011070int
11071main ()
11072{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011073struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011074 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 ;
11076 return 0;
11077}
Matthias Kloseb159a552010-04-25 21:00:44 +000011078
Martin v. Löwis11437992002-04-12 09:54:03 +000011079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011080if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011081
11082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011083$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011084 ipv6=yes
11085
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011086else
Matthias Kloseb159a552010-04-25 21:00:44 +000011087
11088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011089$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011090 ipv6=no
11091
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011094fi
11095
11096if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011097 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011098
11099fi
11100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101fi
11102
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011103
11104ipv6type=unknown
11105ipv6lib=none
11106ipv6trylibc=no
11107
11108if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11110$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011111 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11112 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011113 case $i in
11114 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011116/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011117
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118#include <netinet/in.h>
11119#ifdef IPV6_INRIA_VERSION
11120yes
11121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011122_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011125 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011127rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011128
11129 ;;
11130 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011132/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011133
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011134#include <netinet/in.h>
11135#ifdef __KAME__
11136yes
11137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011138_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011140 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141 ipv6type=$i;
11142 ipv6lib=inet6
11143 ipv6libdir=/usr/local/v6/lib
11144 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011145fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011146rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011147
11148 ;;
11149 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011151/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011152
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011153#include <features.h>
11154#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11155yes
11156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011157_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160 ipv6type=$i;
11161 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011162fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011163rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011164
11165 ;;
11166 linux-inet6)
11167 if test -d /usr/inet6; then
11168 ipv6type=$i
11169 ipv6lib=inet6
11170 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011171 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011172 fi
11173 ;;
11174 solaris)
11175 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011176 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011177 ipv6type=$i
11178 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011179 fi
11180 fi
11181 ;;
11182 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011184/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011185
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011186#include <sys/param.h>
11187#ifdef _TOSHIBA_INET6
11188yes
11189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011190_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011193 ipv6type=$i;
11194 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011195 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011196fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011197rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011198
11199 ;;
11200 v6d)
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 </usr/local/v6/include/sys/v6config.h>
11205#ifdef __V6D__
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=v6;
11213 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011214 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011215fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011216rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011217
11218 ;;
11219 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011221/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011222
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011223#include <sys/param.h>
11224#ifdef _ZETA_MINAMI_INET6
11225yes
11226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011227_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011229 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011230 ipv6type=$i;
11231 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011232 ipv6libdir=/usr/local/v6/lib
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 esac
11238 if test "$ipv6type" != "unknown"; then
11239 break
11240 fi
11241 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11243$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011244fi
11245
11246if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11247 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11248 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11249 echo "using lib$ipv6lib"
11250 else
11251 if test $ipv6trylibc = "yes"; then
11252 echo "using libc"
11253 else
11254 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11255 echo "You need to fetch lib$ipv6lib.a from appropriate"
11256 echo 'ipv6 kit and compile beforehand.'
11257 exit 1
11258 fi
11259 fi
11260fi
11261
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11263$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11265/* end confdefs.h. */
11266 /* CAN_RAW_FD_FRAMES available check */
11267#include <linux/can/raw.h>
11268int
11269main ()
11270{
11271int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11272 ;
11273 return 0;
11274}
11275_ACEOF
11276if ac_fn_c_try_compile "$LINENO"; then :
11277
11278
11279$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11280
11281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11282$as_echo "yes" >&6; }
11283
11284else
11285
11286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11287$as_echo "no" >&6; }
11288
11289fi
11290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11291
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011292# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11294$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011296# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011297if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011298 withval=$with_doc_strings;
11299fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011300
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011301
11302if test -z "$with_doc_strings"
11303then with_doc_strings="yes"
11304fi
11305if test "$with_doc_strings" != "no"
11306then
11307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011309
11310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11312$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011313
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011314# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11316$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011319if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320 withval=$with_pymalloc;
11321fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011322
Neil Schemenauera35c6882001-02-27 04:45:05 +000011323
Neil Schemenauer16c22972002-03-22 15:34:49 +000011324if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011325then
11326 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011327fi
11328if test "$with_pymalloc" != "no"
11329then
Martin v. Löwis11437992002-04-12 09:54:03 +000011330
Matthias Kloseb9621712010-04-24 17:59:49 +000011331$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011332
11333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11335$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011336
Nick Coghlan6ea41862017-06-11 13:16:15 +100011337# Check for --with-c-locale-coercion
11338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11339$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11340
11341# Check whether --with-c-locale-coercion was given.
11342if test "${with_c_locale_coercion+set}" = set; then :
11343 withval=$with_c_locale_coercion;
11344fi
11345
11346
11347if test -z "$with_c_locale_coercion"
11348then
11349 with_c_locale_coercion="yes"
11350fi
11351if test "$with_c_locale_coercion" != "no"
11352then
11353
11354$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11355
11356fi
11357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11358$as_echo "$with_c_locale_coercion" >&6; }
11359
Benjamin Peterson05159c42009-12-03 03:01:27 +000011360# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11362$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011363
11364# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011365if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011366 withval=$with_valgrind;
11367else
11368 with_valgrind=no
11369fi
11370
Matthias Kloseb9621712010-04-24 17:59:49 +000011371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11372$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011373if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011374 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 +020011375if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011376
Matthias Kloseb9621712010-04-24 17:59:49 +000011377$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011378
11379else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011380 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011381
11382fi
11383
11384
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011385 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011386fi
11387
Łukasz Langaa785c872016-09-09 17:37:37 -070011388# Check for DTrace support
11389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11390$as_echo_n "checking for --with-dtrace... " >&6; }
11391
11392# Check whether --with-dtrace was given.
11393if test "${with_dtrace+set}" = set; then :
11394 withval=$with_dtrace;
11395else
11396 with_dtrace=no
11397fi
11398
11399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11400$as_echo "$with_dtrace" >&6; }
11401
11402
11403
11404
11405
11406DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011407DTRACE_HEADERS=
11408DTRACE_OBJS=
11409
11410if test "$with_dtrace" = "yes"
11411then
11412 # Extract the first word of "dtrace", so it can be a program name with args.
11413set dummy dtrace; ac_word=$2
11414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11415$as_echo_n "checking for $ac_word... " >&6; }
11416if ${ac_cv_path_DTRACE+:} false; then :
11417 $as_echo_n "(cached) " >&6
11418else
11419 case $DTRACE in
11420 [\\/]* | ?:[\\/]*)
11421 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11422 ;;
11423 *)
11424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11425for as_dir in $PATH
11426do
11427 IFS=$as_save_IFS
11428 test -z "$as_dir" && as_dir=.
11429 for ac_exec_ext in '' $ac_executable_extensions; do
11430 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11431 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11432 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11433 break 2
11434 fi
11435done
11436 done
11437IFS=$as_save_IFS
11438
11439 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11440 ;;
11441esac
11442fi
11443DTRACE=$ac_cv_path_DTRACE
11444if test -n "$DTRACE"; then
11445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11446$as_echo "$DTRACE" >&6; }
11447else
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11449$as_echo "no" >&6; }
11450fi
11451
11452
11453 if test "$DTRACE" = "not found"; then
11454 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11455 fi
11456
11457$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11458
11459 DTRACE_HEADERS="Include/pydtrace_probes.h"
11460
11461 # On OS X, DTrace providers do not need to be explicitly compiled and
11462 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11463 # generation flag '-G'. We check for presence of this flag, rather than
11464 # hardcoding support by OS, in the interest of robustness.
11465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11466$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11467if ${ac_cv_dtrace_link+:} false; then :
11468 $as_echo_n "(cached) " >&6
11469else
11470 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011471 echo 'BEGIN{}' > conftest.d
David Carlieraabdeb72020-01-28 12:53:32 +000011472 "$DTRACE" "$DFLAGS" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011473 ac_cv_dtrace_link=yes
11474
11475fi
11476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11477$as_echo "$ac_cv_dtrace_link" >&6; }
11478 if test "$ac_cv_dtrace_link" = "yes"; then
11479 DTRACE_OBJS="Python/pydtrace.o"
11480 fi
11481fi
11482
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011483# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011484
Guido van Rossum98935bf2001-09-05 19:13:16 +000011485DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011486
Guido van Rossume97ee181999-12-20 21:27:22 +000011487# the dlopen() function means we might want to use dynload_shlib.o. some
11488# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011489for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011490do :
11491 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011492if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011494#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011495_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011496
Guido van Rossume97ee181999-12-20 21:27:22 +000011497fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011498done
Guido van Rossume97ee181999-12-20 21:27:22 +000011499
Michael W. Hudson54241132001-12-07 15:38:26 +000011500
Guido van Rossume97ee181999-12-20 21:27:22 +000011501# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11502# loading of modules.
11503
Matthias Kloseb9621712010-04-24 17:59:49 +000011504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11505$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011506if test -z "$DYNLOADFILE"
11507then
11508 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011509 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11510 if test "$ac_cv_func_dlopen" = yes
11511 then DYNLOADFILE="dynload_shlib.o"
11512 else DYNLOADFILE="dynload_aix.o"
11513 fi
11514 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011515 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011516 *)
11517 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11518 # out any dynamic loading
11519 if test "$ac_cv_func_dlopen" = yes
11520 then DYNLOADFILE="dynload_shlib.o"
11521 else DYNLOADFILE="dynload_stub.o"
11522 fi
11523 ;;
11524 esac
11525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11527$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011528if test "$DYNLOADFILE" != "dynload_stub.o"
11529then
Martin v. Löwis11437992002-04-12 09:54:03 +000011530
Matthias Kloseb9621712010-04-24 17:59:49 +000011531$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011532
11533fi
11534
Neil Schemenauer4e425612001-06-19 15:44:15 +000011535# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11536
Michael W. Hudson54241132001-12-07 15:38:26 +000011537
Matthias Kloseb9621712010-04-24 17:59:49 +000011538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11539$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011540if test -z "$MACHDEP_OBJS"
11541then
Jack Jansene578a632001-08-15 01:27:14 +000011542 MACHDEP_OBJS=$extra_machdep_objs
11543else
11544 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011545fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011546if test -z "$MACHDEP_OBJS"; then
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11548$as_echo "none" >&6; }
11549else
11550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11551$as_echo "$MACHDEP_OBJS" >&6; }
11552fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011553
Guido van Rossum627b2d71993-12-24 10:39:16 +000011554# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011555for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011556 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11557 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011558 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011559 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011560 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011561 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011562 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011563 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011564 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011565 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011566 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011567 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011568 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011569 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011570 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011571 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011572 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011573 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11574 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011575 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011576 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011577 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011578 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011579 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011580do :
11581 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11582ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011583if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011585#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011586_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011587
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011588fi
11589done
11590
Michael W. Hudson54241132001-12-07 15:38:26 +000011591
Benjamin Peterson40caa052018-09-12 15:52:40 -070011592# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11593# links. Some libc implementations have a stub lchmod implementation that always
11594# returns an error.
11595if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011596 for ac_func in lchmod
11597do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011598 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11599if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011600 cat >>confdefs.h <<_ACEOF
11601#define HAVE_LCHMOD 1
11602_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011603
11604fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011605done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011606
11607fi
11608
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011609ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11610 #include <dirent.h>
11611"
11612if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11613
11614$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11615
11616fi
11617
11618
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011619# For some functions, having a definition is not sufficient, since
11620# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11622$as_echo_n "checking for chroot... " >&6; }
11623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011624/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011625#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011626int
11627main ()
11628{
11629void *x=chroot
11630 ;
11631 return 0;
11632}
11633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011637
Matthias Kloseb159a552010-04-25 21:00:44 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011639$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011640else
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11642$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011643
11644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11647$as_echo_n "checking for link... " >&6; }
11648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011649/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011650#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011651int
11652main ()
11653{
11654void *x=link
11655 ;
11656 return 0;
11657}
11658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011659if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011662
Matthias Kloseb159a552010-04-25 21:00:44 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011664$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11667$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011668
11669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11672$as_echo_n "checking for symlink... " >&6; }
11673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011674/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011675#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011676int
11677main ()
11678{
11679void *x=symlink
11680 ;
11681 return 0;
11682}
11683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011687
Matthias Kloseb159a552010-04-25 21:00:44 +000011688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011689$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011690else
Matthias Kloseb9621712010-04-24 17:59:49 +000011691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11692$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011693
11694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11697$as_echo_n "checking for fchdir... " >&6; }
11698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011699/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011700#include <unistd.h>
11701int
11702main ()
11703{
11704void *x=fchdir
11705 ;
11706 return 0;
11707}
11708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011709if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011710
Matthias Kloseb9621712010-04-24 17:59:49 +000011711$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011712
Matthias Kloseb159a552010-04-25 21:00:44 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011714$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011715else
Matthias Kloseb9621712010-04-24 17:59:49 +000011716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011718
11719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11722$as_echo_n "checking for fsync... " >&6; }
11723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011724/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011725#include <unistd.h>
11726int
11727main ()
11728{
11729void *x=fsync
11730 ;
11731 return 0;
11732}
11733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011734if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011737
Matthias Kloseb159a552010-04-25 21:00:44 +000011738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011739$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011740else
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11742$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011743
11744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11747$as_echo_n "checking for fdatasync... " >&6; }
11748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011749/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011750#include <unistd.h>
11751int
11752main ()
11753{
11754void *x=fdatasync
11755 ;
11756 return 0;
11757}
11758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011759if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011760
Matthias Kloseb9621712010-04-24 17:59:49 +000011761$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011762
Matthias Kloseb159a552010-04-25 21:00:44 +000011763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011764$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011765else
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11767$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011768
11769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11772$as_echo_n "checking for epoll... " >&6; }
11773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011774/* end confdefs.h. */
11775#include <sys/epoll.h>
11776int
11777main ()
11778{
11779void *x=epoll_create
11780 ;
11781 return 0;
11782}
11783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011784if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011785
Matthias Kloseb9621712010-04-24 17:59:49 +000011786$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011787
Matthias Kloseb159a552010-04-25 21:00:44 +000011788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011789$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011790else
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11792$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011793
11794fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11797$as_echo_n "checking for epoll_create1... " >&6; }
11798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11799/* end confdefs.h. */
11800#include <sys/epoll.h>
11801int
11802main ()
11803{
11804void *x=epoll_create1
11805 ;
11806 return 0;
11807}
11808_ACEOF
11809if ac_fn_c_try_compile "$LINENO"; then :
11810
11811$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11812
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11814$as_echo "yes" >&6; }
11815else
11816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11817$as_echo "no" >&6; }
11818
11819fi
11820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11822$as_echo_n "checking for kqueue... " >&6; }
11823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011824/* end confdefs.h. */
11825
11826#include <sys/types.h>
11827#include <sys/event.h>
11828
11829int
11830main ()
11831{
11832int x=kqueue()
11833 ;
11834 return 0;
11835}
11836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011837if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011838
Matthias Kloseb9621712010-04-24 17:59:49 +000011839$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011840
Matthias Kloseb159a552010-04-25 21:00:44 +000011841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011842$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011843else
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11845$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011846
11847fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11850$as_echo_n "checking for prlimit... " >&6; }
11851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11852/* end confdefs.h. */
11853
11854#include <sys/time.h>
11855#include <sys/resource.h>
11856
11857int
11858main ()
11859{
11860void *x=prlimit
11861 ;
11862 return 0;
11863}
11864_ACEOF
11865if ac_fn_c_try_compile "$LINENO"; then :
11866
11867$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11868
11869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11870$as_echo "yes" >&6; }
11871else
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11873$as_echo "no" >&6; }
11874
11875fi
11876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11877
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11879$as_echo_n "checking for memfd_create... " >&6; }
11880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11881/* end confdefs.h. */
11882
11883#ifdef HAVE_SYS_MMAN_H
11884#include <sys/mman.h>
11885#endif
11886#ifdef HAVE_SYS_MEMFD_H
11887#include <sys/memfd.h>
11888#endif
11889
11890int
11891main ()
11892{
11893void *x=memfd_create
11894 ;
11895 return 0;
11896}
11897_ACEOF
11898if ac_fn_c_try_compile "$LINENO"; then :
11899
11900$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11901
11902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11903$as_echo "yes" >&6; }
11904else
11905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11906$as_echo "no" >&6; }
11907
11908fi
11909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11910
Martin v. Löwisd5843682002-11-21 20:41:28 +000011911# On some systems (eg. FreeBSD 5), we would find a definition of the
11912# functions ctermid_r, setgroups in the library, but no prototype
11913# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11914# address to avoid compiler warnings and potential miscompilations
11915# because of the missing prototypes.
11916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11918$as_echo_n "checking for ctermid_r... " >&6; }
11919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011920/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011921
Martin v. Löwisd5843682002-11-21 20:41:28 +000011922#include <stdio.h>
11923
Martin v. Löwisd5843682002-11-21 20:41:28 +000011924int
11925main ()
11926{
11927void* p = ctermid_r
11928 ;
11929 return 0;
11930}
11931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011932if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011933
Matthias Kloseb9621712010-04-24 17:59:49 +000011934$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011935
Matthias Kloseb159a552010-04-25 21:00:44 +000011936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011937$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011938else
Matthias Kloseb9621712010-04-24 17:59:49 +000011939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11940$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011941
11942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11944
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11946$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011947if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011948 $as_echo_n "(cached) " >&6
11949else
11950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011951/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011952#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011953int
11954main ()
11955{
11956void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011957
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011958 ;
11959 return 0;
11960}
11961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011962if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011963 ac_cv_flock_decl=yes
11964else
11965 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011966
11967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011969
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011970fi
11971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11972$as_echo "$ac_cv_flock_decl" >&6; }
11973if test "x${ac_cv_flock_decl}" = xyes; then
11974 for ac_func in flock
11975do :
11976 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011977if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011978 cat >>confdefs.h <<_ACEOF
11979#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011980_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011981
Antoine Pitroua3000072010-09-07 14:52:42 +000011982else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011984$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011985if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011986 $as_echo_n "(cached) " >&6
11987else
11988 ac_check_lib_save_LIBS=$LIBS
11989LIBS="-lbsd $LIBS"
11990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11991/* end confdefs.h. */
11992
11993/* Override any GCC internal prototype to avoid an error.
11994 Use char because int might match the return type of a GCC
11995 builtin and then its argument prototype would still apply. */
11996#ifdef __cplusplus
11997extern "C"
11998#endif
11999char flock ();
12000int
12001main ()
12002{
12003return flock ();
12004 ;
12005 return 0;
12006}
12007_ACEOF
12008if ac_fn_c_try_link "$LINENO"; then :
12009 ac_cv_lib_bsd_flock=yes
12010else
12011 ac_cv_lib_bsd_flock=no
12012fi
12013rm -f core conftest.err conftest.$ac_objext \
12014 conftest$ac_exeext conftest.$ac_ext
12015LIBS=$ac_check_lib_save_LIBS
12016fi
12017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12018$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012019if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012020 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012021
12022
12023$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12024
12025
12026fi
12027
12028
12029fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012030done
12031
Antoine Pitroua3000072010-09-07 14:52:42 +000012032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033
Matthias Kloseb9621712010-04-24 17:59:49 +000012034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12035$as_echo_n "checking for getpagesize... " >&6; }
12036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012037/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012038
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012039#include <unistd.h>
12040
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012041int
12042main ()
12043{
12044void* p = getpagesize
12045 ;
12046 return 0;
12047}
12048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012049if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012050
Matthias Kloseb9621712010-04-24 17:59:49 +000012051$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012052
Matthias Kloseb159a552010-04-25 21:00:44 +000012053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012054$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012055else
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12057$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012058
12059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012061
Victor Stinner984890f2011-11-24 13:53:38 +010012062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12063$as_echo_n "checking for broken unsetenv... " >&6; }
12064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12065/* end confdefs.h. */
12066
12067#include <stdlib.h>
12068
12069int
12070main ()
12071{
12072int res = unsetenv("DUMMY")
12073 ;
12074 return 0;
12075}
12076_ACEOF
12077if ac_fn_c_try_compile "$LINENO"; then :
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12079$as_echo "no" >&6; }
12080else
12081
12082$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12083
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12085$as_echo "yes" >&6; }
12086
12087fi
12088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12089
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012090for ac_prog in true
12091do
12092 # Extract the first word of "$ac_prog", so it can be a program name with args.
12093set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12095$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012096if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012098else
12099 if test -n "$TRUE"; then
12100 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12101else
12102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12103for as_dir in $PATH
12104do
12105 IFS=$as_save_IFS
12106 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012109 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 $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 +000012111 break 2
12112 fi
12113done
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012115IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012116
12117fi
12118fi
12119TRUE=$ac_cv_prog_TRUE
12120if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12122$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12125$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012126fi
12127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012129 test -n "$TRUE" && break
12130done
12131test -n "$TRUE" || TRUE="/bin/true"
12132
12133
Matthias Kloseb9621712010-04-24 17:59:49 +000012134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12135$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012136if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012137 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012138else
12139 ac_check_lib_save_LIBS=$LIBS
12140LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012142/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012144/* Override any GCC internal prototype to avoid an error.
12145 Use char because int might match the return type of a GCC
12146 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012147#ifdef __cplusplus
12148extern "C"
12149#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012150char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012151int
12152main ()
12153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012155 ;
12156 return 0;
12157}
12158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012160 ac_cv_lib_c_inet_aton=yes
12161else
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012164rm -f core conftest.err conftest.$ac_objext \
12165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012166LIBS=$ac_check_lib_save_LIBS
12167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12169$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012170if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012171 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012172else
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12174$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012175if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012177else
12178 ac_check_lib_save_LIBS=$LIBS
12179LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012181/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183/* Override any GCC internal prototype to avoid an error.
12184 Use char because int might match the return type of a GCC
12185 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012186#ifdef __cplusplus
12187extern "C"
12188#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012189char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012190int
12191main ()
12192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012193return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012194 ;
12195 return 0;
12196}
12197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012198if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012199 ac_cv_lib_resolv_inet_aton=yes
12200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012203rm -f core conftest.err conftest.$ac_objext \
12204 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012205LIBS=$ac_check_lib_save_LIBS
12206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12208$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012210 cat >>confdefs.h <<_ACEOF
12211#define HAVE_LIBRESOLV 1
12212_ACEOF
12213
12214 LIBS="-lresolv $LIBS"
12215
12216fi
12217
12218
12219fi
12220
12221
Christian Heimesd0764e22007-12-04 15:00:33 +000012222# On Tru64, chflags seems to be present, but calling it will
12223# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12225$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012226if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012228else
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012230 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012231else
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012233/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012234
Christian Heimesd0764e22007-12-04 15:00:33 +000012235#include <sys/stat.h>
12236#include <unistd.h>
12237int main(int argc, char*argv[])
12238{
12239 if(chflags(argv[0], 0) != 0)
12240 return 1;
12241 return 0;
12242}
Ned Deily3eb67d52011-06-28 00:00:28 -070012243
Christian Heimesd0764e22007-12-04 15:00:33 +000012244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012245if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012246 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012247else
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12251 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012252fi
12253
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012254
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12257$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012258if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012259 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012260if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012261 ac_cv_have_chflags="yes"
12262else
12263 ac_cv_have_chflags="no"
12264fi
12265
12266fi
12267if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012270
12271fi
12272
Matthias Kloseb9621712010-04-24 17:59:49 +000012273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12274$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012275if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012277else
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012279 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012280else
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012282/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012283
Christian Heimesd0764e22007-12-04 15:00:33 +000012284#include <sys/stat.h>
12285#include <unistd.h>
12286int main(int argc, char*argv[])
12287{
12288 if(lchflags(argv[0], 0) != 0)
12289 return 1;
12290 return 0;
12291}
Ned Deily3eb67d52011-06-28 00:00:28 -070012292
Christian Heimesd0764e22007-12-04 15:00:33 +000012293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012294if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012295 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012296else
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012299rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12300 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012301fi
12302
12303
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12306$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012307if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012308 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012309if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012310 ac_cv_have_lchflags="yes"
12311else
12312 ac_cv_have_lchflags="no"
12313fi
12314
12315fi
12316if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012317
Matthias Kloseb9621712010-04-24 17:59:49 +000012318$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012319
12320fi
12321
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012322case $ac_sys_system/$ac_sys_release in
12323Darwin/*)
12324 _CUR_CFLAGS="${CFLAGS}"
12325 _CUR_LDFLAGS="${LDFLAGS}"
12326 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12327 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12328 ;;
12329esac
12330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12332$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012333if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012335else
12336 ac_check_lib_save_LIBS=$LIBS
12337LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012339/* end confdefs.h. */
12340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012341/* Override any GCC internal prototype to avoid an error.
12342 Use char because int might match the return type of a GCC
12343 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012344#ifdef __cplusplus
12345extern "C"
12346#endif
12347char inflateCopy ();
12348int
12349main ()
12350{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012351return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012352 ;
12353 return 0;
12354}
12355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012356if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012357 ac_cv_lib_z_inflateCopy=yes
12358else
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012361rm -f core conftest.err conftest.$ac_objext \
12362 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012363LIBS=$ac_check_lib_save_LIBS
12364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12366$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012367if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012368
Matthias Kloseb9621712010-04-24 17:59:49 +000012369$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012370
12371fi
12372
12373
12374case $ac_sys_system/$ac_sys_release in
12375Darwin/*)
12376 CFLAGS="${_CUR_CFLAGS}"
12377 LDFLAGS="${_CUR_LDFLAGS}"
12378 ;;
12379esac
12380
Matthias Kloseb9621712010-04-24 17:59:49 +000012381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12382$as_echo_n "checking for hstrerror... " >&6; }
12383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012384/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012385
Martin v. Löwise9416172003-05-03 10:12:45 +000012386#include <netdb.h>
12387
Martin v. Löwise9416172003-05-03 10:12:45 +000012388int
12389main ()
12390{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012391void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012392 ;
12393 return 0;
12394}
12395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012397
Matthias Kloseb9621712010-04-24 17:59:49 +000012398$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012399
Matthias Kloseb159a552010-04-25 21:00:44 +000012400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012401$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012402else
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12404$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012405
12406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012407rm -f core conftest.err conftest.$ac_objext \
12408 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409
Matthias Kloseb9621712010-04-24 17:59:49 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12411$as_echo_n "checking for inet_aton... " >&6; }
12412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012413/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012414
Martin v. Löwis86d66262006-02-17 08:40:11 +000012415#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012416#include <sys/socket.h>
12417#include <netinet/in.h>
12418#include <arpa/inet.h>
12419
Martin v. Löwise9416172003-05-03 10:12:45 +000012420int
12421main ()
12422{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012423void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012424 ;
12425 return 0;
12426}
12427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012428if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012429
Matthias Kloseb9621712010-04-24 17:59:49 +000012430$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012431
Matthias Kloseb159a552010-04-25 21:00:44 +000012432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012433$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012434else
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12436$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012437
12438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012439rm -f core conftest.err conftest.$ac_objext \
12440 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441
Matthias Kloseb9621712010-04-24 17:59:49 +000012442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12443$as_echo_n "checking for inet_pton... " >&6; }
12444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012445/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012446
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012447#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012448#include <sys/socket.h>
12449#include <netinet/in.h>
12450#include <arpa/inet.h>
12451
Martin v. Löwise9416172003-05-03 10:12:45 +000012452int
12453main ()
12454{
12455void* p = inet_pton
12456 ;
12457 return 0;
12458}
12459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012461
Matthias Kloseb9621712010-04-24 17:59:49 +000012462$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012463
Matthias Kloseb159a552010-04-25 21:00:44 +000012464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012465$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012466else
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12468$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012469
12470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012472
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012473# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12475$as_echo_n "checking for setgroups... " >&6; }
12476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012477/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012478
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012479#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012480#ifdef HAVE_GRP_H
12481#include <grp.h>
12482#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012483
Martin v. Löwisd5843682002-11-21 20:41:28 +000012484int
12485main ()
12486{
12487void* p = setgroups
12488 ;
12489 return 0;
12490}
12491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012492if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012493
Matthias Kloseb9621712010-04-24 17:59:49 +000012494$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012495
Matthias Kloseb159a552010-04-25 21:00:44 +000012496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012497$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012498else
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12500$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012501
12502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012504
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012505# check for openpty and forkpty
12506
12507for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012508do :
12509 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012510if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012511 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012512#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012513_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012514
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012515else
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12517$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012518if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012520else
Martin v. Löwis11437992002-04-12 09:54:03 +000012521 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012522LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526/* Override any GCC internal prototype to avoid an error.
12527 Use char because int might match the return type of a GCC
12528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012529#ifdef __cplusplus
12530extern "C"
12531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012532char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012533int
12534main ()
12535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 ;
12538 return 0;
12539}
12540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012541if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012542 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012543else
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012546rm -f core conftest.err conftest.$ac_objext \
12547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012548LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12551$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012552if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012554 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012555else
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12557$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012558if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012560else
12561 ac_check_lib_save_LIBS=$LIBS
12562LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012564/* end confdefs.h. */
12565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012566/* Override any GCC internal prototype to avoid an error.
12567 Use char because int might match the return type of a GCC
12568 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012569#ifdef __cplusplus
12570extern "C"
12571#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012572char openpty ();
12573int
12574main ()
12575{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012576return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012577 ;
12578 return 0;
12579}
12580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012581if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012582 ac_cv_lib_bsd_openpty=yes
12583else
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012586rm -f core conftest.err conftest.$ac_objext \
12587 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012588LIBS=$ac_check_lib_save_LIBS
12589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12591$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012592if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012593 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012594 LIBS="$LIBS -lbsd"
12595fi
12596
12597
12598fi
12599
Fred Drake8cef4cf2000-06-28 16:40:38 +000012600
12601fi
12602done
12603
12604for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012605do :
12606 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012607if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012609#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012610_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012611
Fred Drake8cef4cf2000-06-28 16:40:38 +000012612else
Matthias Kloseb9621712010-04-24 17:59:49 +000012613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12614$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012615if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012617else
Martin v. Löwis11437992002-04-12 09:54:03 +000012618 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012619LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012623/* Override any GCC internal prototype to avoid an error.
12624 Use char because int might match the return type of a GCC
12625 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012626#ifdef __cplusplus
12627extern "C"
12628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012629char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012630int
12631main ()
12632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 ;
12635 return 0;
12636}
12637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012638if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012639 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012640else
Matthias Kloseb9621712010-04-24 17:59:49 +000012641 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012643rm -f core conftest.err conftest.$ac_objext \
12644 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012645LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12648$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012649if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012650 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012651 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012652else
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12654$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012655if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012657else
12658 ac_check_lib_save_LIBS=$LIBS
12659LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012661/* end confdefs.h. */
12662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012663/* Override any GCC internal prototype to avoid an error.
12664 Use char because int might match the return type of a GCC
12665 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012666#ifdef __cplusplus
12667extern "C"
12668#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012669char forkpty ();
12670int
12671main ()
12672{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012674 ;
12675 return 0;
12676}
12677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012678if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012679 ac_cv_lib_bsd_forkpty=yes
12680else
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012683rm -f core conftest.err conftest.$ac_objext \
12684 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012685LIBS=$ac_check_lib_save_LIBS
12686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12688$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012689if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012691 LIBS="$LIBS -lbsd"
12692fi
12693
12694
12695fi
12696
Fred Drake8cef4cf2000-06-28 16:40:38 +000012697
12698fi
12699done
12700
Jack Jansendd19cf82001-12-06 22:36:17 +000012701
Michael W. Hudson54241132001-12-07 15:38:26 +000012702# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012703for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012704do :
12705 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12706ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012707if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012709#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012710_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012711
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012713done
12714
Michael W. Hudson54241132001-12-07 15:38:26 +000012715
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012716ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012717if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012718 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012719
Martin v. Löwis1142de32002-03-29 16:28:31 +000012720else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012722 *" dup2.$ac_objext "* ) ;;
12723 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012725esac
12726
Martin v. Löwis1142de32002-03-29 16:28:31 +000012727fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012728
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012729ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012730if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012731 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12732
12733else
12734 case " $LIBOBJS " in
12735 *" strdup.$ac_objext "* ) ;;
12736 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12737 ;;
12738esac
12739
12740fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012741
12742
12743for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012744do :
12745 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012746if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012748#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012751/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012752#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012753int
12754main ()
12755{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012756getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012757 ;
12758 return 0;
12759}
12760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012764
Guido van Rossum627b2d71993-12-24 10:39:16 +000012765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012767
Guido van Rossum627b2d71993-12-24 10:39:16 +000012768fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012769done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012770
Jack Jansen150753c2003-03-29 22:07:47 +000012771for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012772do :
12773 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012774if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012775 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012776#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012779/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012780#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012781int
12782main ()
12783{
12784setpgrp(0,0);
12785 ;
12786 return 0;
12787}
12788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012789if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012790
Matthias Kloseb9621712010-04-24 17:59:49 +000012791$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012792
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012795
12796fi
12797done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012798
Michael W. Hudson54241132001-12-07 15:38:26 +000012799
Gregory P. Smith387512c2018-12-30 15:42:32 -080012800# We search for both crypt and crypt_r as one or the other may be defined
12801# This gets us our -lcrypt in LIBS when required on the target platform.
12802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12803$as_echo_n "checking for library containing crypt... " >&6; }
12804if ${ac_cv_search_crypt+:} false; then :
12805 $as_echo_n "(cached) " >&6
12806else
12807 ac_func_search_save_LIBS=$LIBS
12808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12809/* end confdefs.h. */
12810
12811/* Override any GCC internal prototype to avoid an error.
12812 Use char because int might match the return type of a GCC
12813 builtin and then its argument prototype would still apply. */
12814#ifdef __cplusplus
12815extern "C"
12816#endif
12817char crypt ();
12818int
12819main ()
12820{
12821return crypt ();
12822 ;
12823 return 0;
12824}
12825_ACEOF
12826for ac_lib in '' crypt; do
12827 if test -z "$ac_lib"; then
12828 ac_res="none required"
12829 else
12830 ac_res=-l$ac_lib
12831 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12832 fi
12833 if ac_fn_c_try_link "$LINENO"; then :
12834 ac_cv_search_crypt=$ac_res
12835fi
12836rm -f core conftest.err conftest.$ac_objext \
12837 conftest$ac_exeext
12838 if ${ac_cv_search_crypt+:} false; then :
12839 break
12840fi
12841done
12842if ${ac_cv_search_crypt+:} false; then :
12843
12844else
12845 ac_cv_search_crypt=no
12846fi
12847rm conftest.$ac_ext
12848LIBS=$ac_func_search_save_LIBS
12849fi
12850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12851$as_echo "$ac_cv_search_crypt" >&6; }
12852ac_res=$ac_cv_search_crypt
12853if test "$ac_res" != no; then :
12854 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12855
12856fi
12857
12858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12859$as_echo_n "checking for library containing crypt_r... " >&6; }
12860if ${ac_cv_search_crypt_r+:} false; then :
12861 $as_echo_n "(cached) " >&6
12862else
12863 ac_func_search_save_LIBS=$LIBS
12864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12865/* end confdefs.h. */
12866
12867/* Override any GCC internal prototype to avoid an error.
12868 Use char because int might match the return type of a GCC
12869 builtin and then its argument prototype would still apply. */
12870#ifdef __cplusplus
12871extern "C"
12872#endif
12873char crypt_r ();
12874int
12875main ()
12876{
12877return crypt_r ();
12878 ;
12879 return 0;
12880}
12881_ACEOF
12882for ac_lib in '' crypt; do
12883 if test -z "$ac_lib"; then
12884 ac_res="none required"
12885 else
12886 ac_res=-l$ac_lib
12887 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12888 fi
12889 if ac_fn_c_try_link "$LINENO"; then :
12890 ac_cv_search_crypt_r=$ac_res
12891fi
12892rm -f core conftest.err conftest.$ac_objext \
12893 conftest$ac_exeext
12894 if ${ac_cv_search_crypt_r+:} false; then :
12895 break
12896fi
12897done
12898if ${ac_cv_search_crypt_r+:} false; then :
12899
12900else
12901 ac_cv_search_crypt_r=no
12902fi
12903rm conftest.$ac_ext
12904LIBS=$ac_func_search_save_LIBS
12905fi
12906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12907$as_echo "$ac_cv_search_crypt_r" >&6; }
12908ac_res=$ac_cv_search_crypt_r
12909if test "$ac_res" != no; then :
12910 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12911
12912fi
12913
12914
12915ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12916if test "x$ac_cv_func_crypt_r" = xyes; then :
12917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12918/* end confdefs.h. */
12919
12920#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12921#include <crypt.h>
12922
12923int
12924main ()
12925{
12926
12927struct crypt_data d;
12928char *r = crypt_r("", "", &d);
12929
12930 ;
12931 return 0;
12932}
12933_ACEOF
12934if ac_fn_c_try_compile "$LINENO"; then :
12935
12936$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12937
12938fi
12939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12940
12941fi
12942
12943
Victor Stinnere0be4232011-10-25 13:06:09 +020012944for ac_func in clock_gettime
12945do :
12946 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12947if test "x$ac_cv_func_clock_gettime" = xyes; then :
12948 cat >>confdefs.h <<_ACEOF
12949#define HAVE_CLOCK_GETTIME 1
12950_ACEOF
12951
12952else
12953
12954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12955$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12956if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12957 $as_echo_n "(cached) " >&6
12958else
12959 ac_check_lib_save_LIBS=$LIBS
12960LIBS="-lrt $LIBS"
12961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12962/* end confdefs.h. */
12963
12964/* Override any GCC internal prototype to avoid an error.
12965 Use char because int might match the return type of a GCC
12966 builtin and then its argument prototype would still apply. */
12967#ifdef __cplusplus
12968extern "C"
12969#endif
12970char clock_gettime ();
12971int
12972main ()
12973{
12974return clock_gettime ();
12975 ;
12976 return 0;
12977}
12978_ACEOF
12979if ac_fn_c_try_link "$LINENO"; then :
12980 ac_cv_lib_rt_clock_gettime=yes
12981else
12982 ac_cv_lib_rt_clock_gettime=no
12983fi
12984rm -f core conftest.err conftest.$ac_objext \
12985 conftest$ac_exeext conftest.$ac_ext
12986LIBS=$ac_check_lib_save_LIBS
12987fi
12988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12989$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12990if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12991
Victor Stinner7efb8332014-08-29 15:41:08 +020012992 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012993 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12994
12995
12996$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12997
12998
12999fi
13000
13001
13002fi
13003done
13004
13005
13006for ac_func in clock_getres
13007do :
13008 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13009if test "x$ac_cv_func_clock_getres" = xyes; then :
13010 cat >>confdefs.h <<_ACEOF
13011#define HAVE_CLOCK_GETRES 1
13012_ACEOF
13013
13014else
13015
13016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13017$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13018if ${ac_cv_lib_rt_clock_getres+:} false; then :
13019 $as_echo_n "(cached) " >&6
13020else
13021 ac_check_lib_save_LIBS=$LIBS
13022LIBS="-lrt $LIBS"
13023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13024/* end confdefs.h. */
13025
13026/* Override any GCC internal prototype to avoid an error.
13027 Use char because int might match the return type of a GCC
13028 builtin and then its argument prototype would still apply. */
13029#ifdef __cplusplus
13030extern "C"
13031#endif
13032char clock_getres ();
13033int
13034main ()
13035{
13036return clock_getres ();
13037 ;
13038 return 0;
13039}
13040_ACEOF
13041if ac_fn_c_try_link "$LINENO"; then :
13042 ac_cv_lib_rt_clock_getres=yes
13043else
13044 ac_cv_lib_rt_clock_getres=no
13045fi
13046rm -f core conftest.err conftest.$ac_objext \
13047 conftest$ac_exeext conftest.$ac_ext
13048LIBS=$ac_check_lib_save_LIBS
13049fi
13050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13051$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13052if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13053
13054 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13055
13056
13057fi
13058
13059
13060fi
13061done
13062
13063
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013064for ac_func in clock_settime
13065do :
13066 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13067if test "x$ac_cv_func_clock_settime" = xyes; then :
13068 cat >>confdefs.h <<_ACEOF
13069#define HAVE_CLOCK_SETTIME 1
13070_ACEOF
13071
13072else
13073
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13075$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13076if ${ac_cv_lib_rt_clock_settime+:} false; then :
13077 $as_echo_n "(cached) " >&6
13078else
13079 ac_check_lib_save_LIBS=$LIBS
13080LIBS="-lrt $LIBS"
13081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13082/* end confdefs.h. */
13083
13084/* Override any GCC internal prototype to avoid an error.
13085 Use char because int might match the return type of a GCC
13086 builtin and then its argument prototype would still apply. */
13087#ifdef __cplusplus
13088extern "C"
13089#endif
13090char clock_settime ();
13091int
13092main ()
13093{
13094return clock_settime ();
13095 ;
13096 return 0;
13097}
13098_ACEOF
13099if ac_fn_c_try_link "$LINENO"; then :
13100 ac_cv_lib_rt_clock_settime=yes
13101else
13102 ac_cv_lib_rt_clock_settime=no
13103fi
13104rm -f core conftest.err conftest.$ac_objext \
13105 conftest$ac_exeext conftest.$ac_ext
13106LIBS=$ac_check_lib_save_LIBS
13107fi
13108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13109$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13110if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13111
13112 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13113
13114
13115fi
13116
13117
13118fi
13119done
13120
13121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13123$as_echo_n "checking for major... " >&6; }
13124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013125/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013126
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013127#if defined(MAJOR_IN_MKDEV)
13128#include <sys/mkdev.h>
13129#elif defined(MAJOR_IN_SYSMACROS)
13130#include <sys/sysmacros.h>
13131#else
13132#include <sys/types.h>
13133#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013134
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013135int
13136main ()
13137{
13138
13139 makedev(major(0),minor(0));
13140
13141 ;
13142 return 0;
13143}
13144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013145if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013146
13147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013149
Matthias Kloseb9621712010-04-24 17:59:49 +000013150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13151$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013152
13153else
Skip Montanaro6dead952003-09-25 14:50:04 +000013154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13156$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013157
13158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013159rm -f core conftest.err conftest.$ac_objext \
13160 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013161
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013162# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013163# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13165$as_echo_n "checking for getaddrinfo... " >&6; }
13166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013167/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013168
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013169#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013170#include <sys/socket.h>
13171#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013172#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013173
Martin v. Löwis11437992002-04-12 09:54:03 +000013174int
13175main ()
13176{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013177getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 ;
13179 return 0;
13180}
13181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013182if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013183 have_getaddrinfo=yes
13184else
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013187rm -f core conftest.err conftest.$ac_objext \
13188 conftest$ac_exeext conftest.$ac_ext
13189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13190$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013191if test $have_getaddrinfo = yes
13192then
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13194$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013195 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013196 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013197else
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013199
13200if test "${enable_ipv6+set}" = set; then
13201 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13202else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013203 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013204fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013205else
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013207/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013208
Stefan Krah19c21392012-11-22 23:47:32 +010013209#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013210#include <sys/types.h>
13211#include <netdb.h>
13212#include <string.h>
13213#include <sys/socket.h>
13214#include <netinet/in.h>
13215
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013216int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013217{
13218 int passive, gaierr, inet4 = 0, inet6 = 0;
13219 struct addrinfo hints, *ai, *aitop;
13220 char straddr[INET6_ADDRSTRLEN], strport[16];
13221
13222 for (passive = 0; passive <= 1; passive++) {
13223 memset(&hints, 0, sizeof(hints));
13224 hints.ai_family = AF_UNSPEC;
13225 hints.ai_flags = passive ? AI_PASSIVE : 0;
13226 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013227 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013228 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13229 (void)gai_strerror(gaierr);
13230 goto bad;
13231 }
13232 for (ai = aitop; ai; ai = ai->ai_next) {
13233 if (ai->ai_addr == NULL ||
13234 ai->ai_addrlen == 0 ||
13235 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13236 straddr, sizeof(straddr), strport, sizeof(strport),
13237 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13238 goto bad;
13239 }
13240 switch (ai->ai_family) {
13241 case AF_INET:
13242 if (strcmp(strport, "54321") != 0) {
13243 goto bad;
13244 }
13245 if (passive) {
13246 if (strcmp(straddr, "0.0.0.0") != 0) {
13247 goto bad;
13248 }
13249 } else {
13250 if (strcmp(straddr, "127.0.0.1") != 0) {
13251 goto bad;
13252 }
13253 }
13254 inet4++;
13255 break;
13256 case AF_INET6:
13257 if (strcmp(strport, "54321") != 0) {
13258 goto bad;
13259 }
13260 if (passive) {
13261 if (strcmp(straddr, "::") != 0) {
13262 goto bad;
13263 }
13264 } else {
13265 if (strcmp(straddr, "::1") != 0) {
13266 goto bad;
13267 }
13268 }
13269 inet6++;
13270 break;
13271 case AF_UNSPEC:
13272 goto bad;
13273 break;
13274 default:
13275 /* another family support? */
13276 break;
13277 }
13278 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013279 freeaddrinfo(aitop);
13280 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013281 }
13282
13283 if (!(inet4 == 0 || inet4 == 2))
13284 goto bad;
13285 if (!(inet6 == 0 || inet6 == 2))
13286 goto bad;
13287
13288 if (aitop)
13289 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013290 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013291
13292 bad:
13293 if (aitop)
13294 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013295 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013296}
13297
Martin v. Löwis11437992002-04-12 09:54:03 +000013298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013299if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013300 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13305 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013307
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013308fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013309
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013311
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13313$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13314
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013315if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013316then
13317 if test $ipv6 = yes
13318 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013319 echo 'Fatal: You must get working getaddrinfo() function.'
13320 echo ' or you can specify "--disable-ipv6"'.
13321 exit 1
13322 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013323else
Martin v. Löwis11437992002-04-12 09:54:03 +000013324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013326
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013327fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013328
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013329for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013330do :
13331 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013332if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013333 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013335_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013336
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013337fi
13338done
13339
Michael W. Hudson54241132001-12-07 15:38:26 +000013340
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13343$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013344if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013348/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349#include <sys/types.h>
13350#include <sys/time.h>
13351#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013352
Martin v. Löwis11437992002-04-12 09:54:03 +000013353int
13354main ()
13355{
13356if ((struct tm *) 0)
13357return 0;
13358 ;
13359 return 0;
13360}
13361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013362if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013363 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13370$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013371if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013374
13375fi
13376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13378$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013379if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013381else
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013383/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013384#include <sys/types.h>
13385#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013386
Martin v. Löwis11437992002-04-12 09:54:03 +000013387int
13388main ()
13389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013390struct tm tm;
13391 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 ;
13394 return 0;
13395}
13396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013397if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398 ac_cv_struct_tm=time.h
13399else
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13405$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013406if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013409
13410fi
13411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412ac_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 +000013413#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415"
Victor Stinnere0be4232011-10-25 13:06:09 +020013416if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
13418cat >>confdefs.h <<_ACEOF
13419#define HAVE_STRUCT_TM_TM_ZONE 1
13420_ACEOF
13421
13422
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013423fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013424
Martin v. Löwis11437992002-04-12 09:54:03 +000013425if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013428
13429else
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13431"
Victor Stinnere0be4232011-10-25 13:06:09 +020013432if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013434else
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013436fi
13437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013438cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013439#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013440_ACEOF
13441
Matthias Kloseb9621712010-04-24 17:59:49 +000013442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13443$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013444if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446else
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013448/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013449#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013450#if !HAVE_DECL_TZNAME
13451extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
Martin v. Löwis11437992002-04-12 09:54:03 +000013454int
13455main ()
13456{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013457return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013458 ;
13459 return 0;
13460}
13461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013462if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013463 ac_cv_var_tzname=yes
13464else
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013467rm -f core conftest.err conftest.$ac_objext \
13468 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13471$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013472 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013473
Matthias Kloseb9621712010-04-24 17:59:49 +000013474$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013475
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476 fi
13477fi
13478
Matthias Kloseb9621712010-04-24 17:59:49 +000013479ac_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 +020013480if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013481
13482cat >>confdefs.h <<_ACEOF
13483#define HAVE_STRUCT_STAT_ST_RDEV 1
13484_ACEOF
13485
13486
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013487fi
13488
Matthias Kloseb9621712010-04-24 17:59:49 +000013489ac_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 +020013490if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013491
Martin v. Löwis11437992002-04-12 09:54:03 +000013492cat >>confdefs.h <<_ACEOF
13493#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13494_ACEOF
13495
13496
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013497fi
13498
Matthias Kloseb9621712010-04-24 17:59:49 +000013499ac_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 +020013500if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013501
13502cat >>confdefs.h <<_ACEOF
13503#define HAVE_STRUCT_STAT_ST_FLAGS 1
13504_ACEOF
13505
13506
13507fi
13508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509ac_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 +020013510if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013511
13512cat >>confdefs.h <<_ACEOF
13513#define HAVE_STRUCT_STAT_ST_GEN 1
13514_ACEOF
13515
13516
13517fi
13518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519ac_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 +020013520if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013521
13522cat >>confdefs.h <<_ACEOF
13523#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13524_ACEOF
13525
13526
13527fi
13528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529ac_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 +020013530if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532cat >>confdefs.h <<_ACEOF
13533#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13534_ACEOF
13535
13536
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013537fi
13538
Stefan Krah267b6392016-04-26 01:09:18 +020013539ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13540 #include <sys/types.h>
13541 #include <pwd.h>
13542
13543"
13544if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13545
13546cat >>confdefs.h <<_ACEOF
13547#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13548_ACEOF
13549
13550
13551fi
13552ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13553 #include <sys/types.h>
13554 #include <pwd.h>
13555
13556"
13557if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13558
13559cat >>confdefs.h <<_ACEOF
13560#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13561_ACEOF
13562
13563
13564fi
13565
Zachary Ware6a6967e2016-10-01 00:47:27 -050013566# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13567ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13568"
13569if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13570
13571cat >>confdefs.h <<_ACEOF
13572#define HAVE_SIGINFO_T_SI_BAND 1
13573_ACEOF
13574
13575
13576fi
13577
Michael W. Hudson54241132001-12-07 15:38:26 +000013578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13580$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013581if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013583else
Matthias Kloseb159a552010-04-25 21:00:44 +000013584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013586/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013587#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013588int
13589main ()
13590{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013591return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013592 ;
13593 return 0;
13594}
13595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013597 ac_cv_header_time_altzone=yes
13598else
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013603fi
13604
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13606$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013607if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013610
13611fi
13612
Guido van Rossumda88dad1995-01-26 00:46:29 +000013613was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13615$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013617/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013618
13619#include <sys/types.h>
13620#include <sys/select.h>
13621#include <sys/time.h>
13622
Martin v. Löwis11437992002-04-12 09:54:03 +000013623int
13624main ()
13625{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013626;
Martin v. Löwis11437992002-04-12 09:54:03 +000013627 ;
13628 return 0;
13629}
13630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013632
13633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013635
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013636 was_it_defined=yes
13637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13641$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13644$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013645if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013647else
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013649/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013650#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013651int
13652main ()
13653{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013654struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013655 ;
13656 return 0;
13657}
13658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013659if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013660 ac_cv_struct_addrinfo=yes
13661else
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13665fi
13666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13668$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013669if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013672
13673fi
13674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13676$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013677if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013679else
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013681/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013682
13683# include <sys/types.h>
13684# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013685int
13686main ()
13687{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013688struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 ;
13690 return 0;
13691}
13692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013694 ac_cv_struct_sockaddr_storage=yes
13695else
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13699fi
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13702$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013703if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013706
13707fi
13708
Christian Heimesdffa3942016-09-05 23:54:41 +020013709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13710$as_echo_n "checking for sockaddr_alg... " >&6; }
13711if ${ac_cv_struct_sockaddr_alg+:} false; then :
13712 $as_echo_n "(cached) " >&6
13713else
13714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13715/* end confdefs.h. */
13716
13717# include <sys/types.h>
13718# include <sys/socket.h>
13719# include <linux/if_alg.h>
13720int
13721main ()
13722{
13723struct sockaddr_alg s
13724 ;
13725 return 0;
13726}
13727_ACEOF
13728if ac_fn_c_try_compile "$LINENO"; then :
13729 ac_cv_struct_sockaddr_alg=yes
13730else
13731 ac_cv_struct_sockaddr_alg=no
13732fi
13733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13734fi
13735
13736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13737$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13738if test $ac_cv_struct_sockaddr_alg = yes; then
13739
13740$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13741
13742fi
13743
Guido van Rossum627b2d71993-12-24 10:39:16 +000013744# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013745
Matthias Kloseb9621712010-04-24 17:59:49 +000013746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13747$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013748if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013749 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013750else
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013753$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013754int
13755main ()
13756{
13757static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013758test_array [0] = 0;
13759return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013760
13761 ;
13762 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013763}
Martin v. Löwis11437992002-04-12 09:54:03 +000013764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013765if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013766 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013767else
Matthias Kloseb9621712010-04-24 17:59:49 +000013768 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13773$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013774if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013776
13777fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13780$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013781if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013783else
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013785/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786
Martin v. Löwis11437992002-04-12 09:54:03 +000013787int
13788main ()
13789{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013790
Martin v. Löwis11437992002-04-12 09:54:03 +000013791#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013792 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013794 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013796 char const *const *pcpcc;
13797 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 /* NEC SVR4.0.2 mips cc rejects this. */
13799 struct point {int x, y;};
13800 static struct point const zero = {0,0};
13801 /* AIX XL C 1.02.0.0 rejects this.
13802 It does not let you subtract one const X* pointer from another in
13803 an arm of an if-expression whose if-part is not a constant
13804 expression */
13805 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013806 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013808 ++pcpcc;
13809 ppc = (char**) pcpcc;
13810 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013811 { /* SCO 3.2v4 cc rejects this sort of thing. */
13812 char tx;
13813 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013815
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013817 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013818 }
13819 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13820 int x[] = {25, 17};
13821 const int *foo = &x[0];
13822 ++foo;
13823 }
13824 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13825 typedef const int *iptr;
13826 iptr p = 0;
13827 ++p;
13828 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013829 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013830 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013831 struct s { int j; const int *ap[3]; } bx;
13832 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 }
13834 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13835 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013838 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013839#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013840
Martin v. Löwis11437992002-04-12 09:54:03 +000013841 ;
13842 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013843}
Martin v. Löwis11437992002-04-12 09:54:03 +000013844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013845if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013846 ac_cv_c_const=yes
13847else
Matthias Kloseb9621712010-04-24 17:59:49 +000013848 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13853$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013854if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857
13858fi
13859
Michael W. Hudson54241132001-12-07 15:38:26 +000013860
Guido van Rossumda88dad1995-01-26 00:46:29 +000013861works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13863$as_echo_n "checking for working signed char... " >&6; }
13864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013865/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013866
Martin v. Löwis11437992002-04-12 09:54:03 +000013867int
13868main ()
13869{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013870signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013871 ;
13872 return 0;
13873}
13874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013875if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013876 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013877else
Skip Montanaro6dead952003-09-25 14:50:04 +000013878
Matthias Kloseb9621712010-04-24 17:59:49 +000013879$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013880
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013881
Guido van Rossum7f43da71994-08-01 12:15:30 +000013882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13885$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013886
Guido van Rossumda88dad1995-01-26 00:46:29 +000013887have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13889$as_echo_n "checking for prototypes... " >&6; }
13890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013891/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013892int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013893int
13894main ()
13895{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013896return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 ;
13898 return 0;
13899}
13900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013904
Matthias Kloseb159a552010-04-25 21:00:44 +000013905 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13909$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013910
Guido van Rossumda88dad1995-01-26 00:46:29 +000013911works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13913$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013915/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013916
13917#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013918int foo(int x, ...) {
13919 va_list va;
13920 va_start(va, x);
13921 va_arg(va, int);
13922 va_arg(va, char *);
13923 va_arg(va, double);
13924 return 0;
13925}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013926
Martin v. Löwis11437992002-04-12 09:54:03 +000013927int
13928main ()
13929{
Guido van Rossum90eea071996-08-30 20:58:57 +000013930return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 ;
13932 return 0;
13933}
13934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013935if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013936
13937
Matthias Kloseb9621712010-04-24 17:59:49 +000013938$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013939
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013940 works=yes
13941
Guido van Rossum627b2d71993-12-24 10:39:16 +000013942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13945$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013946
Martin v. Löwisd6320502004-08-12 13:45:08 +000013947# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13949$as_echo_n "checking for socketpair... " >&6; }
13950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013951/* end confdefs.h. */
13952
13953#include <sys/types.h>
13954#include <sys/socket.h>
13955
13956int
13957main ()
13958{
13959void *x=socketpair
13960 ;
13961 return 0;
13962}
13963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013964if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013965
Matthias Kloseb9621712010-04-24 17:59:49 +000013966$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013967
Matthias Kloseb159a552010-04-25 21:00:44 +000013968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013969$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013970else
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13972$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013973
13974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013976
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013977# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13979$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013981/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013982#include <sys/types.h>
13983#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013984int
13985main ()
13986{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013987struct sockaddr x;
13988x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 ;
13990 return 0;
13991}
13992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013993if ac_fn_c_try_compile "$LINENO"; then :
13994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13995$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
Matthias Kloseb9621712010-04-24 17:59:49 +000013997$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013998
13999else
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14001$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014002
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014005
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014006# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014007
14008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014010if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014011
Matthias Kloseb9621712010-04-24 17:59:49 +000014012 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014013
Matthias Kloseb9621712010-04-24 17:59:49 +000014014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14015$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014016 OLD_CFLAGS=$CFLAGS
14017 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014019/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014020
14021# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
Martin v. Löwis11437992002-04-12 09:54:03 +000014023int
14024main ()
14025{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014026
14027 char *name;
14028 struct hostent *he, *res;
14029 char buffer[2048];
14030 int buflen = 2048;
14031 int h_errnop;
14032
14033 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014034
14035 ;
14036 return 0;
14037}
14038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014039if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014040
Matthias Kloseb9621712010-04-24 17:59:49 +000014041 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014042
Martin v. Löwis11437992002-04-12 09:54:03 +000014043
Matthias Kloseb9621712010-04-24 17:59:49 +000014044$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14047$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014048
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014049else
Skip Montanaro6dead952003-09-25 14:50:04 +000014050
Matthias Kloseb9621712010-04-24 17:59:49 +000014051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14052$as_echo "no" >&6; }
14053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14054$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014056/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014057
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014058# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014059
Martin v. Löwis11437992002-04-12 09:54:03 +000014060int
14061main ()
14062{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063
14064 char *name;
14065 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014066 char buffer[2048];
14067 int buflen = 2048;
14068 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014069
Matthias Kloseb159a552010-04-25 21:00:44 +000014070 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014071
14072 ;
14073 return 0;
14074}
14075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014076if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014079
Martin v. Löwis11437992002-04-12 09:54:03 +000014080
Matthias Kloseb159a552010-04-25 21:00:44 +000014081$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014082
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14084$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014085
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014086else
Skip Montanaro6dead952003-09-25 14:50:04 +000014087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14089$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14091$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14093/* end confdefs.h. */
14094
14095# include <netdb.h>
14096
14097int
14098main ()
14099{
14100
14101 char *name;
14102 struct hostent *he;
14103 struct hostent_data data;
14104
14105 (void) gethostbyname_r(name, he, &data);
14106
14107 ;
14108 return 0;
14109}
14110_ACEOF
14111if ac_fn_c_try_compile "$LINENO"; then :
14112
14113 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14114
14115
14116$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14117
14118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14119$as_echo "yes" >&6; }
14120
14121else
14122
14123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14124$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014125
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014128
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014131
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014134 CFLAGS=$OLD_CFLAGS
14135
14136else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014137
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 for ac_func in gethostbyname
14139do :
14140 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014141if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014142 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014143#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014144_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014145
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014146fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014147done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014148
Michael W. Hudson54241132001-12-07 15:38:26 +000014149
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014150fi
14151
Michael W. Hudson54241132001-12-07 15:38:26 +000014152
14153
14154
14155
14156
14157
Guido van Rossum627b2d71993-12-24 10:39:16 +000014158# checks for system services
14159# (none yet)
14160
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014161# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014162ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014163if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014164
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014165else
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14167$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014168if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014170else
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014172LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014176/* Override any GCC internal prototype to avoid an error.
14177 Use char because int might match the return type of a GCC
14178 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014179#ifdef __cplusplus
14180extern "C"
14181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014182char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014183int
14184main ()
14185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014187 ;
14188 return 0;
14189}
14190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014193else
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014196rm -f core conftest.err conftest.$ac_objext \
14197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014198LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14201$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014202if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014203 cat >>confdefs.h <<_ACEOF
14204#define HAVE_LIBIEEE 1
14205_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014206
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014207 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014208
Guido van Rossum627b2d71993-12-24 10:39:16 +000014209fi
14210
Michael W. Hudson54241132001-12-07 15:38:26 +000014211
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014212fi
14213
Michael W. Hudson54241132001-12-07 15:38:26 +000014214
Guido van Rossum7f43da71994-08-01 12:15:30 +000014215# check for --with-libm=...
14216
Guido van Rossum563e7081996-09-10 18:20:48 +000014217case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014218Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014219*) LIBM=-lm
14220esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14222$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014225if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014226 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014227if test "$withval" = no
14228then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14230$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014231elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014232then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14234$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014235else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014236fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014237else
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14239$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240fi
14241
Guido van Rossum7f43da71994-08-01 12:15:30 +000014242
14243# check for --with-libc=...
14244
Matthias Kloseb9621712010-04-24 17:59:49 +000014245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14246$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014249if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014251if test "$withval" = no
14252then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14254$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014255elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014256then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14258$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014259else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014260fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014261else
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14263$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014264fi
14265
Guido van Rossum7f43da71994-08-01 12:15:30 +000014266
Stefan Krah1919b7e2012-03-21 18:25:23 +010014267# **************************************
14268# * Check for gcc x64 inline assembler *
14269# **************************************
14270
14271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14272$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14274/* end confdefs.h. */
14275
14276int
14277main ()
14278{
14279
14280 __asm__ __volatile__ ("movq %rcx, %rax");
14281
14282 ;
14283 return 0;
14284}
14285_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014286if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014287 have_gcc_asm_for_x64=yes
14288else
14289 have_gcc_asm_for_x64=no
14290fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014291rm -f core conftest.err conftest.$ac_objext \
14292 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14294$as_echo "$have_gcc_asm_for_x64" >&6; }
14295if test "$have_gcc_asm_for_x64" = yes
14296then
14297
14298$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14299
14300fi
14301
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014302# **************************************************
14303# * Check for various properties of floating point *
14304# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014305
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14307$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14308if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014310else
14311
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014312
14313ax_cv_c_float_words_bigendian=unknown
14314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014315/* end confdefs.h. */
14316
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014317
14318double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14319
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014320
14321_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014322if ac_fn_c_try_compile "$LINENO"; then :
14323
14324
14325if grep noonsees conftest.$ac_objext >/dev/null ; then
14326 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014327fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014328if grep seesnoon conftest.$ac_objext >/dev/null ; then
14329 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14330 ax_cv_c_float_words_bigendian=no
14331 else
14332 ax_cv_c_float_words_bigendian=unknown
14333 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014334fi
14335
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014336
14337fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014339fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14341$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014342
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014343case $ax_cv_c_float_words_bigendian in
14344 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014345
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014346$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14347 ;;
14348 no)
14349 ;;
14350 *)
14351 as_fn_error $? "
14352
14353Unknown float word ordering. You need to manually preset
14354ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14355
14356 " "$LINENO" 5 ;;
14357esac
14358
14359
14360if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014361then
14362
Matthias Kloseb9621712010-04-24 17:59:49 +000014363$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014364
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014365elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014366then
14367
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014368$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14369
14370else
14371 # Some ARM platforms use a mixed-endian representation for doubles.
14372 # While Python doesn't currently have full support for these platforms
14373 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14374 # conversions work.
14375 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14376 # or little, then it must be this?
14377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014379
14380fi
14381
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014382# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014383# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014384# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014385# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014386# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014387# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014388
14389# This inline assembler syntax may also work for suncc and icc,
14390# so we try it on all platforms.
14391
Matthias Kloseb9621712010-04-24 17:59:49 +000014392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14393$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014395/* end confdefs.h. */
14396
14397int
14398main ()
14399{
14400
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014401 unsigned short cw;
14402 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14403 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014404
14405 ;
14406 return 0;
14407}
14408_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014409if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014410 have_gcc_asm_for_x87=yes
14411else
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014413fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014414rm -f core conftest.err conftest.$ac_objext \
14415 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14417$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014418if test "$have_gcc_asm_for_x87" = yes
14419then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014420
Matthias Kloseb9621712010-04-24 17:59:49 +000014421$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014422
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014424
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14426$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14428/* end confdefs.h. */
14429
14430int
14431main ()
14432{
14433
14434 unsigned int fpcr;
14435 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14436 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14437
14438 ;
14439 return 0;
14440}
14441_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014442if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014443 have_gcc_asm_for_mc68881=yes
14444else
14445 have_gcc_asm_for_mc68881=no
14446fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014447rm -f core conftest.err conftest.$ac_objext \
14448 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14450$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14451if test "$have_gcc_asm_for_mc68881" = yes
14452then
14453
14454$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14455
14456fi
14457
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014458# Detect whether system arithmetic is subject to x87-style double
14459# rounding issues. The result of this test has little meaning on non
14460# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14461# mode is round-to-nearest and double rounding issues are present, and
14462# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14464$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014465# $BASECFLAGS may affect the result
14466ac_save_cc="$CC"
14467CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014468if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014469 ac_cv_x87_double_rounding=no
14470else
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014472/* end confdefs.h. */
14473
14474#include <stdlib.h>
14475#include <math.h>
14476int main() {
14477 volatile double x, y, z;
14478 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14479 x = 0.99999999999999989; /* 1-2**-53 */
14480 y = 1./x;
14481 if (y != 1.)
14482 exit(0);
14483 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14484 x = 1e16;
14485 y = 2.99999;
14486 z = x + y;
14487 if (z != 1e16+4.)
14488 exit(0);
14489 /* both tests show evidence of double rounding */
14490 exit(1);
14491}
14492
14493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014494if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014495 ac_cv_x87_double_rounding=no
14496else
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14500 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014501fi
14502
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014503CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14505$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014506if test "$ac_cv_x87_double_rounding" = yes
14507then
14508
Matthias Kloseb9621712010-04-24 17:59:49 +000014509$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014510
14511fi
14512
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014513# ************************************
14514# * Check for mathematical functions *
14515# ************************************
14516
14517LIBS_SAVE=$LIBS
14518LIBS="$LIBS $LIBM"
14519
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014520for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14521do :
14522 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14523ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014524if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014525 cat >>confdefs.h <<_ACEOF
14526#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14527_ACEOF
14528
14529fi
14530done
14531
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014532for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014533do :
14534 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14535ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014536if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014537 cat >>confdefs.h <<_ACEOF
14538#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14539_ACEOF
14540
14541fi
14542done
14543
14544ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14545"
Victor Stinnere0be4232011-10-25 13:06:09 +020014546if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014547 ac_have_decl=1
14548else
14549 ac_have_decl=0
14550fi
14551
14552cat >>confdefs.h <<_ACEOF
14553#define HAVE_DECL_ISINF $ac_have_decl
14554_ACEOF
14555ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14556"
Victor Stinnere0be4232011-10-25 13:06:09 +020014557if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014558 ac_have_decl=1
14559else
14560 ac_have_decl=0
14561fi
14562
14563cat >>confdefs.h <<_ACEOF
14564#define HAVE_DECL_ISNAN $ac_have_decl
14565_ACEOF
14566ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14567"
Victor Stinnere0be4232011-10-25 13:06:09 +020014568if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014569 ac_have_decl=1
14570else
14571 ac_have_decl=0
14572fi
14573
14574cat >>confdefs.h <<_ACEOF
14575#define HAVE_DECL_ISFINITE $ac_have_decl
14576_ACEOF
14577
14578
Mark Dickinsona614f042009-11-28 12:48:43 +000014579# For multiprocessing module, check that sem_open
14580# actually works. For FreeBSD versions <= 7.2,
14581# the kernel module that provides POSIX semaphores
14582# isn't loaded by default, so an attempt to call
14583# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14585$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014586if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014588else
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014590 ac_cv_posix_semaphores_enabled=yes
14591else
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014593/* end confdefs.h. */
14594
14595#include <unistd.h>
14596#include <fcntl.h>
14597#include <stdio.h>
14598#include <semaphore.h>
14599#include <sys/stat.h>
14600
14601int main(void) {
14602 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14603 if (a == SEM_FAILED) {
14604 perror("sem_open");
14605 return 1;
14606 }
14607 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014608 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014609 return 0;
14610}
14611
14612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014613if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014614 ac_cv_posix_semaphores_enabled=yes
14615else
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14619 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014620fi
14621
14622
Mark Dickinsona614f042009-11-28 12:48:43 +000014623fi
14624
Matthias Kloseb9621712010-04-24 17:59:49 +000014625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14626$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014627if test $ac_cv_posix_semaphores_enabled = no
14628then
14629
Matthias Kloseb9621712010-04-24 17:59:49 +000014630$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014631
14632fi
14633
Mark Dickinson10683072009-04-18 21:18:19 +000014634# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14636$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014637if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014639else
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014641 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014642else
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014644/* end confdefs.h. */
14645
14646#include <unistd.h>
14647#include <fcntl.h>
14648#include <stdio.h>
14649#include <semaphore.h>
14650#include <sys/stat.h>
14651
14652int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014653 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014654 int count;
14655 int res;
14656 if(a==SEM_FAILED){
14657 perror("sem_open");
14658 return 1;
14659
14660 }
14661 res = sem_getvalue(a, &count);
14662 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014663 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014664 return res==-1 ? 1 : 0;
14665}
14666
Mark Dickinson10683072009-04-18 21:18:19 +000014667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014668if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014669 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014670else
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14674 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014675fi
14676
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014677
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014678fi
14679
Matthias Kloseb9621712010-04-24 17:59:49 +000014680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14681$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014682if test $ac_cv_broken_sem_getvalue = yes
14683then
14684
Matthias Kloseb9621712010-04-24 17:59:49 +000014685$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014686
14687fi
14688
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014689ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14690"
14691if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14692 ac_have_decl=1
14693else
14694 ac_have_decl=0
14695fi
14696
14697cat >>confdefs.h <<_ACEOF
14698#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14699_ACEOF
14700ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14701"
14702if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14703 ac_have_decl=1
14704else
14705 ac_have_decl=0
14706fi
14707
14708cat >>confdefs.h <<_ACEOF
14709#define HAVE_DECL_RTLD_NOW $ac_have_decl
14710_ACEOF
14711ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14712"
14713if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14714 ac_have_decl=1
14715else
14716 ac_have_decl=0
14717fi
14718
14719cat >>confdefs.h <<_ACEOF
14720#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14721_ACEOF
14722ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14723"
14724if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14725 ac_have_decl=1
14726else
14727 ac_have_decl=0
14728fi
14729
14730cat >>confdefs.h <<_ACEOF
14731#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14732_ACEOF
14733ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14734"
14735if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14736 ac_have_decl=1
14737else
14738 ac_have_decl=0
14739fi
14740
14741cat >>confdefs.h <<_ACEOF
14742#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14743_ACEOF
14744ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14745"
14746if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14747 ac_have_decl=1
14748else
14749 ac_have_decl=0
14750fi
14751
14752cat >>confdefs.h <<_ACEOF
14753#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14754_ACEOF
14755ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14756"
14757if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14758 ac_have_decl=1
14759else
14760 ac_have_decl=0
14761fi
14762
14763cat >>confdefs.h <<_ACEOF
14764#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14765_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014766ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14767"
14768if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14769 ac_have_decl=1
14770else
14771 ac_have_decl=0
14772fi
14773
14774cat >>confdefs.h <<_ACEOF
14775#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14776_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014777
14778
Mark Dickinsonbd792642009-03-18 20:06:12 +000014779# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14781$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014782# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014783if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014784 enableval=$enable_big_digits; case $enable_big_digits in
14785yes)
14786 enable_big_digits=30 ;;
14787no)
14788 enable_big_digits=15 ;;
1478915|30)
14790 ;;
14791*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014792 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 +000014793esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14795$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014796
14797cat >>confdefs.h <<_ACEOF
14798#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14799_ACEOF
14800
14801
14802else
Matthias Kloseb9621712010-04-24 17:59:49 +000014803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14804$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014805fi
14806
14807
Guido van Rossumef2255b2000-03-10 22:30:29 +000014808# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014809ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014810if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014811
14812
Matthias Kloseb9621712010-04-24 17:59:49 +000014813$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014814
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014815 wchar_h="yes"
14816
Guido van Rossumef2255b2000-03-10 22:30:29 +000014817else
Martin v. Löwis11437992002-04-12 09:54:03 +000014818 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014819
14820fi
14821
Michael W. Hudson54241132001-12-07 15:38:26 +000014822
Martin v. Löwis11437992002-04-12 09:54:03 +000014823
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014824# determine wchar_t size
14825if test "$wchar_h" = yes
14826then
Matthias Kloseb9621712010-04-24 17:59:49 +000014827 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14830# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14832$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014833if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014835else
Matthias Kloseb9621712010-04-24 17:59:49 +000014836 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14837"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014838
Martin v. Löwis11437992002-04-12 09:54:03 +000014839else
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 if test "$ac_cv_type_wchar_t" = yes; then
14841 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14842$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014843as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014844See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014845 else
14846 ac_cv_sizeof_wchar_t=0
14847 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014849
Martin v. Löwis11437992002-04-12 09:54:03 +000014850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14852$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853
14854
14855
Martin v. Löwis11437992002-04-12 09:54:03 +000014856cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014857#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014858_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014859
Michael W. Hudson54241132001-12-07 15:38:26 +000014860
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014861fi
14862
Matthias Kloseb9621712010-04-24 17:59:49 +000014863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14864$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014865have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014867/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014868
14869#include <tcl.h>
14870#if TCL_UTF_MAX != 6
14871# error "NOT UCS4_TCL"
14872#endif
14873int
14874main ()
14875{
14876
14877 ;
14878 return 0;
14879}
14880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014881if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014882
14883
Matthias Kloseb9621712010-04-24 17:59:49 +000014884$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014885
14886 have_ucs4_tcl=yes
14887
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14891$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014892
Skip Montanaro6dead952003-09-25 14:50:04 +000014893# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014894if test "$wchar_h" = yes
14895then
14896 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14898$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014899 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014900 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014901else
14902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014904 ac_cv_wchar_t_signed=yes
14905else
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014907/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014908
14909 #include <wchar.h>
14910 int main()
14911 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014912 /* Success: exit code 0 */
14913 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014914 }
14915
14916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014917if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014918 ac_cv_wchar_t_signed=yes
14919else
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014924fi
14925
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014926fi
14927
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14929$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930fi
14931
Michael Osipov3738fad2018-08-24 18:17:19 +020014932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14933$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014934# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014935if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014936 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014937then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014938
Matthias Kloseb9621712010-04-24 17:59:49 +000014939$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
Michael Osipov3738fad2018-08-24 18:17:19 +020014941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14942$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014943else
Michael Osipov3738fad2018-08-24 18:17:19 +020014944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14945$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014946fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014947
14948# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14950$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014951if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014953else
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 ac_cv_c_bigendian=unknown
14955 # See if we're dealing with a universal compiler.
14956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14957/* end confdefs.h. */
14958#ifndef __APPLE_CC__
14959 not a universal capable compiler
14960 #endif
14961 typedef int dummy;
14962
Skip Montanaro6dead952003-09-25 14:50:04 +000014963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014964if ac_fn_c_try_compile "$LINENO"; then :
14965
14966 # Check for potential -arch flags. It is not universal unless
14967 # there are at least two -arch flags with different values.
14968 ac_arch=
14969 ac_prev=
14970 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14971 if test -n "$ac_prev"; then
14972 case $ac_word in
14973 i?86 | x86_64 | ppc | ppc64)
14974 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14975 ac_arch=$ac_word
14976 else
14977 ac_cv_c_bigendian=universal
14978 break
14979 fi
14980 ;;
14981 esac
14982 ac_prev=
14983 elif test "x$ac_word" = "x-arch"; then
14984 ac_prev=arch
14985 fi
14986 done
14987fi
14988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14989 if test $ac_cv_c_bigendian = unknown; then
14990 # See if sys/param.h defines the BYTE_ORDER macro.
14991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014992/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014993#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014994 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014995
Martin v. Löwis11437992002-04-12 09:54:03 +000014996int
14997main ()
14998{
Matthias Kloseb9621712010-04-24 17:59:49 +000014999#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15000 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15001 && LITTLE_ENDIAN)
15002 bogus endian macros
15003 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015004
15005 ;
15006 return 0;
15007}
15008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015009if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015010 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015012/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015013#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015015
Martin v. Löwis11437992002-04-12 09:54:03 +000015016int
15017main ()
15018{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015019#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015020 not big endian
15021 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015022
15023 ;
15024 return 0;
15025}
15026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015027if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015028 ac_cv_c_bigendian=yes
15029else
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015033fi
15034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15035 fi
15036 if test $ac_cv_c_bigendian = unknown; then
15037 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015039/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015040#include <limits.h>
15041
Martin v. Löwis11437992002-04-12 09:54:03 +000015042int
15043main ()
15044{
Matthias Kloseb9621712010-04-24 17:59:49 +000015045#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15046 bogus endian macros
15047 #endif
15048
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ;
15050 return 0;
15051}
15052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015053if ac_fn_c_try_compile "$LINENO"; then :
15054 # It does; now see whether it defined to _BIG_ENDIAN or not.
15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056/* end confdefs.h. */
15057#include <limits.h>
15058
15059int
15060main ()
15061{
15062#ifndef _BIG_ENDIAN
15063 not big endian
15064 #endif
15065
15066 ;
15067 return 0;
15068}
15069_ACEOF
15070if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015072else
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15076fi
15077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15078 fi
15079 if test $ac_cv_c_bigendian = unknown; then
15080 # Compile a test program.
15081 if test "$cross_compiling" = yes; then :
15082 # Try to guess by grepping values from an object file.
15083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15084/* end confdefs.h. */
15085short int ascii_mm[] =
15086 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15087 short int ascii_ii[] =
15088 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15089 int use_ascii (int i) {
15090 return ascii_mm[i] + ascii_ii[i];
15091 }
15092 short int ebcdic_ii[] =
15093 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15094 short int ebcdic_mm[] =
15095 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15096 int use_ebcdic (int i) {
15097 return ebcdic_mm[i] + ebcdic_ii[i];
15098 }
15099 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101int
15102main ()
15103{
15104return use_ascii (foo) == use_ebcdic (foo);
15105 ;
15106 return 0;
15107}
15108_ACEOF
15109if ac_fn_c_try_compile "$LINENO"; then :
15110 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15111 ac_cv_c_bigendian=yes
15112 fi
15113 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15114 if test "$ac_cv_c_bigendian" = unknown; then
15115 ac_cv_c_bigendian=no
15116 else
15117 # finding both strings is unlikely to happen, but who knows?
15118 ac_cv_c_bigendian=unknown
15119 fi
15120 fi
15121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015123else
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015125/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015127int
15128main ()
15129{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 /* Are we little or big endian? From Harbison&Steele. */
15132 union
15133 {
15134 long int l;
15135 char c[sizeof (long int)];
15136 } u;
15137 u.l = 1;
15138 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139
15140 ;
15141 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015142}
Martin v. Löwis11437992002-04-12 09:54:03 +000015143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015144if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015145 ac_cv_c_bigendian=no
15146else
Matthias Kloseb9621712010-04-24 17:59:49 +000015147 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15150 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152
Matthias Kloseb9621712010-04-24 17:59:49 +000015153 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15156$as_echo "$ac_cv_c_bigendian" >&6; }
15157 case $ac_cv_c_bigendian in #(
15158 yes)
15159 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15160;; #(
15161 no)
15162 ;; #(
15163 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015164
Matthias Kloseb9621712010-04-24 17:59:49 +000015165$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015166
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 ;; #(
15168 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015169 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015170 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015172
Michael W. Hudson54241132001-12-07 15:38:26 +000015173
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015174# ABI version string for Python extension modules. This appears between the
15175# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15176# from the following attributes which affect the ABI of this Python build (in
15177# this order):
15178#
15179# * The Python implementation (always 'cpython-' for us)
15180# * The major and minor version numbers
15181# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015182#
15183# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015184# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15185# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015186#
15187# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15188# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015189
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15191$as_echo_n "checking ABIFLAGS... " >&6; }
15192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15193$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15195$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015196SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15198$as_echo "$SOABI" >&6; }
15199
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015200# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15201if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015202 # Similar to SOABI but remove "d" flag from ABIFLAGS
15203
15204 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15205
15206cat >>confdefs.h <<_ACEOF
15207#define ALT_SOABI "${ALT_SOABI}"
15208_ACEOF
15209
15210fi
15211
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015212
15213case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015214 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015215 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15216 *)
15217 EXT_SUFFIX=${SHLIB_SUFFIX};;
15218esac
15219
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15221$as_echo_n "checking LDVERSION... " >&6; }
15222LDVERSION='$(VERSION)$(ABIFLAGS)'
15223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15224$as_echo "$LDVERSION" >&6; }
15225
E. M. Brayc994c8f2019-05-24 17:33:47 +020015226# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015227
E. M. Brayb1fc4172019-05-24 18:39:39 +020015228if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015229 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015230else
15231 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015232fi
15233
doko@python.org87421192013-01-26 11:39:31 +010015234
doko@ubuntu.com55532312016-06-14 08:55:19 +020015235if test x$PLATFORM_TRIPLET = x; then
15236 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15237else
15238 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15239fi
doko@python.org87421192013-01-26 11:39:31 +010015240
15241
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015242# Check whether right shifting a negative integer extends the sign bit
15243# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15245$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015246if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015247 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015248else
Martin v. Löwis11437992002-04-12 09:54:03 +000015249
Matthias Kloseb9621712010-04-24 17:59:49 +000015250if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015251 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015252else
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015254/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015255
15256int main()
15257{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015258 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015259}
15260
Martin v. Löwis11437992002-04-12 09:54:03 +000015261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015262if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015263 ac_cv_rshift_extends_sign=yes
15264else
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15268 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015269fi
15270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271fi
15272
Matthias Kloseb9621712010-04-24 17:59:49 +000015273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15274$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015275if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015276then
Martin v. Löwis11437992002-04-12 09:54:03 +000015277
Matthias Kloseb9621712010-04-24 17:59:49 +000015278$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015279
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015280fi
15281
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015282# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15284$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015285if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015287else
Martin v. Löwis11437992002-04-12 09:54:03 +000015288
Matthias Kloseb9621712010-04-24 17:59:49 +000015289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015290/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015291#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015292int
15293main ()
15294{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015295
15296 FILE *f = fopen("/dev/null", "r");
15297 flockfile(f);
15298 getc_unlocked(f);
15299 funlockfile(f);
15300
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 ;
15302 return 0;
15303}
15304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015305if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015306 ac_cv_have_getc_unlocked=yes
15307else
Matthias Kloseb9621712010-04-24 17:59:49 +000015308 ac_cv_have_getc_unlocked=no
15309fi
15310rm -f core conftest.err conftest.$ac_objext \
15311 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015313
Matthias Kloseb9621712010-04-24 17:59:49 +000015314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15315$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015316if test "$ac_cv_have_getc_unlocked" = yes
15317then
Martin v. Löwis11437992002-04-12 09:54:03 +000015318
Matthias Kloseb9621712010-04-24 17:59:49 +000015319$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015320
15321fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015322
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015323# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015324# save the value of LIBS so we don't actually link Python with readline
15325LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015326
Gregory P. Smith18820942008-09-07 06:24:49 +000015327# On some systems we need to link readline to a termcap compatible
15328# library. NOTE: Keep the precedence of listed libraries synchronised
15329# with setup.py.
15330py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15332$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015333for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015334 if test -z "$py_libtermcap"; then
15335 READLINE_LIBS="-lreadline"
15336 else
15337 READLINE_LIBS="-lreadline -l$py_libtermcap"
15338 fi
15339 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015341/* end confdefs.h. */
15342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343/* Override any GCC internal prototype to avoid an error.
15344 Use char because int might match the return type of a GCC
15345 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015346#ifdef __cplusplus
15347extern "C"
15348#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015349char readline ();
15350int
15351main ()
15352{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015354 ;
15355 return 0;
15356}
15357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015358if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015359 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015361rm -f core conftest.err conftest.$ac_objext \
15362 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015363 if test $py_cv_lib_readline = yes; then
15364 break
15365 fi
15366done
15367# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15368#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015369if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15371$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015372else
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15374$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015375
Matthias Kloseb9621712010-04-24 17:59:49 +000015376$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015377
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015378fi
15379
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015380# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015382/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015383#include <readline/readline.h>
15384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015385if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015386 have_readline=yes
15387else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015388 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015389
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015390fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015391rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015392if test $have_readline = yes
15393then
Matthias Kloseb9621712010-04-24 17:59:49 +000015394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015395/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015396#include <readline/readline.h>
15397
15398_ACEOF
15399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015401
Matthias Kloseb9621712010-04-24 17:59:49 +000015402$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015403
15404fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015405rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015406
Matthias Kloseb9621712010-04-24 17:59:49 +000015407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015408/* end confdefs.h. */
15409#include <readline/readline.h>
15410
15411_ACEOF
15412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015414
Matthias Kloseb9621712010-04-24 17:59:49 +000015415$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015416
15417fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015418rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015419
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015420fi
15421
Martin v. Löwis0daad592001-09-30 21:09:59 +000015422# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15424$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015425if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015426 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015427else
Martin v. Löwis11437992002-04-12 09:54:03 +000015428 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015429LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015433/* Override any GCC internal prototype to avoid an error.
15434 Use char because int might match the return type of a GCC
15435 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015436#ifdef __cplusplus
15437extern "C"
15438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015439char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015440int
15441main ()
15442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015443return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015444 ;
15445 return 0;
15446}
15447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015448if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015449 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015450else
Matthias Kloseb9621712010-04-24 17:59:49 +000015451 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015453rm -f core conftest.err conftest.$ac_objext \
15454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015455LIBS=$ac_check_lib_save_LIBS
15456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15458$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015459if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015460
Matthias Kloseb9621712010-04-24 17:59:49 +000015461$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015462
Martin v. Löwis0daad592001-09-30 21:09:59 +000015463fi
15464
Michael W. Hudson54241132001-12-07 15:38:26 +000015465
Thomas Wouters89d996e2007-09-08 17:39:28 +000015466# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15468$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015469if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015470 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015471else
15472 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015473LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015475/* end confdefs.h. */
15476
15477/* Override any GCC internal prototype to avoid an error.
15478 Use char because int might match the return type of a GCC
15479 builtin and then its argument prototype would still apply. */
15480#ifdef __cplusplus
15481extern "C"
15482#endif
15483char rl_completion_display_matches_hook ();
15484int
15485main ()
15486{
15487return rl_completion_display_matches_hook ();
15488 ;
15489 return 0;
15490}
15491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015492if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015493 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15494else
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015497rm -f core conftest.err conftest.$ac_objext \
15498 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015499LIBS=$ac_check_lib_save_LIBS
15500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15502$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015503if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015504
Matthias Kloseb9621712010-04-24 17:59:49 +000015505$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015506
15507fi
15508
15509
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015510# also in 4.0, but not in editline
15511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15512$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15513if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15514 $as_echo_n "(cached) " >&6
15515else
15516 ac_check_lib_save_LIBS=$LIBS
15517LIBS="-lreadline $READLINE_LIBS $LIBS"
15518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15519/* end confdefs.h. */
15520
15521/* Override any GCC internal prototype to avoid an error.
15522 Use char because int might match the return type of a GCC
15523 builtin and then its argument prototype would still apply. */
15524#ifdef __cplusplus
15525extern "C"
15526#endif
15527char rl_resize_terminal ();
15528int
15529main ()
15530{
15531return rl_resize_terminal ();
15532 ;
15533 return 0;
15534}
15535_ACEOF
15536if ac_fn_c_try_link "$LINENO"; then :
15537 ac_cv_lib_readline_rl_resize_terminal=yes
15538else
15539 ac_cv_lib_readline_rl_resize_terminal=no
15540fi
15541rm -f core conftest.err conftest.$ac_objext \
15542 conftest$ac_exeext conftest.$ac_ext
15543LIBS=$ac_check_lib_save_LIBS
15544fi
15545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15546$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15547if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15548
15549$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15550
15551fi
15552
15553
Martin v. Löwis0daad592001-09-30 21:09:59 +000015554# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15556$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015557if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015559else
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015561LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565/* Override any GCC internal prototype to avoid an error.
15566 Use char because int might match the return type of a GCC
15567 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015568#ifdef __cplusplus
15569extern "C"
15570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015571char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015572int
15573main ()
15574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 ;
15577 return 0;
15578}
15579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015580if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015581 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015582else
Matthias Kloseb9621712010-04-24 17:59:49 +000015583 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015585rm -f core conftest.err conftest.$ac_objext \
15586 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015587LIBS=$ac_check_lib_save_LIBS
15588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15590$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015591if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015592
Matthias Kloseb9621712010-04-24 17:59:49 +000015593$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015594
Guido van Rossum353ae582001-07-10 16:45:32 +000015595fi
15596
Jack Jansendd19cf82001-12-06 22:36:17 +000015597
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015598# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015600/* end confdefs.h. */
15601#include <readline/readline.h>
15602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015603if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015604 have_readline=yes
15605else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015606 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015607
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015608fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015609rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015610if test $have_readline = yes
15611then
Matthias Kloseb9621712010-04-24 17:59:49 +000015612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015613/* end confdefs.h. */
15614#include <readline/readline.h>
15615
15616_ACEOF
15617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015619
Matthias Kloseb9621712010-04-24 17:59:49 +000015620$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015621
15622fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015623rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015624
15625fi
15626
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15628$as_echo_n "checking for append_history in -lreadline... " >&6; }
15629if ${ac_cv_lib_readline_append_history+:} false; then :
15630 $as_echo_n "(cached) " >&6
15631else
15632 ac_check_lib_save_LIBS=$LIBS
15633LIBS="-lreadline $READLINE_LIBS $LIBS"
15634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15635/* end confdefs.h. */
15636
15637/* Override any GCC internal prototype to avoid an error.
15638 Use char because int might match the return type of a GCC
15639 builtin and then its argument prototype would still apply. */
15640#ifdef __cplusplus
15641extern "C"
15642#endif
15643char append_history ();
15644int
15645main ()
15646{
15647return append_history ();
15648 ;
15649 return 0;
15650}
15651_ACEOF
15652if ac_fn_c_try_link "$LINENO"; then :
15653 ac_cv_lib_readline_append_history=yes
15654else
15655 ac_cv_lib_readline_append_history=no
15656fi
15657rm -f core conftest.err conftest.$ac_objext \
15658 conftest$ac_exeext conftest.$ac_ext
15659LIBS=$ac_check_lib_save_LIBS
15660fi
15661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15662$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15663if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15664
15665$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15666
15667fi
15668
15669
Martin v. Löwis82bca632006-02-10 20:49:30 +000015670# End of readline checks: restore LIBS
15671LIBS=$LIBS_no_readline
15672
Matthias Kloseb9621712010-04-24 17:59:49 +000015673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15674$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015675if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015676 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015677else
Martin v. Löwis11437992002-04-12 09:54:03 +000015678
Matthias Kloseb9621712010-04-24 17:59:49 +000015679if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015680 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015681else
Matthias Kloseb9621712010-04-24 17:59:49 +000015682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015683/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015684
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015685#include <stdlib.h>
15686#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015687int main()
15688{
15689 int val1 = nice(1);
15690 if (val1 != -1 && val1 == nice(2))
15691 exit(0);
15692 exit(1);
15693}
15694
Martin v. Löwis11437992002-04-12 09:54:03 +000015695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015696if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015697 ac_cv_broken_nice=yes
15698else
Matthias Kloseb9621712010-04-24 17:59:49 +000015699 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15702 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015703fi
15704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015705fi
15706
Matthias Kloseb9621712010-04-24 17:59:49 +000015707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15708$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015709if test "$ac_cv_broken_nice" = yes
15710then
Martin v. Löwis11437992002-04-12 09:54:03 +000015711
Matthias Kloseb9621712010-04-24 17:59:49 +000015712$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015713
15714fi
15715
Matthias Kloseb9621712010-04-24 17:59:49 +000015716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15717$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015718if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015719 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015720else
Matthias Kloseb9621712010-04-24 17:59:49 +000015721 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015722 ac_cv_broken_poll=no
15723else
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015725/* end confdefs.h. */
15726
15727#include <poll.h>
15728
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015729int main()
15730{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015731 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015732 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015733
15734 close (42);
15735
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015736 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015737 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015738 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015739 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015740 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015741 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015742 return 1;
15743}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015744
15745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015746if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015747 ac_cv_broken_poll=yes
15748else
Matthias Kloseb9621712010-04-24 17:59:49 +000015749 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015754
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015755fi
15756
Matthias Kloseb9621712010-04-24 17:59:49 +000015757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15758$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015759if test "$ac_cv_broken_poll" = yes
15760then
15761
Matthias Kloseb9621712010-04-24 17:59:49 +000015762$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015763
15764fi
15765
Martin v. Löwis1d459062005-03-14 21:23:33 +000015766# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15768$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015769if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015770 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015771else
15772
Matthias Kloseb9621712010-04-24 17:59:49 +000015773if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015774 ac_cv_working_tzset=no
15775else
Matthias Kloseb9621712010-04-24 17:59:49 +000015776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015777/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015778
15779#include <stdlib.h>
15780#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015781#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015782
15783#if HAVE_TZNAME
15784extern char *tzname[];
15785#endif
15786
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015787int main()
15788{
Brett Cannon18367812003-09-19 00:59:16 +000015789 /* Note that we need to ensure that not only does tzset(3)
15790 do 'something' with localtime, but it works as documented
15791 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015792 This includes making sure that tzname is set properly if
15793 tm->tm_zone does not exist since it is the alternative way
15794 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015795
15796 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015797 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015798 */
15799
Martin v. Löwis1d459062005-03-14 21:23:33 +000015800 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015801 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15802
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015803 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015804 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015805 if (localtime(&groundhogday)->tm_hour != 0)
15806 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015807#if HAVE_TZNAME
15808 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15809 if (strcmp(tzname[0], "UTC") ||
15810 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15811 exit(1);
15812#endif
Brett Cannon18367812003-09-19 00:59:16 +000015813
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015814 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015815 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015816 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015817 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015818#if HAVE_TZNAME
15819 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15820 exit(1);
15821#endif
Brett Cannon18367812003-09-19 00:59:16 +000015822
15823 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15824 tzset();
15825 if (localtime(&groundhogday)->tm_hour != 11)
15826 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015827#if HAVE_TZNAME
15828 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15829 exit(1);
15830#endif
15831
15832#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015833 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15834 exit(1);
15835 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15836 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015837#endif
Brett Cannon18367812003-09-19 00:59:16 +000015838
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015839 exit(0);
15840}
15841
15842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015843if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015844 ac_cv_working_tzset=yes
15845else
Matthias Kloseb9621712010-04-24 17:59:49 +000015846 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015850fi
15851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015852fi
15853
Matthias Kloseb9621712010-04-24 17:59:49 +000015854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15855$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015856if test "$ac_cv_working_tzset" = yes
15857then
15858
Matthias Kloseb9621712010-04-24 17:59:49 +000015859$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015860
15861fi
15862
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015863# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15865$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015866if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015867 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015868else
Matthias Kloseb9621712010-04-24 17:59:49 +000015869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015870/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015871#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015872int
15873main ()
15874{
15875
15876struct stat st;
15877st.st_mtim.tv_nsec = 1;
15878
15879 ;
15880 return 0;
15881}
15882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015883if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015884 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015885else
Matthias Kloseb9621712010-04-24 17:59:49 +000015886 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15889fi
15890
Matthias Kloseb9621712010-04-24 17:59:49 +000015891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15892$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015893if test "$ac_cv_stat_tv_nsec" = yes
15894then
15895
Matthias Kloseb9621712010-04-24 17:59:49 +000015896$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015897
15898fi
15899
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015900# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15902$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015903if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015904 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015905else
Matthias Kloseb9621712010-04-24 17:59:49 +000015906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015907/* end confdefs.h. */
15908#include <sys/stat.h>
15909int
15910main ()
15911{
15912
15913struct stat st;
15914st.st_mtimespec.tv_nsec = 1;
15915
15916 ;
15917 return 0;
15918}
15919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015920if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015921 ac_cv_stat_tv_nsec2=yes
15922else
Matthias Kloseb9621712010-04-24 17:59:49 +000015923 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15926fi
15927
Matthias Kloseb9621712010-04-24 17:59:49 +000015928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15929$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015930if test "$ac_cv_stat_tv_nsec2" = yes
15931then
15932
Matthias Kloseb9621712010-04-24 17:59:49 +000015933$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015934
15935fi
15936
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015937# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015938ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015939if test "$cross_compiling" = no; then
15940 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15941fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015942
15943for ac_header in curses.h ncurses.h
15944do :
15945 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15946ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15947if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15948 cat >>confdefs.h <<_ACEOF
15949#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15950_ACEOF
15951
15952fi
15953
15954done
15955
15956
15957# On Solaris, term.h requires curses.h
15958for ac_header in term.h
15959do :
15960 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15961#ifdef HAVE_CURSES_H
15962#include <curses.h>
15963#endif
15964
15965"
15966if test "x$ac_cv_header_term_h" = xyes; then :
15967 cat >>confdefs.h <<_ACEOF
15968#define HAVE_TERM_H 1
15969_ACEOF
15970
15971fi
15972
15973done
15974
15975
Jack Jansen666b1e72001-10-31 12:11:48 +000015976# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15978$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015979if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015980 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015981else
Matthias Kloseb9621712010-04-24 17:59:49 +000015982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015983/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015984#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015985int
15986main ()
15987{
Jack Jansen666b1e72001-10-31 12:11:48 +000015988
15989 int rtn;
15990 rtn = mvwdelch(0,0,0);
15991
Martin v. Löwis11437992002-04-12 09:54:03 +000015992 ;
15993 return 0;
15994}
15995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015996if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015997 ac_cv_mvwdelch_is_expression=yes
15998else
Matthias Kloseb9621712010-04-24 17:59:49 +000015999 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16002fi
16003
Matthias Kloseb9621712010-04-24 17:59:49 +000016004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16005$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016006
16007if test "$ac_cv_mvwdelch_is_expression" = yes
16008then
Martin v. Löwis11437992002-04-12 09:54:03 +000016009
Matthias Kloseb9621712010-04-24 17:59:49 +000016010$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016011
16012fi
16013
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016014# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16015# structs since version 5.7. If the macro is defined as zero before including
16016# [n]curses.h, ncurses will expose fields of the structs regardless of the
16017# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16019$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016020if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016021 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016022else
Matthias Kloseb9621712010-04-24 17:59:49 +000016023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016024/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016025
16026 #define NCURSES_OPAQUE 0
16027 #include <curses.h>
16028
Martin v. Löwis11437992002-04-12 09:54:03 +000016029int
16030main ()
16031{
Jack Jansen666b1e72001-10-31 12:11:48 +000016032
16033 WINDOW *w;
16034 w->_flags = 0;
16035
Martin v. Löwis11437992002-04-12 09:54:03 +000016036 ;
16037 return 0;
16038}
16039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016040if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016041 ac_cv_window_has_flags=yes
16042else
Matthias Kloseb9621712010-04-24 17:59:49 +000016043 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16046fi
16047
Matthias Kloseb9621712010-04-24 17:59:49 +000016048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16049$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016050
Jack Jansen666b1e72001-10-31 12:11:48 +000016051
16052if test "$ac_cv_window_has_flags" = yes
16053then
Martin v. Löwis11437992002-04-12 09:54:03 +000016054
Matthias Kloseb9621712010-04-24 17:59:49 +000016055$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016056
16057fi
16058
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16060$as_echo_n "checking for is_pad... " >&6; }
16061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16062/* end confdefs.h. */
16063#include <curses.h>
16064int
16065main ()
16066{
16067
16068#ifndef is_pad
16069void *x=is_pad
16070#endif
16071
16072 ;
16073 return 0;
16074}
16075_ACEOF
16076if ac_fn_c_try_compile "$LINENO"; then :
16077
16078$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16079
16080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16081$as_echo "yes" >&6; }
16082else
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16084$as_echo "no" >&6; }
16085
16086fi
16087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16088
Matthias Kloseb9621712010-04-24 17:59:49 +000016089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16090$as_echo_n "checking for is_term_resized... " >&6; }
16091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016092/* end confdefs.h. */
16093#include <curses.h>
16094int
16095main ()
16096{
16097void *x=is_term_resized
16098 ;
16099 return 0;
16100}
16101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016102if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016103
Matthias Kloseb9621712010-04-24 17:59:49 +000016104$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016105
Matthias Kloseb159a552010-04-25 21:00:44 +000016106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016107$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016108else
Matthias Kloseb9621712010-04-24 17:59:49 +000016109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16110$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016111
16112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16116$as_echo_n "checking for resize_term... " >&6; }
16117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016118/* end confdefs.h. */
16119#include <curses.h>
16120int
16121main ()
16122{
16123void *x=resize_term
16124 ;
16125 return 0;
16126}
16127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016128if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016129
Matthias Kloseb9621712010-04-24 17:59:49 +000016130$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016131
Matthias Kloseb159a552010-04-25 21:00:44 +000016132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016133$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016134else
Matthias Kloseb9621712010-04-24 17:59:49 +000016135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16136$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016137
16138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16140
Matthias Kloseb9621712010-04-24 17:59:49 +000016141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16142$as_echo_n "checking for resizeterm... " >&6; }
16143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016144/* end confdefs.h. */
16145#include <curses.h>
16146int
16147main ()
16148{
16149void *x=resizeterm
16150 ;
16151 return 0;
16152}
16153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016154if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016155
Matthias Kloseb9621712010-04-24 17:59:49 +000016156$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016157
Matthias Kloseb159a552010-04-25 21:00:44 +000016158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016159$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016160else
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16162$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016163
16164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016166
16167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16168$as_echo_n "checking for immedok... " >&6; }
16169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16170/* end confdefs.h. */
16171#include <curses.h>
16172int
16173main ()
16174{
16175
16176#ifndef immedok
16177void *x=immedok
16178#endif
16179
16180 ;
16181 return 0;
16182}
16183_ACEOF
16184if ac_fn_c_try_compile "$LINENO"; then :
16185
16186$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16187
16188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16189$as_echo "yes" >&6; }
16190else
16191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16192$as_echo "no" >&6; }
16193
16194fi
16195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16196
16197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16198$as_echo_n "checking for syncok... " >&6; }
16199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16200/* end confdefs.h. */
16201#include <curses.h>
16202int
16203main ()
16204{
16205
16206#ifndef syncok
16207void *x=syncok
16208#endif
16209
16210 ;
16211 return 0;
16212}
16213_ACEOF
16214if ac_fn_c_try_compile "$LINENO"; then :
16215
16216$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16217
16218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16219$as_echo "yes" >&6; }
16220else
16221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16222$as_echo "no" >&6; }
16223
16224fi
16225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16226
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16228$as_echo_n "checking for wchgat... " >&6; }
16229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16230/* end confdefs.h. */
16231#include <curses.h>
16232int
16233main ()
16234{
16235
16236#ifndef wchgat
16237void *x=wchgat
16238#endif
16239
16240 ;
16241 return 0;
16242}
16243_ACEOF
16244if ac_fn_c_try_compile "$LINENO"; then :
16245
16246$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16247
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16249$as_echo "yes" >&6; }
16250else
16251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16252$as_echo "no" >&6; }
16253
16254fi
16255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16256
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16258$as_echo_n "checking for filter... " >&6; }
16259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16260/* end confdefs.h. */
16261#include <curses.h>
16262int
16263main ()
16264{
16265
16266#ifndef filter
16267void *x=filter
16268#endif
16269
16270 ;
16271 return 0;
16272}
16273_ACEOF
16274if ac_fn_c_try_compile "$LINENO"; then :
16275
16276$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16277
16278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16279$as_echo "yes" >&6; }
16280else
16281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16282$as_echo "no" >&6; }
16283
16284fi
16285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16286
16287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16288$as_echo_n "checking for has_key... " >&6; }
16289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16290/* end confdefs.h. */
16291#include <curses.h>
16292int
16293main ()
16294{
16295
16296#ifndef has_key
16297void *x=has_key
16298#endif
16299
16300 ;
16301 return 0;
16302}
16303_ACEOF
16304if ac_fn_c_try_compile "$LINENO"; then :
16305
16306$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16307
16308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16309$as_echo "yes" >&6; }
16310else
16311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16312$as_echo "no" >&6; }
16313
16314fi
16315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16316
16317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16318$as_echo_n "checking for typeahead... " >&6; }
16319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16320/* end confdefs.h. */
16321#include <curses.h>
16322int
16323main ()
16324{
16325
16326#ifndef typeahead
16327void *x=typeahead
16328#endif
16329
16330 ;
16331 return 0;
16332}
16333_ACEOF
16334if ac_fn_c_try_compile "$LINENO"; then :
16335
16336$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16337
16338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16339$as_echo "yes" >&6; }
16340else
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16342$as_echo "no" >&6; }
16343
16344fi
16345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16346
16347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16348$as_echo_n "checking for use_env... " >&6; }
16349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16350/* end confdefs.h. */
16351#include <curses.h>
16352int
16353main ()
16354{
16355
16356#ifndef use_env
16357void *x=use_env
16358#endif
16359
16360 ;
16361 return 0;
16362}
16363_ACEOF
16364if ac_fn_c_try_compile "$LINENO"; then :
16365
16366$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16367
16368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16369$as_echo "yes" >&6; }
16370else
16371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16372$as_echo "no" >&6; }
16373
16374fi
16375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016376# last curses configure check
16377CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16380$as_echo "$as_me: checking for device files" >&6;}
16381
16382if test "x$cross_compiling" = xyes; then
16383 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16385$as_echo_n "checking for /dev/ptmx... " >&6; }
16386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16387$as_echo "not set" >&6; }
16388 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16389 fi
16390 if test "${ac_cv_file__dev_ptc+set}" != set; then
16391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16392$as_echo_n "checking for /dev/ptc... " >&6; }
16393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16394$as_echo "not set" >&6; }
16395 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16396 fi
16397fi
16398
Matthias Kloseb9621712010-04-24 17:59:49 +000016399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16400$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016401if ${ac_cv_file__dev_ptmx+:} false; then :
16402 $as_echo_n "(cached) " >&6
16403else
16404 test "$cross_compiling" = yes &&
16405 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16406if test -r "/dev/ptmx"; then
16407 ac_cv_file__dev_ptmx=yes
16408else
16409 ac_cv_file__dev_ptmx=no
16410fi
16411fi
16412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16413$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16414if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016415
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016416fi
16417
16418if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016419
Matthias Kloseb9621712010-04-24 17:59:49 +000016420$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016421
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16424$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016425if ${ac_cv_file__dev_ptc+:} false; then :
16426 $as_echo_n "(cached) " >&6
16427else
16428 test "$cross_compiling" = yes &&
16429 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16430if test -r "/dev/ptc"; then
16431 ac_cv_file__dev_ptc=yes
16432else
16433 ac_cv_file__dev_ptc=no
16434fi
16435fi
16436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16437$as_echo "$ac_cv_file__dev_ptc" >&6; }
16438if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016439
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016440fi
16441
16442if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016443
Matthias Kloseb9621712010-04-24 17:59:49 +000016444$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016445
Neal Norwitz865400f2003-03-21 01:42:58 +000016446fi
16447
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016448if test $ac_sys_system = Darwin
16449then
16450 LIBS="$LIBS -framework CoreFoundation"
16451fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016452
Matthias Kloseb9621712010-04-24 17:59:49 +000016453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16454$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016455if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016456 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016457else
Matthias Kloseb9621712010-04-24 17:59:49 +000016458 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016459 ac_cv_have_size_t_format="cross -- assuming yes"
16460
Thomas Wouters477c8d52006-05-27 19:21:47 +000016461else
Matthias Kloseb9621712010-04-24 17:59:49 +000016462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016463/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016464
Thomas Wouters477c8d52006-05-27 19:21:47 +000016465#include <stdio.h>
16466#include <stddef.h>
16467#include <string.h>
16468
Christian Heimes2c181612007-12-17 20:04:13 +000016469#ifdef HAVE_SYS_TYPES_H
16470#include <sys/types.h>
16471#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016472
16473#ifdef HAVE_SSIZE_T
16474typedef ssize_t Py_ssize_t;
16475#elif SIZEOF_VOID_P == SIZEOF_LONG
16476typedef long Py_ssize_t;
16477#else
16478typedef int Py_ssize_t;
16479#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016480
Christian Heimes2c181612007-12-17 20:04:13 +000016481int main()
16482{
16483 char buffer[256];
16484
Thomas Wouters477c8d52006-05-27 19:21:47 +000016485 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16486 return 1;
16487
Thomas Wouters89f507f2006-12-13 04:49:30 +000016488 if (strcmp(buffer, "123"))
16489 return 1;
16490
16491 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16492 return 1;
16493
16494 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016495 return 1;
16496
16497 return 0;
16498}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016499
Thomas Wouters477c8d52006-05-27 19:21:47 +000016500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016501if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016502 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016503else
Matthias Kloseb9621712010-04-24 17:59:49 +000016504 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16507 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016508fi
16509
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16512$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016513if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016514
Matthias Kloseb9621712010-04-24 17:59:49 +000016515$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016516
16517fi
16518
Matthias Kloseb9621712010-04-24 17:59:49 +000016519ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016520#ifdef HAVE_SYS_TYPES_H
16521#include <sys/types.h>
16522#endif
16523#ifdef HAVE_SYS_SOCKET_H
16524#include <sys/socket.h>
16525#endif
16526
Matthias Kloseb9621712010-04-24 17:59:49 +000016527"
Victor Stinnere0be4232011-10-25 13:06:09 +020016528if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016529
Martin v. Löwis11437992002-04-12 09:54:03 +000016530else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016531
Matthias Kloseb9621712010-04-24 17:59:49 +000016532$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016533
16534fi
16535
Michael W. Hudson54241132001-12-07 15:38:26 +000016536
Matthias Kloseb9621712010-04-24 17:59:49 +000016537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16538$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016539if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016540 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016541else
Matthias Kloseb9621712010-04-24 17:59:49 +000016542 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016543 ac_cv_broken_mbstowcs=no
16544else
Matthias Kloseb9621712010-04-24 17:59:49 +000016545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016546/* end confdefs.h. */
16547
Stefan Krah19c21392012-11-22 23:47:32 +010016548#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016549#include<stdlib.h>
16550int main() {
16551 size_t len = -1;
16552 const char *str = "text";
16553 len = mbstowcs(NULL, str, 0);
16554 return (len != 4);
16555}
16556
16557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016558if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016559 ac_cv_broken_mbstowcs=no
16560else
Matthias Kloseb9621712010-04-24 17:59:49 +000016561 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16564 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016565fi
16566
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016567fi
16568
Matthias Kloseb9621712010-04-24 17:59:49 +000016569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16570$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016571if test "$ac_cv_broken_mbstowcs" = yes
16572then
16573
Matthias Kloseb9621712010-04-24 17:59:49 +000016574$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016575
16576fi
16577
Antoine Pitroub52ec782009-01-25 16:34:23 +000016578# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16580$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016581
16582# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016583if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016584 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016585if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016586then
16587
Matthias Kloseb9621712010-04-24 17:59:49 +000016588$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016589
Matthias Kloseb9621712010-04-24 17:59:49 +000016590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16591$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016592fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016593if test "$withval" = no
16594then
16595
16596$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16597
Matthias Kloseb9621712010-04-24 17:59:49 +000016598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16599$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016600fi
16601
Antoine Pitrou042b1282010-08-13 21:15:58 +000016602else
16603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16604$as_echo "no value specified" >&6; }
16605fi
16606
Antoine Pitroub52ec782009-01-25 16:34:23 +000016607
Matthias Kloseb17289e2012-03-15 19:51:34 +010016608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16609$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16610if ${ac_cv_computed_gotos+:} false; then :
16611 $as_echo_n "(cached) " >&6
16612else
16613 if test "$cross_compiling" = yes; then :
16614 if test "${with_computed_gotos+set}" = set; then
16615 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16616 else
16617 ac_cv_computed_gotos=no
16618 fi
16619else
16620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16621/* end confdefs.h. */
16622
16623int main(int argc, char **argv)
16624{
16625 static void *targets[1] = { &&LABEL1 };
16626 goto LABEL2;
16627LABEL1:
16628 return 0;
16629LABEL2:
16630 goto *targets[0];
16631 return 1;
16632}
16633
16634_ACEOF
16635if ac_fn_c_try_run "$LINENO"; then :
16636 ac_cv_computed_gotos=yes
16637else
16638 ac_cv_computed_gotos=no
16639fi
16640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16641 conftest.$ac_objext conftest.beam conftest.$ac_ext
16642fi
16643
16644fi
16645
16646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16647$as_echo "$ac_cv_computed_gotos" >&6; }
16648case "$ac_cv_computed_gotos" in yes*)
16649
16650$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16651
16652esac
16653
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016654case $ac_sys_system in
16655AIX*)
16656
16657$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16658 ;;
16659esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016660
Michael W. Hudson54241132001-12-07 15:38:26 +000016661
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016662
16663
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016664for h in `(cd $srcdir;echo Python/thread_*.h)`
16665do
16666 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16667done
16668
Michael W. Hudson54241132001-12-07 15:38:26 +000016669
Victor Stinner21a74a92019-04-11 22:28:12 +020016670SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16672$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016673for dir in $SRCDIRS; do
16674 if test ! -d $dir; then
16675 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016676 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016677done
Matthias Kloseb9621712010-04-24 17:59:49 +000016678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16679$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016680
Stefan Krah1919b7e2012-03-21 18:25:23 +010016681# Availability of -O2:
16682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16683$as_echo_n "checking for -O2... " >&6; }
16684saved_cflags="$CFLAGS"
16685CFLAGS="-O2"
16686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16687/* end confdefs.h. */
16688
16689int
16690main ()
16691{
16692
16693
16694 ;
16695 return 0;
16696}
16697_ACEOF
16698if ac_fn_c_try_compile "$LINENO"; then :
16699 have_O2=yes
16700else
16701 have_O2=no
16702fi
16703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16705$as_echo "$have_O2" >&6; }
16706CFLAGS="$saved_cflags"
16707
16708# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16709# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16711$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16712saved_cflags="$CFLAGS"
16713CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16714if test "$have_O2" = no; then
16715 CFLAGS=""
16716fi
16717if test "$cross_compiling" = yes; then :
16718 have_glibc_memmove_bug=undefined
16719else
16720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16721/* end confdefs.h. */
16722
16723#include <stdio.h>
16724#include <stdlib.h>
16725#include <string.h>
16726void foo(void *p, void *q) { memmove(p, q, 19); }
16727int main() {
16728 char a[32] = "123456789000000000";
16729 foo(&a[9], a);
16730 if (strcmp(a, "123456789123456789000000000") != 0)
16731 return 1;
16732 foo(a, &a[9]);
16733 if (strcmp(a, "123456789000000000") != 0)
16734 return 1;
16735 return 0;
16736}
16737
16738_ACEOF
16739if ac_fn_c_try_run "$LINENO"; then :
16740 have_glibc_memmove_bug=no
16741else
16742 have_glibc_memmove_bug=yes
16743fi
16744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16745 conftest.$ac_objext conftest.beam conftest.$ac_ext
16746fi
16747
16748CFLAGS="$saved_cflags"
16749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16750$as_echo "$have_glibc_memmove_bug" >&6; }
16751if test "$have_glibc_memmove_bug" = yes; then
16752
16753$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16754
16755fi
16756
16757if test "$have_gcc_asm_for_x87" = yes; then
16758 # Some versions of gcc miscompile inline asm:
16759 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16760 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16761 case $CC in
16762 *gcc*)
16763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16764$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16765 saved_cflags="$CFLAGS"
16766 CFLAGS="-O2"
16767 if test "$cross_compiling" = yes; then :
16768 have_ipa_pure_const_bug=undefined
16769else
16770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16771/* end confdefs.h. */
16772
16773 __attribute__((noinline)) int
16774 foo(int *p) {
16775 int r;
16776 asm ( "movl \$6, (%1)\n\t"
16777 "xorl %0, %0\n\t"
16778 : "=r" (r) : "r" (p) : "memory"
16779 );
16780 return r;
16781 }
16782 int main() {
16783 int p = 8;
16784 if ((foo(&p) ? : p) != 6)
16785 return 1;
16786 return 0;
16787 }
16788
16789_ACEOF
16790if ac_fn_c_try_run "$LINENO"; then :
16791 have_ipa_pure_const_bug=no
16792else
16793 have_ipa_pure_const_bug=yes
16794fi
16795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16796 conftest.$ac_objext conftest.beam conftest.$ac_ext
16797fi
16798
16799 CFLAGS="$saved_cflags"
16800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16801$as_echo "$have_ipa_pure_const_bug" >&6; }
16802 if test "$have_ipa_pure_const_bug" = yes; then
16803
16804$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16805
16806 fi
16807 ;;
16808 esac
16809fi
16810
Victor Stinner4f5366e2015-01-09 02:13:19 +010016811# Check for stdatomic.h
16812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16813$as_echo_n "checking for stdatomic.h... " >&6; }
16814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16815/* end confdefs.h. */
16816
16817
16818 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016819 atomic_int int_var;
16820 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016821 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016822 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16823 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16824 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016825 return 0;
16826 }
16827
16828
16829_ACEOF
16830if ac_fn_c_try_link "$LINENO"; then :
16831 have_stdatomic_h=yes
16832else
16833 have_stdatomic_h=no
16834fi
16835rm -f core conftest.err conftest.$ac_objext \
16836 conftest$ac_exeext conftest.$ac_ext
16837
16838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16839$as_echo "$have_stdatomic_h" >&6; }
16840
16841if test "$have_stdatomic_h" = yes; then
16842
16843$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16844
16845fi
16846
16847# Check for GCC >= 4.7 __atomic builtins
16848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16849$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16851/* end confdefs.h. */
16852
16853
16854 volatile int val = 1;
16855 int main() {
16856 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16857 return 0;
16858 }
16859
16860
16861_ACEOF
16862if ac_fn_c_try_link "$LINENO"; then :
16863 have_builtin_atomic=yes
16864else
16865 have_builtin_atomic=no
16866fi
16867rm -f core conftest.err conftest.$ac_objext \
16868 conftest$ac_exeext conftest.$ac_ext
16869
16870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16871$as_echo "$have_builtin_atomic" >&6; }
16872
16873if test "$have_builtin_atomic" = yes; then
16874
16875$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16876
16877fi
16878
Ned Deily322f5ba2013-11-21 23:01:59 -080016879# ensurepip option
16880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16881$as_echo_n "checking for ensurepip... " >&6; }
16882
16883# Check whether --with-ensurepip was given.
16884if test "${with_ensurepip+set}" = set; then :
16885 withval=$with_ensurepip;
16886else
16887 with_ensurepip=upgrade
16888fi
16889
16890case $with_ensurepip in #(
16891 yes|upgrade) :
16892 ENSUREPIP=upgrade ;; #(
16893 install) :
16894 ENSUREPIP=install ;; #(
16895 no) :
16896 ENSUREPIP=no ;; #(
16897 *) :
16898 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16899esac
16900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16901$as_echo "$ENSUREPIP" >&6; }
16902
16903
Victor Stinner35a97c02015-03-08 02:59:09 +010016904# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16906$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16908/* end confdefs.h. */
16909
16910
16911 #include <dirent.h>
16912
16913 int main() {
16914 struct dirent entry;
16915 return entry.d_type == DT_UNKNOWN;
16916 }
16917
16918
16919_ACEOF
16920if ac_fn_c_try_link "$LINENO"; then :
16921 have_dirent_d_type=yes
16922else
16923 have_dirent_d_type=no
16924fi
16925rm -f core conftest.err conftest.$ac_objext \
16926 conftest$ac_exeext conftest.$ac_ext
16927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16928$as_echo "$have_dirent_d_type" >&6; }
16929
16930if test "$have_dirent_d_type" = yes; then
16931
16932$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16933
16934fi
16935
Victor Stinner9eb57c52015-03-19 22:21:49 +010016936# check if the Linux getrandom() syscall is available
16937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16938$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16940/* end confdefs.h. */
16941
16942
Victor Stinner1b80b242016-04-12 22:34:58 +020016943 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016944 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016945 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016946
16947 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016948 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016949 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016950 const int flags = GRND_NONBLOCK;
16951 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016952 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016953 return 0;
16954 }
16955
16956
16957_ACEOF
16958if ac_fn_c_try_link "$LINENO"; then :
16959 have_getrandom_syscall=yes
16960else
16961 have_getrandom_syscall=no
16962fi
16963rm -f core conftest.err conftest.$ac_objext \
16964 conftest$ac_exeext conftest.$ac_ext
16965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16966$as_echo "$have_getrandom_syscall" >&6; }
16967
16968if test "$have_getrandom_syscall" = yes; then
16969
16970$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16971
16972fi
16973
Victor Stinner3abf44e2015-09-18 15:38:37 +020016974# check if the getrandom() function is available
16975# the test was written for the Solaris function of <sys/random.h>
16976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16977$as_echo_n "checking for the getrandom() function... " >&6; }
16978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16979/* end confdefs.h. */
16980
16981
16982 #include <sys/random.h>
16983
16984 int main() {
16985 char buffer[1];
16986 const size_t buflen = sizeof(buffer);
16987 const int flags = 0;
16988 /* ignore the result, Python checks for ENOSYS at runtime */
16989 (void)getrandom(buffer, buflen, flags);
16990 return 0;
16991 }
16992
16993
16994_ACEOF
16995if ac_fn_c_try_link "$LINENO"; then :
16996 have_getrandom=yes
16997else
16998 have_getrandom=no
16999fi
17000rm -f core conftest.err conftest.$ac_objext \
17001 conftest$ac_exeext conftest.$ac_ext
17002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17003$as_echo "$have_getrandom" >&6; }
17004
17005if test "$have_getrandom" = yes; then
17006
17007$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17008
17009fi
17010
Neil Schemenauer5741c452019-02-08 10:48:46 -080017011# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17012# shm_* may only be available if linking against librt
17013save_LIBS="$LIBS"
17014save_includes_default="$ac_includes_default"
17015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17016$as_echo_n "checking for library containing shm_open... " >&6; }
17017if ${ac_cv_search_shm_open+:} false; then :
17018 $as_echo_n "(cached) " >&6
17019else
17020 ac_func_search_save_LIBS=$LIBS
17021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17022/* end confdefs.h. */
17023
17024/* Override any GCC internal prototype to avoid an error.
17025 Use char because int might match the return type of a GCC
17026 builtin and then its argument prototype would still apply. */
17027#ifdef __cplusplus
17028extern "C"
17029#endif
17030char shm_open ();
17031int
17032main ()
17033{
17034return shm_open ();
17035 ;
17036 return 0;
17037}
17038_ACEOF
17039for ac_lib in '' rt; do
17040 if test -z "$ac_lib"; then
17041 ac_res="none required"
17042 else
17043 ac_res=-l$ac_lib
17044 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17045 fi
17046 if ac_fn_c_try_link "$LINENO"; then :
17047 ac_cv_search_shm_open=$ac_res
17048fi
17049rm -f core conftest.err conftest.$ac_objext \
17050 conftest$ac_exeext
17051 if ${ac_cv_search_shm_open+:} false; then :
17052 break
17053fi
17054done
17055if ${ac_cv_search_shm_open+:} false; then :
17056
17057else
17058 ac_cv_search_shm_open=no
17059fi
17060rm conftest.$ac_ext
17061LIBS=$ac_func_search_save_LIBS
17062fi
17063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17064$as_echo "$ac_cv_search_shm_open" >&6; }
17065ac_res=$ac_cv_search_shm_open
17066if test "$ac_res" != no; then :
17067 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17068
17069fi
17070
17071if test "$ac_cv_search_shm_open" = "-lrt"; then
17072
17073$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17074
17075fi
17076for ac_header in sys/mman.h
17077do :
17078 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17079if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17080 cat >>confdefs.h <<_ACEOF
17081#define HAVE_SYS_MMAN_H 1
17082_ACEOF
17083
17084fi
17085
17086done
17087
17088# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17089ac_includes_default="\
17090${ac_includes_default}
17091#ifndef __cplusplus
17092# ifdef HAVE_SYS_MMAN_H
17093# include <sys/mman.h>
17094# endif
17095#endif
17096"
17097for ac_func in shm_open shm_unlink
17098do :
17099 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17100ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17101if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17102 cat >>confdefs.h <<_ACEOF
17103#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17104_ACEOF
17105
17106fi
17107done
17108
17109# we don't want to link with librt always, restore LIBS
17110LIBS="$save_LIBS"
17111ac_includes_default="$save_includes_default"
17112
Christian Heimesff5be6e2018-01-20 13:19:21 +010017113# Check for usable OpenSSL
17114
17115 found=false
17116
17117# Check whether --with-openssl was given.
17118if test "${with_openssl+set}" = set; then :
17119 withval=$with_openssl;
17120 case "$withval" in
17121 "" | y | ye | yes | n | no)
17122 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17123 ;;
17124 *) ssldirs="$withval"
17125 ;;
17126 esac
17127
17128else
17129
17130 # if pkg-config is installed and openssl has installed a .pc file,
17131 # then use that information and don't search ssldirs
17132 if test -n "$ac_tool_prefix"; then
17133 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17134set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17136$as_echo_n "checking for $ac_word... " >&6; }
17137if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17138 $as_echo_n "(cached) " >&6
17139else
17140 if test -n "$PKG_CONFIG"; then
17141 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17142else
17143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17144for as_dir in $PATH
17145do
17146 IFS=$as_save_IFS
17147 test -z "$as_dir" && as_dir=.
17148 for ac_exec_ext in '' $ac_executable_extensions; do
17149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17150 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17152 break 2
17153 fi
17154done
17155 done
17156IFS=$as_save_IFS
17157
17158fi
17159fi
17160PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17161if test -n "$PKG_CONFIG"; then
17162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17163$as_echo "$PKG_CONFIG" >&6; }
17164else
17165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17166$as_echo "no" >&6; }
17167fi
17168
17169
17170fi
17171if test -z "$ac_cv_prog_PKG_CONFIG"; then
17172 ac_ct_PKG_CONFIG=$PKG_CONFIG
17173 # Extract the first word of "pkg-config", so it can be a program name with args.
17174set dummy pkg-config; ac_word=$2
17175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17176$as_echo_n "checking for $ac_word... " >&6; }
17177if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17178 $as_echo_n "(cached) " >&6
17179else
17180 if test -n "$ac_ct_PKG_CONFIG"; then
17181 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17182else
17183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17184for as_dir in $PATH
17185do
17186 IFS=$as_save_IFS
17187 test -z "$as_dir" && as_dir=.
17188 for ac_exec_ext in '' $ac_executable_extensions; do
17189 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17190 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17192 break 2
17193 fi
17194done
17195 done
17196IFS=$as_save_IFS
17197
17198fi
17199fi
17200ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17201if test -n "$ac_ct_PKG_CONFIG"; then
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17203$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17204else
17205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17206$as_echo "no" >&6; }
17207fi
17208
17209 if test "x$ac_ct_PKG_CONFIG" = x; then
17210 PKG_CONFIG=""
17211 else
17212 case $cross_compiling:$ac_tool_warned in
17213yes:)
17214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17216ac_tool_warned=yes ;;
17217esac
17218 PKG_CONFIG=$ac_ct_PKG_CONFIG
17219 fi
17220else
17221 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17222fi
17223
17224 if test x"$PKG_CONFIG" != x""; then
17225 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17226 if test $? = 0; then
17227 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17228 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17229 found=true
17230 fi
17231 fi
17232
17233 # no such luck; use some default ssldirs
17234 if ! $found; then
17235 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17236 fi
17237
17238
17239fi
17240
17241
17242
17243 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17244 # an 'openssl' subdirectory
17245
17246 if ! $found; then
17247 OPENSSL_INCLUDES=
17248 for ssldir in $ssldirs; do
17249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17250$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17251 if test -f "$ssldir/include/openssl/ssl.h"; then
17252 OPENSSL_INCLUDES="-I$ssldir/include"
17253 OPENSSL_LDFLAGS="-L$ssldir/lib"
17254 OPENSSL_LIBS="-lssl -lcrypto"
17255 found=true
17256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17257$as_echo "yes" >&6; }
17258 break
17259 else
17260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17261$as_echo "no" >&6; }
17262 fi
17263 done
17264
17265 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17266 # it will just work!
17267 fi
17268
17269 # try the preprocessor and linker with our new flags,
17270 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17271
17272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17273$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17274 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17275 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17276
17277 save_LIBS="$LIBS"
17278 save_LDFLAGS="$LDFLAGS"
17279 save_CPPFLAGS="$CPPFLAGS"
17280 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17281 LIBS="$OPENSSL_LIBS $LIBS"
17282 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17284/* end confdefs.h. */
17285#include <openssl/ssl.h>
17286int
17287main ()
17288{
17289SSL_new(NULL)
17290 ;
17291 return 0;
17292}
17293_ACEOF
17294if ac_fn_c_try_link "$LINENO"; then :
17295
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17297$as_echo "yes" >&6; }
17298 have_openssl=yes
17299
17300else
17301
17302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17303$as_echo "no" >&6; }
17304 have_openssl=no
17305
17306fi
17307rm -f core conftest.err conftest.$ac_objext \
17308 conftest$ac_exeext conftest.$ac_ext
17309 CPPFLAGS="$save_CPPFLAGS"
17310 LDFLAGS="$save_LDFLAGS"
17311 LIBS="$save_LIBS"
17312
17313
17314
17315
17316
17317
17318if test "$have_openssl" = yes; then
17319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17320$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17321
17322 save_LIBS="$LIBS"
17323 save_LDFLAGS="$LDFLAGS"
17324 save_CPPFLAGS="$CPPFLAGS"
17325 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17326 LIBS="$OPENSSL_LIBS $LIBS"
17327 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17328
17329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17330/* end confdefs.h. */
17331
17332 #include <openssl/x509_vfy.h>
17333
17334int
17335main ()
17336{
17337
17338 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17339 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17340 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17341 X509_VERIFY_PARAM_set_hostflags(p, 0);
17342
17343 ;
17344 return 0;
17345}
17346
17347_ACEOF
17348if ac_fn_c_try_link "$LINENO"; then :
17349
17350 ac_cv_has_x509_verify_param_set1_host=yes
17351
17352else
17353
17354 ac_cv_has_x509_verify_param_set1_host=no
17355
17356fi
17357rm -f core conftest.err conftest.$ac_objext \
17358 conftest$ac_exeext conftest.$ac_ext
17359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17360$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17361 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17362
17363$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17364
17365 fi
17366
17367 CPPFLAGS="$save_CPPFLAGS"
17368 LDFLAGS="$save_LDFLAGS"
17369 LIBS="$save_LIBS"
17370fi
17371
Christian Heimes892d66e2018-01-29 14:10:18 +010017372# ssl module default cipher suite string
17373
17374
17375
17376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17377$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17378
17379# Check whether --with-ssl-default-suites was given.
17380if test "${with_ssl_default_suites+set}" = set; then :
17381 withval=$with_ssl_default_suites;
17382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17383$as_echo "$withval" >&6; }
17384case "$withval" in
17385 python)
17386 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17387
17388 ;;
17389 openssl)
17390 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17391
17392 ;;
17393 *)
17394 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17395
17396 cat >>confdefs.h <<_ACEOF
17397#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17398_ACEOF
17399
17400 ;;
17401esac
17402
17403else
17404
17405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17406$as_echo "python" >&6; }
17407$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17408
17409
17410fi
17411
17412
17413
Guido van Rossum627b2d71993-12-24 10:39:16 +000017414# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017415ac_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 +000017416
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017417ac_config_files="$ac_config_files Modules/ld_so_aix"
17418
Martin v. Löwis11437992002-04-12 09:54:03 +000017419cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017420# This file is a shell script that caches the results of configure
17421# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017422# scripts and configure runs, see configure's option --config-cache.
17423# It is not useful on other systems. If it contains results you don't
17424# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017425#
Martin v. Löwis11437992002-04-12 09:54:03 +000017426# config.status only pays attention to the cache file if you give it
17427# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017428#
Skip Montanaro6dead952003-09-25 14:50:04 +000017429# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017430# loading this file, other *unset* `ac_cv_foo' will be assigned the
17431# following values.
17432
17433_ACEOF
17434
Guido van Rossumf78abae1997-01-21 22:02:36 +000017435# The following way of writing the cache mishandles newlines in values,
17436# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017438# Ultrix sh set writes to stderr and can't be redirected directly,
17439# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017440(
17441 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17442 eval ac_val=\$$ac_var
17443 case $ac_val in #(
17444 *${as_nl}*)
17445 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017446 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17447$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017448 esac
17449 case $ac_var in #(
17450 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017451 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17452 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017453 esac ;;
17454 esac
17455 done
17456
Martin v. Löwis11437992002-04-12 09:54:03 +000017457 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017458 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17459 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017460 # `set' does not quote correctly, so add quotes: double-quote
17461 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017462 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017463 "s/'/'\\\\''/g;
17464 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017465 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017466 *)
17467 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017468 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017469 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470 esac |
17471 sort
17472) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017473 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017474 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017475 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17478 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17480 :end' >>confcache
17481if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17482 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017483 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017484 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17485$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017486 if test ! -f "$cache_file" || test -h "$cache_file"; then
17487 cat confcache >"$cache_file"
17488 else
17489 case $cache_file in #(
17490 */* | ?:*)
17491 mv -f confcache "$cache_file"$$ &&
17492 mv -f "$cache_file"$$ "$cache_file" ;; #(
17493 *)
17494 mv -f confcache "$cache_file" ;;
17495 esac
17496 fi
17497 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017498 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017499 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17500$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017501 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017502fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017503rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017504
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017505test "x$prefix" = xNONE && prefix=$ac_default_prefix
17506# Let make expand exec_prefix.
17507test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017508
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017509DEFS=-DHAVE_CONFIG_H
17510
Skip Montanaro6dead952003-09-25 14:50:04 +000017511ac_libobjs=
17512ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017513U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017514for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17515 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017517 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017518 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17519 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017520 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17521 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017522done
17523LIBOBJS=$ac_libobjs
17524
17525LTLIBOBJS=$ac_ltlibobjs
17526
17527
Martin v. Löwis11437992002-04-12 09:54:03 +000017528
Matthias Kloseb9621712010-04-24 17:59:49 +000017529
Victor Stinnere0be4232011-10-25 13:06:09 +020017530: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017531ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017532ac_clean_files_save=$ac_clean_files
17533ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017534{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17535$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17536as_write_fail=0
17537cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017538#! $SHELL
17539# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017540# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017541# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017542# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017543
Martin v. Löwis11437992002-04-12 09:54:03 +000017544debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017545ac_cs_recheck=false
17546ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017547
Matthias Kloseb9621712010-04-24 17:59:49 +000017548SHELL=\${CONFIG_SHELL-$SHELL}
17549export SHELL
17550_ASEOF
17551cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17552## -------------------- ##
17553## M4sh Initialization. ##
17554## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556# Be more Bourne compatible
17557DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017558if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017559 emulate sh
17560 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017561 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017562 # is contrary to our usage. Disable this feature.
17563 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017565else
Matthias Kloseb9621712010-04-24 17:59:49 +000017566 case `(set -o) 2>/dev/null` in #(
17567 *posix*) :
17568 set -o posix ;; #(
17569 *) :
17570 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017572fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017573
17574
Matthias Kloseb9621712010-04-24 17:59:49 +000017575as_nl='
17576'
17577export as_nl
17578# Printing a long string crashes Solaris 7 /usr/bin/printf.
17579as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17580as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17581as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17582# Prefer a ksh shell builtin over an external printf program on Solaris,
17583# but without wasting forks for bash or zsh.
17584if test -z "$BASH_VERSION$ZSH_VERSION" \
17585 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17586 as_echo='print -r --'
17587 as_echo_n='print -rn --'
17588elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17589 as_echo='printf %s\n'
17590 as_echo_n='printf %s'
17591else
17592 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17593 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17594 as_echo_n='/usr/ucb/echo -n'
17595 else
17596 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17597 as_echo_n_body='eval
17598 arg=$1;
17599 case $arg in #(
17600 *"$as_nl"*)
17601 expr "X$arg" : "X\\(.*\\)$as_nl";
17602 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17603 esac;
17604 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17605 '
17606 export as_echo_n_body
17607 as_echo_n='sh -c $as_echo_n_body as_echo'
17608 fi
17609 export as_echo_body
17610 as_echo='sh -c $as_echo_body as_echo'
17611fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017612
17613# The user is always right.
17614if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017615 PATH_SEPARATOR=:
17616 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17617 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17618 PATH_SEPARATOR=';'
17619 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622
17623# IFS
17624# We need space, tab and new line, in precisely that order. Quoting is
17625# there to prevent editors from complaining about space-tab.
17626# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17627# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017628IFS=" "" $as_nl"
17629
17630# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017631as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017632case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633 *[\\/]* ) as_myself=$0 ;;
17634 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017635for as_dir in $PATH
17636do
17637 IFS=$as_save_IFS
17638 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017639 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17640 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 ;;
17644esac
17645# We did not find ourselves, most probably we were run as `sh COMMAND'
17646# in which case we are not to be found in the path.
17647if test "x$as_myself" = x; then
17648 as_myself=$0
17649fi
17650if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017651 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17652 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017653fi
17654
Matthias Kloseb9621712010-04-24 17:59:49 +000017655# Unset variables that we do not need and which cause bugs (e.g. in
17656# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17657# suppresses any "Segmentation fault" message there. '((' could
17658# trigger a bug in pdksh 5.2.14.
17659for as_var in BASH_ENV ENV MAIL MAILPATH
17660do eval test x\${$as_var+set} = xset \
17661 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662done
17663PS1='$ '
17664PS2='> '
17665PS4='+ '
17666
17667# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017668LC_ALL=C
17669export LC_ALL
17670LANGUAGE=C
17671export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672
Matthias Kloseb9621712010-04-24 17:59:49 +000017673# CDPATH.
17674(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17675
17676
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017677# as_fn_error STATUS ERROR [LINENO LOG_FD]
17678# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017679# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17680# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017681# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017682as_fn_error ()
17683{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017684 as_status=$1; test $as_status -eq 0 && as_status=1
17685 if test "$4"; then
17686 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17687 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017688 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017689 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017690 as_fn_exit $as_status
17691} # as_fn_error
17692
17693
17694# as_fn_set_status STATUS
17695# -----------------------
17696# Set $? to STATUS, without forking.
17697as_fn_set_status ()
17698{
17699 return $1
17700} # as_fn_set_status
17701
17702# as_fn_exit STATUS
17703# -----------------
17704# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17705as_fn_exit ()
17706{
17707 set +e
17708 as_fn_set_status $1
17709 exit $1
17710} # as_fn_exit
17711
17712# as_fn_unset VAR
17713# ---------------
17714# Portably unset VAR.
17715as_fn_unset ()
17716{
17717 { eval $1=; unset $1;}
17718}
17719as_unset=as_fn_unset
17720# as_fn_append VAR VALUE
17721# ----------------------
17722# Append the text in VALUE to the end of the definition contained in VAR. Take
17723# advantage of any shell optimizations that allow amortized linear growth over
17724# repeated appends, instead of the typical quadratic growth present in naive
17725# implementations.
17726if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17727 eval 'as_fn_append ()
17728 {
17729 eval $1+=\$2
17730 }'
17731else
17732 as_fn_append ()
17733 {
17734 eval $1=\$$1\$2
17735 }
17736fi # as_fn_append
17737
17738# as_fn_arith ARG...
17739# ------------------
17740# Perform arithmetic evaluation on the ARGs, and store the result in the
17741# global $as_val. Take advantage of shells that can avoid forks. The arguments
17742# must be portable across $(()) and expr.
17743if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17744 eval 'as_fn_arith ()
17745 {
17746 as_val=$(( $* ))
17747 }'
17748else
17749 as_fn_arith ()
17750 {
17751 as_val=`expr "$@" || test $? -eq 1`
17752 }
17753fi # as_fn_arith
17754
17755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756if expr a : '\(a\)' >/dev/null 2>&1 &&
17757 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17758 as_expr=expr
17759else
17760 as_expr=false
17761fi
17762
17763if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17764 as_basename=basename
17765else
17766 as_basename=false
17767fi
17768
Matthias Kloseb9621712010-04-24 17:59:49 +000017769if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17770 as_dirname=dirname
17771else
17772 as_dirname=false
17773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017775as_me=`$as_basename -- "$0" ||
17776$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17777 X"$0" : 'X\(//\)$' \| \
17778 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017779$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780 sed '/^.*\/\([^/][^/]*\)\/*$/{
17781 s//\1/
17782 q
17783 }
17784 /^X\/\(\/\/\)$/{
17785 s//\1/
17786 q
17787 }
17788 /^X\/\(\/\).*/{
17789 s//\1/
17790 q
17791 }
17792 s/.*/./; q'`
17793
Matthias Kloseb9621712010-04-24 17:59:49 +000017794# Avoid depending upon Character Ranges.
17795as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17796as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17797as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17798as_cr_digits='0123456789'
17799as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800
17801ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017802case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017804 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017806 xy) ECHO_C='\c';;
17807 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17808 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809 esac;;
17810*)
17811 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017812esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017813
Martin v. Löwis11437992002-04-12 09:54:03 +000017814rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017815if test -d conf$$.dir; then
17816 rm -f conf$$.dir/conf$$.file
17817else
17818 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017819 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017821if (echo >conf$$.file) 2>/dev/null; then
17822 if ln -s conf$$.file conf$$ 2>/dev/null; then
17823 as_ln_s='ln -s'
17824 # ... but there are two gotchas:
17825 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17826 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017827 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017828 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017829 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017830 elif ln conf$$.file conf$$ 2>/dev/null; then
17831 as_ln_s=ln
17832 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017833 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017834 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017835else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017836 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017838rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17839rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017840
Matthias Kloseb9621712010-04-24 17:59:49 +000017841
17842# as_fn_mkdir_p
17843# -------------
17844# Create "$as_dir" as a directory, including parents if necessary.
17845as_fn_mkdir_p ()
17846{
17847
17848 case $as_dir in #(
17849 -*) as_dir=./$as_dir;;
17850 esac
17851 test -d "$as_dir" || eval $as_mkdir_p || {
17852 as_dirs=
17853 while :; do
17854 case $as_dir in #(
17855 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17856 *) as_qdir=$as_dir;;
17857 esac
17858 as_dirs="'$as_qdir' $as_dirs"
17859 as_dir=`$as_dirname -- "$as_dir" ||
17860$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17861 X"$as_dir" : 'X\(//\)[^/]' \| \
17862 X"$as_dir" : 'X\(//\)$' \| \
17863 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17864$as_echo X"$as_dir" |
17865 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17866 s//\1/
17867 q
17868 }
17869 /^X\(\/\/\)[^/].*/{
17870 s//\1/
17871 q
17872 }
17873 /^X\(\/\/\)$/{
17874 s//\1/
17875 q
17876 }
17877 /^X\(\/\).*/{
17878 s//\1/
17879 q
17880 }
17881 s/.*/./; q'`
17882 test -d "$as_dir" && break
17883 done
17884 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017885 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017886
17887
17888} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017889if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017890 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017891else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017892 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017893 as_mkdir_p=false
17894fi
17895
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017896
17897# as_fn_executable_p FILE
17898# -----------------------
17899# Test if FILE is an executable regular file.
17900as_fn_executable_p ()
17901{
17902 test -f "$1" && test -x "$1"
17903} # as_fn_executable_p
17904as_test_x='test -x'
17905as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017906
17907# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017908as_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 +000017909
17910# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017911as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017912
17913
Martin v. Löwis11437992002-04-12 09:54:03 +000017914exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017915## ----------------------------------- ##
17916## Main body of $CONFIG_STATUS script. ##
17917## ----------------------------------- ##
17918_ASEOF
17919test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017920
Matthias Kloseb9621712010-04-24 17:59:49 +000017921cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17922# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017923# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017924# values after options handling.
17925ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017926This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017927generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017928
17929 CONFIG_FILES = $CONFIG_FILES
17930 CONFIG_HEADERS = $CONFIG_HEADERS
17931 CONFIG_LINKS = $CONFIG_LINKS
17932 CONFIG_COMMANDS = $CONFIG_COMMANDS
17933 $ $0 $@
17934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017935on `(hostname || uname -n) 2>/dev/null | sed 1q`
17936"
17937
Martin v. Löwis11437992002-04-12 09:54:03 +000017938_ACEOF
17939
Matthias Kloseb9621712010-04-24 17:59:49 +000017940case $ac_config_files in *"
17941"*) set x $ac_config_files; shift; ac_config_files=$*;;
17942esac
17943
17944case $ac_config_headers in *"
17945"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17946esac
17947
17948
17949cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017950# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017951config_files="$ac_config_files"
17952config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017954_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017955
Matthias Kloseb9621712010-04-24 17:59:49 +000017956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017957ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017958\`$as_me' instantiates files and other configuration actions
17959from templates according to the current configuration. Unless the files
17960and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017961
Matthias Kloseb9621712010-04-24 17:59:49 +000017962Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017963
17964 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017966 --config print configuration, then exit
17967 -q, --quiet, --silent
17968 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017969 -d, --debug don't remove temporary files
17970 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017971 --file=FILE[:TEMPLATE]
17972 instantiate the configuration file FILE
17973 --header=FILE[:TEMPLATE]
17974 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017975
17976Configuration files:
17977$config_files
17978
17979Configuration headers:
17980$config_headers
17981
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017982Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017985cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17986ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017987ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017988python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017989configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017990 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017991
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017992Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017993This config.status script is free software; the Free Software Foundation
17994gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017995
17996ac_pwd='$ac_pwd'
17997srcdir='$srcdir'
17998INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017999MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018000test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018001_ACEOF
18002
Matthias Kloseb9621712010-04-24 17:59:49 +000018003cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18004# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018005ac_need_defaults=:
18006while test $# != 0
18007do
18008 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018009 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18011 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018012 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018013 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018014 --*=)
18015 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18016 ac_optarg=
18017 ac_shift=:
18018 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018020 ac_option=$1
18021 ac_optarg=$2
18022 ac_shift=shift
18023 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018024 esac
18025
Skip Montanaro6dead952003-09-25 14:50:04 +000018026 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018028 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18029 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018030 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018031 $as_echo "$ac_cs_version"; exit ;;
18032 --config | --confi | --conf | --con | --co | --c )
18033 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018034 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018035 debug=: ;;
18036 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018037 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018038 case $ac_optarg in
18039 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018040 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018041 esac
18042 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018043 ac_need_defaults=false;;
18044 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018045 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018046 case $ac_optarg in
18047 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18048 esac
18049 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018050 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051 --he | --h)
18052 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018053 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018054Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018055 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018056 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018057 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18058 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18059 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018060
18061 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018062 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018063Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018064
Matthias Kloseb9621712010-04-24 17:59:49 +000018065 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018067
18068 esac
18069 shift
18070done
18071
Skip Montanaro6dead952003-09-25 14:50:04 +000018072ac_configure_extra_args=
18073
18074if $ac_cs_silent; then
18075 exec 6>/dev/null
18076 ac_configure_extra_args="$ac_configure_extra_args --silent"
18077fi
18078
18079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018080cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018081if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018082 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018083 shift
18084 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18085 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018086 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018087 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018088fi
18089
Martin v. Löwis11437992002-04-12 09:54:03 +000018090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018091cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018092exec 5>>config.log
18093{
18094 echo
18095 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18096## Running $as_me. ##
18097_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018098 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018102cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018104
Matthias Kloseb9621712010-04-24 17:59:49 +000018105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018106
18107# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018108for ac_config_target in $ac_config_targets
18109do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018110 case $ac_config_target in
18111 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18112 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18113 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018114 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18115 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018116 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018117 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018118 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018119 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018120 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018121
Victor Stinnere0be4232011-10-25 13:06:09 +020018122 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018123 esac
18124done
18125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126
Martin v. Löwis11437992002-04-12 09:54:03 +000018127# If the user did not use the arguments to specify the items to instantiate,
18128# then the envvar interface is used. Set only those that are not.
18129# We use the long form for the default assignment because of an extremely
18130# bizarre bug on SunOS 4.1.3.
18131if $ac_need_defaults; then
18132 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18133 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18134fi
18135
Skip Montanaro6dead952003-09-25 14:50:04 +000018136# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018137# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018138# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018139# Hook for its removal unless debugging.
18140# Note that there is a small window in which the directory will not be cleaned:
18141# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018142$debug ||
18143{
Victor Stinnere0be4232011-10-25 13:06:09 +020018144 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018145 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018146 : "${ac_tmp:=$tmp}"
18147 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018149 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018150}
Martin v. Löwis11437992002-04-12 09:54:03 +000018151# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018152
Martin v. Löwis11437992002-04-12 09:54:03 +000018153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018155 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018156} ||
18157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158 tmp=./conf$$-$RANDOM
18159 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018160} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018161ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018162
Matthias Kloseb9621712010-04-24 17:59:49 +000018163# Set up the scripts for CONFIG_FILES section.
18164# No need to generate them if there are no CONFIG_FILES.
18165# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018166if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018167
Matthias Kloseb9621712010-04-24 17:59:49 +000018168
18169ac_cr=`echo X | tr X '\015'`
18170# On cygwin, bash can eat \r inside `` if the user requested igncr.
18171# But we know of no other shell where ac_cr would be empty at this
18172# point, so we can use a bashism as a fallback.
18173if test "x$ac_cr" = x; then
18174 eval ac_cr=\$\'\\r\'
18175fi
18176ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18177if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018178 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018179else
18180 ac_cs_awk_cr=$ac_cr
18181fi
18182
Victor Stinnere0be4232011-10-25 13:06:09 +020018183echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018184_ACEOF
18185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018186
Matthias Kloseb9621712010-04-24 17:59:49 +000018187{
18188 echo "cat >conf$$subs.awk <<_ACEOF" &&
18189 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18190 echo "_ACEOF"
18191} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018192 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18193ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018194ac_delim='%!_!# '
18195for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018196 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018197 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018198
Matthias Kloseb9621712010-04-24 17:59:49 +000018199 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18200 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201 break
18202 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018203 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204 else
18205 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018206 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018207done
Matthias Kloseb9621712010-04-24 17:59:49 +000018208rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018209
Matthias Kloseb9621712010-04-24 17:59:49 +000018210cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018211cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018213sed -n '
18214h
18215s/^/S["/; s/!.*/"]=/
18216p
18217g
18218s/^[^!]*!//
18219:repl
18220t repl
18221s/'"$ac_delim"'$//
18222t delim
18223:nl
18224h
18225s/\(.\{148\}\)..*/\1/
18226t more1
18227s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18228p
18229n
18230b repl
18231:more1
18232s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18233p
18234g
18235s/.\{148\}//
18236t nl
18237:delim
18238h
18239s/\(.\{148\}\)..*/\1/
18240t more2
18241s/["\\]/\\&/g; s/^/"/; s/$/"/
18242p
18243b
18244:more2
18245s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18246p
18247g
18248s/.\{148\}//
18249t delim
18250' <conf$$subs.awk | sed '
18251/^[^""]/{
18252 N
18253 s/\n//
18254}
18255' >>$CONFIG_STATUS || ac_write_fail=1
18256rm -f conf$$subs.awk
18257cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18258_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018259cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018260 for (key in S) S_is_set[key] = 1
18261 FS = ""
18262
18263}
18264{
18265 line = $ 0
18266 nfields = split(line, field, "@")
18267 substed = 0
18268 len = length(field[1])
18269 for (i = 2; i < nfields; i++) {
18270 key = field[i]
18271 keylen = length(key)
18272 if (S_is_set[key]) {
18273 value = S[key]
18274 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18275 len += length(value) + length(field[++i])
18276 substed = 1
18277 } else
18278 len += 1 + keylen
18279 }
18280
18281 print line
18282}
18283
18284_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018286cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18287if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18288 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18289else
18290 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018291fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018292 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018293_ACEOF
18294
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018295# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18296# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018297# trailing colons and then remove the whole line if VPATH becomes empty
18298# (actually we leave an empty line to preserve line numbers).
18299if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018300 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18301h
18302s///
18303s/^/:/
18304s/[ ]*$/:/
18305s/:\$(srcdir):/:/g
18306s/:\${srcdir}:/:/g
18307s/:@srcdir@:/:/g
18308s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018309s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018310x
18311s/\(=[ ]*\).*/\1/
18312G
18313s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018314s/^[^=]*=[ ]*$//
18315}'
18316fi
18317
Matthias Kloseb9621712010-04-24 17:59:49 +000018318cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018319fi # test -n "$CONFIG_FILES"
18320
Matthias Kloseb9621712010-04-24 17:59:49 +000018321# Set up the scripts for CONFIG_HEADERS section.
18322# No need to generate them if there are no CONFIG_HEADERS.
18323# This happens for instance with `./config.status Makefile'.
18324if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018325cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018326BEGIN {
18327_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018328
Matthias Kloseb9621712010-04-24 17:59:49 +000018329# Transform confdefs.h into an awk script `defines.awk', embedded as
18330# here-document in config.status, that substitutes the proper values into
18331# config.h.in to produce config.h.
18332
18333# Create a delimiter string that does not exist in confdefs.h, to ease
18334# handling of long lines.
18335ac_delim='%!_!# '
18336for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018337 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18338 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018339 break
18340 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018341 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018342 else
18343 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18344 fi
18345done
18346
18347# For the awk script, D is an array of macro values keyed by name,
18348# likewise P contains macro parameters if any. Preserve backslash
18349# newline sequences.
18350
18351ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18352sed -n '
18353s/.\{148\}/&'"$ac_delim"'/g
18354t rset
18355:rset
18356s/^[ ]*#[ ]*define[ ][ ]*/ /
18357t def
18358d
18359:def
18360s/\\$//
18361t bsnl
18362s/["\\]/\\&/g
18363s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18364D["\1"]=" \3"/p
18365s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18366d
18367:bsnl
18368s/["\\]/\\&/g
18369s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18370D["\1"]=" \3\\\\\\n"\\/p
18371t cont
18372s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18373t cont
18374d
18375:cont
18376n
18377s/.\{148\}/&'"$ac_delim"'/g
18378t clear
18379:clear
18380s/\\$//
18381t bsnlc
18382s/["\\]/\\&/g; s/^/"/; s/$/"/p
18383d
18384:bsnlc
18385s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18386b cont
18387' <confdefs.h | sed '
18388s/'"$ac_delim"'/"\\\
18389"/g' >>$CONFIG_STATUS || ac_write_fail=1
18390
18391cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18392 for (key in D) D_is_set[key] = 1
18393 FS = ""
18394}
18395/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18396 line = \$ 0
18397 split(line, arg, " ")
18398 if (arg[1] == "#") {
18399 defundef = arg[2]
18400 mac1 = arg[3]
18401 } else {
18402 defundef = substr(arg[1], 2)
18403 mac1 = arg[2]
18404 }
18405 split(mac1, mac2, "(") #)
18406 macro = mac2[1]
18407 prefix = substr(line, 1, index(line, defundef) - 1)
18408 if (D_is_set[macro]) {
18409 # Preserve the white space surrounding the "#".
18410 print prefix "define", macro P[macro] D[macro]
18411 next
18412 } else {
18413 # Replace #undef with comments. This is necessary, for example,
18414 # in the case of _POSIX_SOURCE, which is predefined and required
18415 # on some systems where configure will not decide to define it.
18416 if (defundef == "undef") {
18417 print "/*", prefix defundef, macro, "*/"
18418 next
18419 }
18420 }
18421}
18422{ print }
18423_ACAWK
18424_ACEOF
18425cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018426 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018427fi # test -n "$CONFIG_HEADERS"
18428
18429
18430eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18431shift
18432for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018433do
18434 case $ac_tag in
18435 :[FHLC]) ac_mode=$ac_tag; continue;;
18436 esac
18437 case $ac_mode$ac_tag in
18438 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018439 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440 :[FH]-) ac_tag=-:-;;
18441 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18442 esac
18443 ac_save_IFS=$IFS
18444 IFS=:
18445 set x $ac_tag
18446 IFS=$ac_save_IFS
18447 shift
18448 ac_file=$1
18449 shift
18450
18451 case $ac_mode in
18452 :L) ac_source=$1;;
18453 :[FH])
18454 ac_file_inputs=
18455 for ac_f
18456 do
18457 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018458 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018459 *) # Look for the file first in the build tree, then in the source tree
18460 # (if the path is not absolute). The absolute path cannot be DOS-style,
18461 # because $ac_f cannot contain `:'.
18462 test -f "$ac_f" ||
18463 case $ac_f in
18464 [\\/$]*) false;;
18465 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18466 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018467 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018468 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018469 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18470 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018471 done
18472
18473 # Let's still pretend it is `configure' which instantiates (i.e., don't
18474 # use $as_me), people would be surprised to read:
18475 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018476 configure_input='Generated from '`
18477 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18478 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018479 if test x"$ac_file" != x-; then
18480 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018481 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18482$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018483 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018484 # Neutralize special characters interpreted by sed in replacement strings.
18485 case $configure_input in #(
18486 *\&* | *\|* | *\\* )
18487 ac_sed_conf_input=`$as_echo "$configure_input" |
18488 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18489 *) ac_sed_conf_input=$configure_input;;
18490 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018491
18492 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018493 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18494 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018495 esac
18496 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018497 esac
18498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018499 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018500$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018501 X"$ac_file" : 'X\(//\)[^/]' \| \
18502 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018504$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18506 s//\1/
18507 q
18508 }
18509 /^X\(\/\/\)[^/].*/{
18510 s//\1/
18511 q
18512 }
18513 /^X\(\/\/\)$/{
18514 s//\1/
18515 q
18516 }
18517 /^X\(\/\).*/{
18518 s//\1/
18519 q
18520 }
18521 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018522 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018523 ac_builddir=.
18524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525case "$ac_dir" in
18526.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18527*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018528 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018529 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018530 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018531 case $ac_top_builddir_sub in
18532 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18533 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18534 esac ;;
18535esac
18536ac_abs_top_builddir=$ac_pwd
18537ac_abs_builddir=$ac_pwd$ac_dir_suffix
18538# for backward compatibility:
18539ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018540
18541case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018542 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018543 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018544 ac_top_srcdir=$ac_top_builddir_sub
18545 ac_abs_top_srcdir=$ac_pwd ;;
18546 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018547 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018548 ac_top_srcdir=$srcdir
18549 ac_abs_top_srcdir=$srcdir ;;
18550 *) # Relative name.
18551 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18552 ac_top_srcdir=$ac_top_build_prefix$srcdir
18553 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018554esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018556
Martin v. Löwis11437992002-04-12 09:54:03 +000018557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018558 case $ac_mode in
18559 :F)
18560 #
18561 # CONFIG_FILE
18562 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018563
18564 case $INSTALL in
18565 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018566 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018567 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018568 ac_MKDIR_P=$MKDIR_P
18569 case $MKDIR_P in
18570 [\\/$]* | ?:[\\/]* ) ;;
18571 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18572 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018573_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574
Matthias Kloseb9621712010-04-24 17:59:49 +000018575cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018576# If the template does not know about datarootdir, expand it.
18577# FIXME: This hack should be removed a few years after 2.60.
18578ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018579ac_sed_dataroot='
18580/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018581 p
18582 q
18583}
18584/@datadir@/p
18585/@docdir@/p
18586/@infodir@/p
18587/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018588/@mandir@/p'
18589case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018590*datarootdir*) ac_datarootdir_seen=yes;;
18591*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18593$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018595cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018596 ac_datarootdir_hack='
18597 s&@datadir@&$datadir&g
18598 s&@docdir@&$docdir&g
18599 s&@infodir@&$infodir&g
18600 s&@localedir@&$localedir&g
18601 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018602 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018603esac
18604_ACEOF
18605
18606# Neutralize VPATH when `$srcdir' = `.'.
18607# Shell code in configure.ac might set extrasub.
18608# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018609cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18610ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018611$extrasub
18612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018613cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018614:t
18615/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018616s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018617s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018618s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018619s&@srcdir@&$ac_srcdir&;t t
18620s&@abs_srcdir@&$ac_abs_srcdir&;t t
18621s&@top_srcdir@&$ac_top_srcdir&;t t
18622s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18623s&@builddir@&$ac_builddir&;t t
18624s&@abs_builddir@&$ac_abs_builddir&;t t
18625s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18626s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018627s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018628$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018629"
Victor Stinnere0be4232011-10-25 13:06:09 +020018630eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18631 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018633test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018634 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18635 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18636 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018637 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018638which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018639$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018640which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018641
Victor Stinnere0be4232011-10-25 13:06:09 +020018642 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018643 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018644 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18645 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018646 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018647 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018648 ;;
18649 :H)
18650 #
18651 # CONFIG_HEADER
18652 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018653 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018654 {
18655 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018656 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18657 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018658 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018659 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018660 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18661$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018662 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018663 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018664 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018665 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018666 fi
18667 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018668 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018669 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018670 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018671 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018672 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018674
18675 esac
18676
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018677
18678 case $ac_file$ac_mode in
18679 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18680
18681 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018682done # for ac_tag
18683
Guido van Rossum627b2d71993-12-24 10:39:16 +000018684
Matthias Kloseb9621712010-04-24 17:59:49 +000018685as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018686_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018687ac_clean_files=$ac_clean_files_save
18688
Matthias Kloseb9621712010-04-24 17:59:49 +000018689test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018690 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018691
Martin v. Löwis11437992002-04-12 09:54:03 +000018692
18693# configure is writing to config.log, and then calls config.status.
18694# config.status does its own redirection, appending to config.log.
18695# Unfortunately, on DOS this fails, as config.log is still kept open
18696# by configure, so config.status won't be able to write to it; its
18697# output is simply discarded. So we exec the FD to /dev/null,
18698# effectively closing config.log, so it can be properly (re)opened and
18699# appended to by config.status. When coming back to configure, we
18700# need to make the FD available again.
18701if test "$no_create" != yes; then
18702 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018703 ac_config_status_args=
18704 test "$silent" = yes &&
18705 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018706 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018707 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018708 exec 5>>config.log
18709 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18710 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018711 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018712fi
18713if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18715$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018716fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018717
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018718
Christian Heimes75ed8902013-11-20 01:11:18 +010018719echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018720if test ! -f Modules/Setup.local
18721then
18722 echo "# Edit this file for local setup changes" >Modules/Setup.local
18723fi
18724
Christian Heimes75ed8902013-11-20 01:11:18 +010018725echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018726$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018727 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018728 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018729mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018730
18731if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18732 echo "" >&6
18733 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018734 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 +000018735 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018736 echo "" >&6
18737 echo "" >&6
18738fi
18739