blob: c8253b1455f65e32a032a389b2c9f4a6bde6b34a [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
Benjamin Peterson5c0c3252019-11-05 21:58:31 -0800785runstatedir
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'
Benjamin Peterson5c0c3252019-11-05 21:58:31 -0800899runstatedir='${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
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08001152 -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 \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08001298 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]
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08001451 --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
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003442esac
3443
3444if test $define_xopen_source = yes
3445then
Victor Stinner14d098d2011-09-07 22:29:43 +02003446 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003447
Victor Stinner14d098d2011-09-07 22:29:43 +02003448$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003449
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003450
3451 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3452 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3453 # several APIs are not declared. Since this is also needed in some
3454 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003455
Matthias Kloseb9621712010-04-24 17:59:49 +00003456$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003457
3458
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003459
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003460$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003461
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003462fi
3463
Christian Heimes647cd872013-12-07 23:39:33 +01003464# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3465case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003466 hp*|HP*)
3467 define_stdc_a1=yes;;
3468 *)
3469 define_stdc_a1=no;;
3470esac
3471
3472if test $define_stdc_a1 = yes
3473then
Christian Heimes647cd872013-12-07 23:39:33 +01003474
3475$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3476
Christian Heimesb02bcae2013-12-08 15:21:08 +01003477fi
Christian Heimes647cd872013-12-07 23:39:33 +01003478
Jack Jansen6b08a402004-06-03 12:41:45 +00003479# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3480# it may influence the way we can build extensions, so distutils
3481# needs to check it
3482
Thomas Wouters477c8d52006-05-27 19:21:47 +00003483
Jack Jansen6b08a402004-06-03 12:41:45 +00003484CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003485EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003486
Guido van Rossum627b2d71993-12-24 10:39:16 +00003487# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003488
3489# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3490# for debug/optimization stuff. BASECFLAGS is for flags that are required
3491# just to get things to compile and link. Users are free to override OPT
3492# when running configure or make. The build should not break if they do.
3493# BASECFLAGS should generally not be messed with, however.
3494
Guido van Rossum8b131c51995-03-09 14:10:13 +00003495# If the user switches compilers, we can't believe the cache
3496if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3497then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003498 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003499(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003500fi
3501
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003502# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3503# when the compiler supports them, but we don't always want -O2, and
3504# we set -g later.
3505if test -z "$CFLAGS"; then
3506 CFLAGS=
3507fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003508
3509if test "$ac_sys_system" = "Darwin"
3510then
3511 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003512 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003513 # information
3514 if test -z "${CC}"
3515 then
3516 found_gcc=
3517 found_clang=
3518 as_save_IFS=$IFS; IFS=:
3519 for as_dir in $PATH
3520 do
3521 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003522 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003523 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003524 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003525 fi
3526 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003527 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003528 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003529 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530 fi
3531 fi
3532 done
3533 IFS=$as_save_IFS
3534
3535 if test -n "$found_gcc" -a -n "$found_clang"
3536 then
3537 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3538 then
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3540$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3541 CC="$found_clang"
3542 CXX="$found_clang++"
3543 fi
3544
3545
3546 elif test -z "$found_gcc" -a -n "$found_clang"
3547 then
3548 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3549$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3550 CC="$found_clang"
3551 CXX="$found_clang++"
3552
3553 elif test -z "$found_gcc" -a -z "$found_clang"
3554 then
3555 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3556 if test -n "${found_clang}"
3557 then
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3559$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3560 CC="${found_clang}"
3561 CXX="`/usr/bin/xcrun -find clang++`"
3562
3563 # else: use default behaviour
3564 fi
3565 fi
3566 fi
3567fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003568ac_ext=c
3569ac_cpp='$CPP $CPPFLAGS'
3570ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3571ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3572ac_compiler_gnu=$ac_cv_c_compiler_gnu
3573if test -n "$ac_tool_prefix"; then
3574 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3575set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3577$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003578if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003580else
3581 if test -n "$CC"; then
3582 ac_cv_prog_CC="$CC" # Let the user override the test.
3583else
Martin v. Löwis11437992002-04-12 09:54:03 +00003584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 $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 +00003593 break 2
3594 fi
3595done
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003598
Jack Jansendd19cf82001-12-06 22:36:17 +00003599fi
3600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003601CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003602if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3604$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003605else
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3607$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608fi
3609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610
Martin v. Löwis11437992002-04-12 09:54:03 +00003611fi
3612if test -z "$ac_cv_prog_CC"; then
3613 ac_ct_CC=$CC
3614 # Extract the first word of "gcc", so it can be a program name with args.
3615set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3617$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003618if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003620else
3621 if test -n "$ac_ct_CC"; then
3622 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3623else
3624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3625for as_dir in $PATH
3626do
3627 IFS=$as_save_IFS
3628 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003630 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 $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 +00003633 break 2
3634 fi
3635done
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003637IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003638
3639fi
3640fi
3641ac_ct_CC=$ac_cv_prog_ac_ct_CC
3642if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3644$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003645else
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3647$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003648fi
3649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650 if test "x$ac_ct_CC" = x; then
3651 CC=""
3652 else
3653 case $cross_compiling:$ac_tool_warned in
3654yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657ac_tool_warned=yes ;;
3658esac
3659 CC=$ac_ct_CC
3660 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003661else
3662 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003663fi
3664
Jack Jansendd19cf82001-12-06 22:36:17 +00003665if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003666 if test -n "$ac_tool_prefix"; then
3667 # 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 +00003668set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3670$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003671if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003673else
3674 if test -n "$CC"; then
3675 ac_cv_prog_CC="$CC" # Let the user override the test.
3676else
Martin v. Löwis11437992002-04-12 09:54:03 +00003677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3678for as_dir in $PATH
3679do
3680 IFS=$as_save_IFS
3681 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 $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 +00003686 break 2
3687 fi
3688done
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003691
3692fi
3693fi
3694CC=$ac_cv_prog_CC
3695if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3697$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003698else
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3700$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003701fi
3702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706if test -z "$CC"; then
3707 # Extract the first word of "cc", so it can be a program name with args.
3708set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3710$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003711if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003713else
3714 if test -n "$CC"; then
3715 ac_cv_prog_CC="$CC" # Let the user override the test.
3716else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003717 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3719for as_dir in $PATH
3720do
3721 IFS=$as_save_IFS
3722 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003724 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3726 ac_prog_rejected=yes
3727 continue
3728 fi
3729 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 $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 +00003731 break 2
3732 fi
3733done
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003736
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003737if test $ac_prog_rejected = yes; then
3738 # We found a bogon in the path, so make sure we never use it.
3739 set dummy $ac_cv_prog_CC
3740 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003742 # We chose a different compiler from the bogus one.
3743 # However, it has the same basename, so the bogon will be chosen
3744 # first if we set CC to just the basename; use the full file name.
3745 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003746 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747 fi
3748fi
3749fi
3750fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003751CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3754$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755else
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3757$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758fi
3759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
3762if test -z "$CC"; then
3763 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003765 do
3766 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3767set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3769$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003770if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003772else
3773 if test -n "$CC"; then
3774 ac_cv_prog_CC="$CC" # Let the user override the test.
3775else
Martin v. Löwis11437992002-04-12 09:54:03 +00003776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3777for as_dir in $PATH
3778do
3779 IFS=$as_save_IFS
3780 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 $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 +00003785 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003786 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003787done
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003790
3791fi
3792fi
3793CC=$ac_cv_prog_CC
3794if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3796$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003797else
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003800fi
3801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802
Martin v. Löwis11437992002-04-12 09:54:03 +00003803 test -n "$CC" && break
3804 done
3805fi
3806if test -z "$CC"; then
3807 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003809do
3810 # Extract the first word of "$ac_prog", so it can be a program name with args.
3811set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3813$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003814if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003816else
3817 if test -n "$ac_ct_CC"; then
3818 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3819else
3820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3821for as_dir in $PATH
3822do
3823 IFS=$as_save_IFS
3824 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 $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 +00003829 break 2
3830 fi
3831done
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835fi
3836fi
3837ac_ct_CC=$ac_cv_prog_ac_ct_CC
3838if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3840$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003841else
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3843$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003844fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846
Martin v. Löwis11437992002-04-12 09:54:03 +00003847 test -n "$ac_ct_CC" && break
3848done
Michael W. Hudson54241132001-12-07 15:38:26 +00003849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850 if test "x$ac_ct_CC" = x; then
3851 CC=""
3852 else
3853 case $cross_compiling:$ac_tool_warned in
3854yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003855{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3856$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857ac_tool_warned=yes ;;
3858esac
3859 CC=$ac_ct_CC
3860 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003861fi
3862
3863fi
3864
3865
Matthias Kloseb9621712010-04-24 17:59:49 +00003866test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003868as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003869See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003870
3871# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003872$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3873set X $ac_compile
3874ac_compiler=$2
3875for ac_option in --version -v -V -qversion; do
3876 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877case "(($ac_try" in
3878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3879 *) ac_try_echo=$ac_try;;
3880esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3882$as_echo "$ac_try_echo"; } >&5
3883 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003884 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 if test -s conftest.err; then
3886 sed '10a\
3887... rest of stderr output deleted ...
3888 10q' conftest.err >conftest.er1
3889 cat conftest.er1 >&5
3890 fi
3891 rm -f conftest.er1 conftest.err
3892 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3893 test $ac_status = 0; }
3894done
Martin v. Löwis11437992002-04-12 09:54:03 +00003895
Matthias Kloseb9621712010-04-24 17:59:49 +00003896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003897/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003898
Martin v. Löwis11437992002-04-12 09:54:03 +00003899int
3900main ()
3901{
3902
3903 ;
3904 return 0;
3905}
3906_ACEOF
3907ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003908ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003909# Try to create an executable without -o first, disregard a.out.
3910# It will help us diagnose broken compilers, and finding out an intuition
3911# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3913$as_echo_n "checking whether the C compiler works... " >&6; }
3914ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3915
3916# The possible output files:
3917ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3918
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919ac_rmfiles=
3920for ac_file in $ac_files
3921do
3922 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003923 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3925 esac
3926done
3927rm -f $ac_rmfiles
3928
Matthias Kloseb9621712010-04-24 17:59:49 +00003929if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930case "(($ac_try" in
3931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3932 *) ac_try_echo=$ac_try;;
3933esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003934eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3935$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003937 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3939 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3941# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3942# in a Makefile. We should not override ac_cv_exeext if it was cached,
3943# so that the user can short-circuit this test for compilers unknown to
3944# Autoconf.
3945for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003946do
3947 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003948 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003950 ;;
3951 [ab].out )
3952 # We found the default executable, but exeext='' is most
3953 # certainly right.
3954 break;;
3955 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957 then :; else
3958 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3959 fi
3960 # We set ac_cv_exeext here because the later test for it is not
3961 # safe: cross compilers may not add the suffix if given an `-o'
3962 # argument, so we may need to know it at that point already.
3963 # Even if this section looks crufty: it has the advantage of
3964 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003965 break;;
3966 * )
3967 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003968 esac
3969done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970test "$ac_cv_exeext" = no && ac_cv_exeext=
3971
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003972else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 ac_file=''
3974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003975if test -z "$ac_file"; then :
3976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3977$as_echo "no" >&6; }
3978$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003979sed 's/^/| /' conftest.$ac_ext >&5
3980
Matthias Kloseb9621712010-04-24 17:59:49 +00003981{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003983as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003984See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003985else
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3987$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3990$as_echo_n "checking for C compiler default output file name... " >&6; }
3991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3992$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003993ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003994
Matthias Kloseb9621712010-04-24 17:59:49 +00003995rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3998$as_echo_n "checking for suffix of executables... " >&6; }
3999if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000case "(($ac_try" in
4001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4002 *) ac_try_echo=$ac_try;;
4003esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004004eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4005$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004007 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004008 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4009 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4011# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4012# work properly (i.e., refer to `conftest.exe'), while it won't with
4013# `rm'.
4014for ac_file in conftest.exe conftest conftest.*; do
4015 test -f "$ac_file" || continue
4016 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004017 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4019 break;;
4020 * ) break;;
4021 esac
4022done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004023else
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004026as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004027See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004029rm -f conftest conftest$ac_cv_exeext
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4031$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032
4033rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004034EXEEXT=$ac_cv_exeext
4035ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4037/* end confdefs.h. */
4038#include <stdio.h>
4039int
4040main ()
4041{
4042FILE *f = fopen ("conftest.out", "w");
4043 return ferror (f) || fclose (f) != 0;
4044
4045 ;
4046 return 0;
4047}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004049ac_clean_files="$ac_clean_files conftest.out"
4050# Check that the compiler produces executables we can run. If not, either
4051# the compiler is broken, or we cross compile.
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4053$as_echo_n "checking whether we are cross compiling... " >&6; }
4054if test "$cross_compiling" != yes; then
4055 { { ac_try="$ac_link"
4056case "(($ac_try" in
4057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058 *) ac_try_echo=$ac_try;;
4059esac
4060eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4061$as_echo "$ac_try_echo"; } >&5
4062 (eval "$ac_link") 2>&5
4063 ac_status=$?
4064 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4065 test $ac_status = 0; }
4066 if { ac_try='./conftest$ac_cv_exeext'
4067 { { case "(($ac_try" in
4068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4069 *) ac_try_echo=$ac_try;;
4070esac
4071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4072$as_echo "$ac_try_echo"; } >&5
4073 (eval "$ac_try") 2>&5
4074 ac_status=$?
4075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4076 test $ac_status = 0; }; }; then
4077 cross_compiling=no
4078 else
4079 if test "$cross_compiling" = maybe; then
4080 cross_compiling=yes
4081 else
4082 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004084as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004085If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004086See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 fi
4088 fi
4089fi
4090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4091$as_echo "$cross_compiling" >&6; }
4092
4093rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4094ac_clean_files=$ac_clean_files_save
4095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4096$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004097if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004098 $as_echo_n "(cached) " >&6
4099else
4100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004101/* end confdefs.h. */
4102
4103int
4104main ()
4105{
4106
4107 ;
4108 return 0;
4109}
4110_ACEOF
4111rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004112if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113case "(($ac_try" in
4114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4115 *) ac_try_echo=$ac_try;;
4116esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004117eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4118$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004119 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4122 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123 for ac_file in conftest.o conftest.obj conftest.*; do
4124 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4128 break;;
4129 esac
4130done
4131else
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004133sed 's/^/| /' conftest.$ac_ext >&5
4134
Matthias Kloseb9621712010-04-24 17:59:49 +00004135{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004137as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004138See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004139fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004140rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4143$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004144OBJEXT=$ac_cv_objext
4145ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4147$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004148if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004150else
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004153
Martin v. Löwis11437992002-04-12 09:54:03 +00004154int
4155main ()
4156{
4157#ifndef __GNUC__
4158 choke me
4159#endif
4160
4161 ;
4162 return 0;
4163}
4164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 ac_compiler_gnu=yes
4167else
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004171ac_cv_c_compiler_gnu=$ac_compiler_gnu
4172
4173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4175$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4176if test $ac_compiler_gnu = yes; then
4177 GCC=yes
4178else
4179 GCC=
4180fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004181ac_test_CFLAGS=${CFLAGS+set}
4182ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4184$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004185if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004187else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004188 ac_save_c_werror_flag=$ac_c_werror_flag
4189 ac_c_werror_flag=yes
4190 ac_cv_prog_cc_g=no
4191 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004194
Martin v. Löwis11437992002-04-12 09:54:03 +00004195int
4196main ()
4197{
4198
4199 ;
4200 return 0;
4201}
4202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004203if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004204 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004205else
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 CFLAGS=""
4207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208/* end confdefs.h. */
4209
4210int
4211main ()
4212{
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004218if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219
Matthias Kloseb9621712010-04-24 17:59:49 +00004220else
4221 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004222 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224/* end confdefs.h. */
4225
4226int
4227main ()
4228{
4229
4230 ;
4231 return 0;
4232}
4233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004234if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4242 ac_c_werror_flag=$ac_save_c_werror_flag
4243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4245$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004246if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004247 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004248elif test $ac_cv_prog_cc_g = yes; then
4249 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004250 CFLAGS="-g -O2"
4251 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004252 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004253 fi
4254else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004255 if test "$GCC" = yes; then
4256 CFLAGS="-O2"
4257 else
4258 CFLAGS=
4259 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4262$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004263if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004264 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004265else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004267ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004269/* end confdefs.h. */
4270#include <stdarg.h>
4271#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004272struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004273/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4274struct buf { int x; };
4275FILE * (*rcsopen) (struct buf *, struct stat *, int);
4276static char *e (p, i)
4277 char **p;
4278 int i;
4279{
4280 return p[i];
4281}
4282static char *f (char * (*g) (char **, int), char **p, ...)
4283{
4284 char *s;
4285 va_list v;
4286 va_start (v,p);
4287 s = g (p, va_arg (v,int));
4288 va_end (v);
4289 return s;
4290}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004291
4292/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4293 function prototypes and stuff, but not '\xHH' hex character constants.
4294 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004296 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4297 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004299int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4302 inside strings and character constants. */
4303#define FOO(x) 'x'
4304int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4305
Skip Montanaro6dead952003-09-25 14:50:04 +00004306int test (int i, double x);
4307struct s1 {int (*f) (int a);};
4308struct s2 {int (*f) (double a);};
4309int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4310int argc;
4311char **argv;
4312int
4313main ()
4314{
4315return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4316 ;
4317 return 0;
4318}
4319_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4321 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004322do
4323 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327rm -f core conftest.err conftest.$ac_objext
4328 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004329done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004331CC=$ac_save_CC
4332
4333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334# AC_CACHE_VAL
4335case "x$ac_cv_prog_cc_c89" in
4336 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4338$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4341$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004342 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4345$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004346esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004347if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004348
Matthias Kloseb9621712010-04-24 17:59:49 +00004349fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004350
Martin v. Löwis11437992002-04-12 09:54:03 +00004351ac_ext=c
4352ac_cpp='$CPP $CPPFLAGS'
4353ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4354ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4355ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004356
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004357ac_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
4362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4363$as_echo_n "checking how to run the C preprocessor... " >&6; }
4364# On Suns, sometimes $CPP names a directory.
4365if test -n "$CPP" && test -d "$CPP"; then
4366 CPP=
4367fi
4368if test -z "$CPP"; then
4369 if ${ac_cv_prog_CPP+:} false; then :
4370 $as_echo_n "(cached) " >&6
4371else
4372 # Double quotes because CPP needs to be expanded
4373 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4374 do
4375 ac_preproc_ok=false
4376for ac_c_preproc_warn_flag in '' yes
4377do
4378 # Use a header file that comes with gcc, so configuring glibc
4379 # with a fresh cross-compiler works.
4380 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4381 # <limits.h> exists even on freestanding compilers.
4382 # On the NeXT, cc -E runs the code through the compiler's parser,
4383 # not just through cpp. "Syntax error" is here to catch this case.
4384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4385/* end confdefs.h. */
4386#ifdef __STDC__
4387# include <limits.h>
4388#else
4389# include <assert.h>
4390#endif
4391 Syntax error
4392_ACEOF
4393if ac_fn_c_try_cpp "$LINENO"; then :
4394
4395else
4396 # Broken: fails on valid input.
4397continue
4398fi
4399rm -f conftest.err conftest.i conftest.$ac_ext
4400
4401 # OK, works on sane cases. Now check whether nonexistent headers
4402 # can be detected and how.
4403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4404/* end confdefs.h. */
4405#include <ac_nonexistent.h>
4406_ACEOF
4407if ac_fn_c_try_cpp "$LINENO"; then :
4408 # Broken: success on invalid input.
4409continue
4410else
4411 # Passes both tests.
4412ac_preproc_ok=:
4413break
4414fi
4415rm -f conftest.err conftest.i conftest.$ac_ext
4416
4417done
4418# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4419rm -f conftest.i conftest.err conftest.$ac_ext
4420if $ac_preproc_ok; then :
4421 break
4422fi
4423
4424 done
4425 ac_cv_prog_CPP=$CPP
4426
4427fi
4428 CPP=$ac_cv_prog_CPP
4429else
4430 ac_cv_prog_CPP=$CPP
4431fi
4432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4433$as_echo "$CPP" >&6; }
4434ac_preproc_ok=false
4435for ac_c_preproc_warn_flag in '' yes
4436do
4437 # Use a header file that comes with gcc, so configuring glibc
4438 # with a fresh cross-compiler works.
4439 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4440 # <limits.h> exists even on freestanding compilers.
4441 # On the NeXT, cc -E runs the code through the compiler's parser,
4442 # not just through cpp. "Syntax error" is here to catch this case.
4443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4444/* end confdefs.h. */
4445#ifdef __STDC__
4446# include <limits.h>
4447#else
4448# include <assert.h>
4449#endif
4450 Syntax error
4451_ACEOF
4452if ac_fn_c_try_cpp "$LINENO"; then :
4453
4454else
4455 # Broken: fails on valid input.
4456continue
4457fi
4458rm -f conftest.err conftest.i conftest.$ac_ext
4459
4460 # OK, works on sane cases. Now check whether nonexistent headers
4461 # can be detected and how.
4462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4463/* end confdefs.h. */
4464#include <ac_nonexistent.h>
4465_ACEOF
4466if ac_fn_c_try_cpp "$LINENO"; then :
4467 # Broken: success on invalid input.
4468continue
4469else
4470 # Passes both tests.
4471ac_preproc_ok=:
4472break
4473fi
4474rm -f conftest.err conftest.i conftest.$ac_ext
4475
4476done
4477# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4478rm -f conftest.i conftest.err conftest.$ac_ext
4479if $ac_preproc_ok; then :
4480
4481else
4482 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4483$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4484as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4485See \`config.log' for more details" "$LINENO" 5; }
4486fi
4487
4488ac_ext=c
4489ac_cpp='$CPP $CPPFLAGS'
4490ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4491ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4492ac_compiler_gnu=$ac_cv_c_compiler_gnu
4493
4494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4495$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4496if ${ac_cv_path_GREP+:} false; then :
4497 $as_echo_n "(cached) " >&6
4498else
4499 if test -z "$GREP"; then
4500 ac_path_GREP_found=false
4501 # Loop through the user's path and test for each of PROGNAME-LIST
4502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4504do
4505 IFS=$as_save_IFS
4506 test -z "$as_dir" && as_dir=.
4507 for ac_prog in grep ggrep; do
4508 for ac_exec_ext in '' $ac_executable_extensions; do
4509 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4510 as_fn_executable_p "$ac_path_GREP" || continue
4511# Check for GNU ac_path_GREP and select it if it is found.
4512 # Check for GNU $ac_path_GREP
4513case `"$ac_path_GREP" --version 2>&1` in
4514*GNU*)
4515 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4516*)
4517 ac_count=0
4518 $as_echo_n 0123456789 >"conftest.in"
4519 while :
4520 do
4521 cat "conftest.in" "conftest.in" >"conftest.tmp"
4522 mv "conftest.tmp" "conftest.in"
4523 cp "conftest.in" "conftest.nl"
4524 $as_echo 'GREP' >> "conftest.nl"
4525 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4526 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4527 as_fn_arith $ac_count + 1 && ac_count=$as_val
4528 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4529 # Best one so far, save it but keep looking for a better one
4530 ac_cv_path_GREP="$ac_path_GREP"
4531 ac_path_GREP_max=$ac_count
4532 fi
4533 # 10*(2^10) chars as input seems more than enough
4534 test $ac_count -gt 10 && break
4535 done
4536 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4537esac
4538
4539 $ac_path_GREP_found && break 3
4540 done
4541 done
4542 done
4543IFS=$as_save_IFS
4544 if test -z "$ac_cv_path_GREP"; then
4545 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4546 fi
4547else
4548 ac_cv_path_GREP=$GREP
4549fi
4550
4551fi
4552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4553$as_echo "$ac_cv_path_GREP" >&6; }
4554 GREP="$ac_cv_path_GREP"
4555
4556
Łukasz Langaa785c872016-09-09 17:37:37 -07004557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4558$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4559if ${ac_cv_path_SED+:} false; then :
4560 $as_echo_n "(cached) " >&6
4561else
4562 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4563 for ac_i in 1 2 3 4 5 6 7; do
4564 ac_script="$ac_script$as_nl$ac_script"
4565 done
4566 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4567 { ac_script=; unset ac_script;}
4568 if test -z "$SED"; then
4569 ac_path_SED_found=false
4570 # Loop through the user's path and test for each of PROGNAME-LIST
4571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4572for as_dir in $PATH
4573do
4574 IFS=$as_save_IFS
4575 test -z "$as_dir" && as_dir=.
4576 for ac_prog in sed gsed; do
4577 for ac_exec_ext in '' $ac_executable_extensions; do
4578 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4579 as_fn_executable_p "$ac_path_SED" || continue
4580# Check for GNU ac_path_SED and select it if it is found.
4581 # Check for GNU $ac_path_SED
4582case `"$ac_path_SED" --version 2>&1` in
4583*GNU*)
4584 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4585*)
4586 ac_count=0
4587 $as_echo_n 0123456789 >"conftest.in"
4588 while :
4589 do
4590 cat "conftest.in" "conftest.in" >"conftest.tmp"
4591 mv "conftest.tmp" "conftest.in"
4592 cp "conftest.in" "conftest.nl"
4593 $as_echo '' >> "conftest.nl"
4594 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4595 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4596 as_fn_arith $ac_count + 1 && ac_count=$as_val
4597 if test $ac_count -gt ${ac_path_SED_max-0}; then
4598 # Best one so far, save it but keep looking for a better one
4599 ac_cv_path_SED="$ac_path_SED"
4600 ac_path_SED_max=$ac_count
4601 fi
4602 # 10*(2^10) chars as input seems more than enough
4603 test $ac_count -gt 10 && break
4604 done
4605 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4606esac
4607
4608 $ac_path_SED_found && break 3
4609 done
4610 done
4611 done
4612IFS=$as_save_IFS
4613 if test -z "$ac_cv_path_SED"; then
4614 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4615 fi
4616else
4617 ac_cv_path_SED=$SED
4618fi
4619
4620fi
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4622$as_echo "$ac_cv_path_SED" >&6; }
4623 SED="$ac_cv_path_SED"
4624 rm -f conftest.sed
4625
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004626
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004627
4628
Matthias Kloseb9621712010-04-24 17:59:49 +00004629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4630$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004632# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004633if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004634 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004635
4636 case $withval in
4637 no) with_cxx_main=no
4638 MAINCC='$(CC)';;
4639 yes) with_cxx_main=yes
4640 MAINCC='$(CXX)';;
4641 *) with_cxx_main=yes
4642 MAINCC=$withval
4643 if test -z "$CXX"
4644 then
4645 CXX=$withval
4646 fi;;
4647 esac
4648else
4649
4650 with_cxx_main=no
4651 MAINCC='$(CC)'
4652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004653fi
4654
Matthias Kloseb9621712010-04-24 17:59:49 +00004655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4656$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004657
4658preset_cxx="$CXX"
4659if test -z "$CXX"
4660then
4661 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004662 gcc) if test -n "$ac_tool_prefix"; then
4663 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4664set dummy ${ac_tool_prefix}g++; ac_word=$2
4665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4666$as_echo_n "checking for $ac_word... " >&6; }
4667if ${ac_cv_path_CXX+:} false; then :
4668 $as_echo_n "(cached) " >&6
4669else
4670 case $CXX in
4671 [\\/]* | ?:[\\/]*)
4672 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4673 ;;
4674 *)
4675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4676for as_dir in notfound
4677do
4678 IFS=$as_save_IFS
4679 test -z "$as_dir" && as_dir=.
4680 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004681 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004682 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4683 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4684 break 2
4685 fi
4686done
4687 done
4688IFS=$as_save_IFS
4689
4690 ;;
4691esac
4692fi
4693CXX=$ac_cv_path_CXX
4694if test -n "$CXX"; then
4695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4696$as_echo "$CXX" >&6; }
4697else
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4699$as_echo "no" >&6; }
4700fi
4701
4702
4703fi
4704if test -z "$ac_cv_path_CXX"; then
4705 ac_pt_CXX=$CXX
4706 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004707set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4709$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004710if ${ac_cv_path_ac_pt_CXX+:} false; then :
4711 $as_echo_n "(cached) " >&6
4712else
4713 case $ac_pt_CXX in
4714 [\\/]* | ?:[\\/]*)
4715 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4716 ;;
4717 *)
4718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4719for as_dir in notfound
4720do
4721 IFS=$as_save_IFS
4722 test -z "$as_dir" && as_dir=.
4723 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004724 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004725 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4727 break 2
4728 fi
4729done
4730 done
4731IFS=$as_save_IFS
4732
4733 ;;
4734esac
4735fi
4736ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4737if test -n "$ac_pt_CXX"; then
4738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4739$as_echo "$ac_pt_CXX" >&6; }
4740else
4741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4742$as_echo "no" >&6; }
4743fi
4744
4745 if test "x$ac_pt_CXX" = x; then
4746 CXX="g++"
4747 else
4748 case $cross_compiling:$ac_tool_warned in
4749yes:)
4750{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4751$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4752ac_tool_warned=yes ;;
4753esac
4754 CXX=$ac_pt_CXX
4755 fi
4756else
4757 CXX="$ac_cv_path_CXX"
4758fi
4759 ;;
4760 cc) if test -n "$ac_tool_prefix"; then
4761 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4762set dummy ${ac_tool_prefix}c++; ac_word=$2
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4764$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004765if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767else
4768 case $CXX in
4769 [\\/]* | ?:[\\/]*)
4770 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4771 ;;
4772 *)
4773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4774for as_dir in notfound
4775do
4776 IFS=$as_save_IFS
4777 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004779 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004780 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782 break 2
4783 fi
4784done
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004786IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788 ;;
4789esac
4790fi
4791CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004792if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4794$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004795else
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4797$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004799
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004800
4801fi
4802if test -z "$ac_cv_path_CXX"; then
4803 ac_pt_CXX=$CXX
4804 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4807$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813 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 +00004814 ;;
4815 *)
4816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4817for as_dir in notfound
4818do
4819 IFS=$as_save_IFS
4820 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004822 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004823 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004824 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004825 break 2
4826 fi
4827done
Matthias Kloseb9621712010-04-24 17:59:49 +00004828 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004829IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831 ;;
4832esac
4833fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004834ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4835if test -n "$ac_pt_CXX"; then
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4837$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004838else
Matthias Kloseb9621712010-04-24 17:59:49 +00004839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4840$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004842
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004843 if test "x$ac_pt_CXX" = x; then
4844 CXX="c++"
4845 else
4846 case $cross_compiling:$ac_tool_warned in
4847yes:)
4848{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4849$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4850ac_tool_warned=yes ;;
4851esac
4852 CXX=$ac_pt_CXX
4853 fi
4854else
4855 CXX="$ac_cv_path_CXX"
4856fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858 clang|*/clang) if test -n "$ac_tool_prefix"; then
4859 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4860set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4862$as_echo_n "checking for $ac_word... " >&6; }
4863if ${ac_cv_path_CXX+:} false; then :
4864 $as_echo_n "(cached) " >&6
4865else
4866 case $CXX in
4867 [\\/]* | ?:[\\/]*)
4868 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4869 ;;
4870 *)
4871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4872for as_dir in notfound
4873do
4874 IFS=$as_save_IFS
4875 test -z "$as_dir" && as_dir=.
4876 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004878 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4880 break 2
4881 fi
4882done
4883 done
4884IFS=$as_save_IFS
4885
Ned Deilycbfb9a52012-06-23 16:02:19 -07004886 ;;
4887esac
4888fi
4889CXX=$ac_cv_path_CXX
4890if test -n "$CXX"; then
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4892$as_echo "$CXX" >&6; }
4893else
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895$as_echo "no" >&6; }
4896fi
4897
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004898
4899fi
4900if test -z "$ac_cv_path_CXX"; then
4901 ac_pt_CXX=$CXX
4902 # Extract the first word of "clang++", so it can be a program name with args.
4903set dummy clang++; ac_word=$2
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4905$as_echo_n "checking for $ac_word... " >&6; }
4906if ${ac_cv_path_ac_pt_CXX+:} false; then :
4907 $as_echo_n "(cached) " >&6
4908else
4909 case $ac_pt_CXX in
4910 [\\/]* | ?:[\\/]*)
4911 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4912 ;;
4913 *)
4914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4915for as_dir in notfound
4916do
4917 IFS=$as_save_IFS
4918 test -z "$as_dir" && as_dir=.
4919 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004920 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004921 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4923 break 2
4924 fi
4925done
4926 done
4927IFS=$as_save_IFS
4928
4929 ;;
4930esac
4931fi
4932ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4933if test -n "$ac_pt_CXX"; then
4934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4935$as_echo "$ac_pt_CXX" >&6; }
4936else
4937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4938$as_echo "no" >&6; }
4939fi
4940
4941 if test "x$ac_pt_CXX" = x; then
4942 CXX="clang++"
4943 else
4944 case $cross_compiling:$ac_tool_warned in
4945yes:)
4946{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4947$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4948ac_tool_warned=yes ;;
4949esac
4950 CXX=$ac_pt_CXX
4951 fi
4952else
4953 CXX="$ac_cv_path_CXX"
4954fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004955 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004956 icc|*/icc) if test -n "$ac_tool_prefix"; then
4957 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4958set dummy ${ac_tool_prefix}icpc; ac_word=$2
4959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4960$as_echo_n "checking for $ac_word... " >&6; }
4961if ${ac_cv_path_CXX+:} false; then :
4962 $as_echo_n "(cached) " >&6
4963else
4964 case $CXX in
4965 [\\/]* | ?:[\\/]*)
4966 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4967 ;;
4968 *)
4969 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4970for as_dir in notfound
4971do
4972 IFS=$as_save_IFS
4973 test -z "$as_dir" && as_dir=.
4974 for ac_exec_ext in '' $ac_executable_extensions; do
4975 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4976 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4977 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4978 break 2
4979 fi
4980done
4981 done
4982IFS=$as_save_IFS
4983
4984 ;;
4985esac
4986fi
4987CXX=$ac_cv_path_CXX
4988if test -n "$CXX"; then
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4990$as_echo "$CXX" >&6; }
4991else
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4993$as_echo "no" >&6; }
4994fi
4995
4996
4997fi
4998if test -z "$ac_cv_path_CXX"; then
4999 ac_pt_CXX=$CXX
5000 # Extract the first word of "icpc", so it can be a program name with args.
5001set dummy icpc; ac_word=$2
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003$as_echo_n "checking for $ac_word... " >&6; }
5004if ${ac_cv_path_ac_pt_CXX+:} false; then :
5005 $as_echo_n "(cached) " >&6
5006else
5007 case $ac_pt_CXX in
5008 [\\/]* | ?:[\\/]*)
5009 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5010 ;;
5011 *)
5012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in notfound
5014do
5015 IFS=$as_save_IFS
5016 test -z "$as_dir" && as_dir=.
5017 for ac_exec_ext in '' $ac_executable_extensions; do
5018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5019 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021 break 2
5022 fi
5023done
5024 done
5025IFS=$as_save_IFS
5026
5027 ;;
5028esac
5029fi
5030ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5031if test -n "$ac_pt_CXX"; then
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5033$as_echo "$ac_pt_CXX" >&6; }
5034else
5035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036$as_echo "no" >&6; }
5037fi
5038
5039 if test "x$ac_pt_CXX" = x; then
5040 CXX="icpc"
5041 else
5042 case $cross_compiling:$ac_tool_warned in
5043yes:)
5044{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5045$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5046ac_tool_warned=yes ;;
5047esac
5048 CXX=$ac_pt_CXX
5049 fi
5050else
5051 CXX="$ac_cv_path_CXX"
5052fi
5053 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054 esac
5055 if test "$CXX" = "notfound"
5056 then
5057 CXX=""
5058 fi
5059fi
5060if test -z "$CXX"
5061then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005062 if test -n "$ac_tool_prefix"; then
5063 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5064 do
5065 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5066set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5068$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005069if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005071else
5072 if test -n "$CXX"; then
5073 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5074else
5075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5076for as_dir in $PATH
5077do
5078 IFS=$as_save_IFS
5079 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005081 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005082 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005084 break 2
5085 fi
5086done
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005088IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089
5090fi
5091fi
5092CXX=$ac_cv_prog_CXX
5093if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5095$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005096else
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5098$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005099fi
5100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005102 test -n "$CXX" && break
5103 done
5104fi
5105if test -z "$CXX"; then
5106 ac_ct_CXX=$CXX
5107 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5108do
5109 # Extract the first word of "$ac_prog", so it can be a program name with args.
5110set dummy $ac_prog; ac_word=$2
5111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5112$as_echo_n "checking for $ac_word... " >&6; }
5113if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5114 $as_echo_n "(cached) " >&6
5115else
5116 if test -n "$ac_ct_CXX"; then
5117 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5118else
5119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5120for as_dir in $PATH
5121do
5122 IFS=$as_save_IFS
5123 test -z "$as_dir" && as_dir=.
5124 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005125 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005126 ac_cv_prog_ac_ct_CXX="$ac_prog"
5127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5128 break 2
5129 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005130done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005131 done
5132IFS=$as_save_IFS
5133
5134fi
5135fi
5136ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5137if test -n "$ac_ct_CXX"; then
5138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5139$as_echo "$ac_ct_CXX" >&6; }
5140else
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5142$as_echo "no" >&6; }
5143fi
5144
5145
5146 test -n "$ac_ct_CXX" && break
5147done
5148
5149 if test "x$ac_ct_CXX" = x; then
5150 CXX="notfound"
5151 else
5152 case $cross_compiling:$ac_tool_warned in
5153yes:)
5154{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5155$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5156ac_tool_warned=yes ;;
5157esac
5158 CXX=$ac_ct_CXX
5159 fi
5160fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005161
5162 if test "$CXX" = "notfound"
5163 then
5164 CXX=""
5165 fi
5166fi
5167if test "$preset_cxx" != "$CXX"
5168then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005169 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005170
5171 By default, distutils will build C++ extension modules with \"$CXX\".
5172 If this is not intended, then set CXX on the configure command line.
5173 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005174$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005175
5176 By default, distutils will build C++ extension modules with \"$CXX\".
5177 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005178 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005179fi
5180
5181
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005182MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5183
5184
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5186$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5187cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005188#undef bfin
5189#undef cris
5190#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005191#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005192#undef hppa
5193#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005194#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005195#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005196#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005197#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005198#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005199#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005200 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005201#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005202# if defined(__x86_64__) && defined(__LP64__)
5203 x86_64-linux-gnu
5204# elif defined(__x86_64__) && defined(__ILP32__)
5205 x86_64-linux-gnux32
5206# elif defined(__i386__)
5207 i386-linux-gnu
5208# elif defined(__aarch64__) && defined(__AARCH64EL__)
5209# if defined(__ILP32__)
5210 aarch64_ilp32-linux-gnu
5211# else
5212 aarch64-linux-gnu
5213# endif
5214# elif defined(__aarch64__) && defined(__AARCH64EB__)
5215# if defined(__ILP32__)
5216 aarch64_be_ilp32-linux-gnu
5217# else
5218 aarch64_be-linux-gnu
5219# endif
5220# elif defined(__alpha__)
5221 alpha-linux-gnu
5222# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5223# if defined(__ARMEL__)
5224 arm-linux-gnueabihf
5225# else
5226 armeb-linux-gnueabihf
5227# endif
5228# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5229# if defined(__ARMEL__)
5230 arm-linux-gnueabi
5231# else
5232 armeb-linux-gnueabi
5233# endif
5234# elif defined(__hppa__)
5235 hppa-linux-gnu
5236# elif defined(__ia64__)
5237 ia64-linux-gnu
5238# elif defined(__m68k__) && !defined(__mcoldfire__)
5239 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005240# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5241# if _MIPS_SIM == _ABIO32
5242 mipsisa32r6el-linux-gnu
5243# elif _MIPS_SIM == _ABIN32
5244 mipsisa64r6el-linux-gnuabin32
5245# elif _MIPS_SIM == _ABI64
5246 mipsisa64r6el-linux-gnuabi64
5247# else
5248# error unknown platform triplet
5249# endif
5250# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5251# if _MIPS_SIM == _ABIO32
5252 mipsisa32r6-linux-gnu
5253# elif _MIPS_SIM == _ABIN32
5254 mipsisa64r6-linux-gnuabin32
5255# elif _MIPS_SIM == _ABI64
5256 mipsisa64r6-linux-gnuabi64
5257# else
5258# error unknown platform triplet
5259# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005260# elif defined(__mips_hard_float) && defined(_MIPSEL)
5261# if _MIPS_SIM == _ABIO32
5262 mipsel-linux-gnu
5263# elif _MIPS_SIM == _ABIN32
5264 mips64el-linux-gnuabin32
5265# elif _MIPS_SIM == _ABI64
5266 mips64el-linux-gnuabi64
5267# else
5268# error unknown platform triplet
5269# endif
5270# elif defined(__mips_hard_float)
5271# if _MIPS_SIM == _ABIO32
5272 mips-linux-gnu
5273# elif _MIPS_SIM == _ABIN32
5274 mips64-linux-gnuabin32
5275# elif _MIPS_SIM == _ABI64
5276 mips64-linux-gnuabi64
5277# else
5278# error unknown platform triplet
5279# endif
5280# elif defined(__or1k__)
5281 or1k-linux-gnu
5282# elif defined(__powerpc__) && defined(__SPE__)
5283 powerpc-linux-gnuspe
5284# elif defined(__powerpc64__)
5285# if defined(__LITTLE_ENDIAN__)
5286 powerpc64le-linux-gnu
5287# else
5288 powerpc64-linux-gnu
5289# endif
5290# elif defined(__powerpc__)
5291 powerpc-linux-gnu
5292# elif defined(__s390x__)
5293 s390x-linux-gnu
5294# elif defined(__s390__)
5295 s390-linux-gnu
5296# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5297 sh4-linux-gnu
5298# elif defined(__sparc__) && defined(__arch64__)
5299 sparc64-linux-gnu
5300# elif defined(__sparc__)
5301 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005302# elif defined(__riscv)
5303# if __riscv_xlen == 32
5304 riscv32-linux-gnu
5305# elif __riscv_xlen == 64
5306 riscv64-linux-gnu
5307# else
5308# error unknown platform triplet
5309# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005310# else
5311# error unknown platform triplet
5312# endif
5313#elif defined(__FreeBSD_kernel__)
5314# if defined(__LP64__)
5315 x86_64-kfreebsd-gnu
5316# elif defined(__i386__)
5317 i386-kfreebsd-gnu
5318# else
5319# error unknown platform triplet
5320# endif
5321#elif defined(__gnu_hurd__)
5322 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005323#elif defined(__APPLE__)
5324 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005325#elif defined(__VXWORKS__)
5326 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327#else
5328# error unknown platform triplet
5329#endif
5330
5331EOF
5332
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005333if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005334 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5336$as_echo "$PLATFORM_TRIPLET" >&6; }
5337else
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5339$as_echo "none" >&6; }
5340fi
5341rm -f conftest.c conftest.out
5342
5343if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5344 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5345 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5346 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005347elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5348 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005349fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005350
doko@ubuntu.com55532312016-06-14 08:55:19 +02005351if test x$MULTIARCH != x; then
5352 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5353fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005354
5355
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5357$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5358save_LDFLAGS="$LDFLAGS"
5359LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005360
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5362/* end confdefs.h. */
5363
5364int
5365main ()
5366{
5367
5368 ;
5369 return 0;
5370}
5371_ACEOF
5372if ac_fn_c_try_link "$LINENO"; then :
5373 NO_AS_NEEDED="-Wl,--no-as-needed"
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5375$as_echo "yes" >&6; }
5376else
5377 NO_AS_NEEDED=""
5378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5379$as_echo "no" >&6; }
5380fi
5381rm -f core conftest.err conftest.$ac_objext \
5382 conftest$ac_exeext conftest.$ac_ext
5383LDFLAGS="$save_LDFLAGS"
5384
5385
5386
5387# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388
Matthias Kloseb9621712010-04-24 17:59:49 +00005389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5390$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005391if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393else
5394 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5395 then ac_cv_path_EGREP="$GREP -E"
5396 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 # Loop through the user's path and test for each of PROGNAME-LIST
5400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5402do
5403 IFS=$as_save_IFS
5404 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 for ac_prog in egrep; do
5406 for ac_exec_ext in '' $ac_executable_extensions; do
5407 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005408 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005409# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410 # Check for GNU $ac_path_EGREP
5411case `"$ac_path_EGREP" --version 2>&1` in
5412*GNU*)
5413 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5414*)
5415 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 while :
5418 do
5419 cat "conftest.in" "conftest.in" >"conftest.tmp"
5420 mv "conftest.tmp" "conftest.in"
5421 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5424 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005426 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5427 # Best one so far, save it but keep looking for a better one
5428 ac_cv_path_EGREP="$ac_path_EGREP"
5429 ac_path_EGREP_max=$ac_count
5430 fi
5431 # 10*(2^10) chars as input seems more than enough
5432 test $ac_count -gt 10 && break
5433 done
5434 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5435esac
5436
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 $ac_path_EGREP_found && break 3
5438 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005439 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005440 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005443 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 +00005444 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445else
5446 ac_cv_path_EGREP=$EGREP
5447fi
5448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005449 fi
5450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5452$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005454
5455
Matthias Kloseb9621712010-04-24 17:59:49 +00005456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5457$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005458if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005459 $as_echo_n "(cached) " >&6
5460else
5461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005462/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005463#include <stdlib.h>
5464#include <stdarg.h>
5465#include <string.h>
5466#include <float.h>
5467
5468int
5469main ()
5470{
5471
5472 ;
5473 return 0;
5474}
5475_ACEOF
5476if ac_fn_c_try_compile "$LINENO"; then :
5477 ac_cv_header_stdc=yes
5478else
5479 ac_cv_header_stdc=no
5480fi
5481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5482
5483if test $ac_cv_header_stdc = yes; then
5484 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5486/* end confdefs.h. */
5487#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005488
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005489_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005492
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005493else
Matthias Kloseb9621712010-04-24 17:59:49 +00005494 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005495fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005496rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497
Matthias Kloseb9621712010-04-24 17:59:49 +00005498fi
5499
5500if test $ac_cv_header_stdc = yes; then
5501 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5503/* end confdefs.h. */
5504#include <stdlib.h>
5505
5506_ACEOF
5507if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5508 $EGREP "free" >/dev/null 2>&1; then :
5509
5510else
5511 ac_cv_header_stdc=no
5512fi
5513rm -f conftest*
5514
5515fi
5516
5517if test $ac_cv_header_stdc = yes; then
5518 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5519 if test "$cross_compiling" = yes; then :
5520 :
5521else
5522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5523/* end confdefs.h. */
5524#include <ctype.h>
5525#include <stdlib.h>
5526#if ((' ' & 0x0FF) == 0x020)
5527# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5528# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5529#else
5530# define ISLOWER(c) \
5531 (('a' <= (c) && (c) <= 'i') \
5532 || ('j' <= (c) && (c) <= 'r') \
5533 || ('s' <= (c) && (c) <= 'z'))
5534# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5535#endif
5536
5537#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5538int
5539main ()
5540{
5541 int i;
5542 for (i = 0; i < 256; i++)
5543 if (XOR (islower (i), ISLOWER (i))
5544 || toupper (i) != TOUPPER (i))
5545 return 2;
5546 return 0;
5547}
5548_ACEOF
5549if ac_fn_c_try_run "$LINENO"; then :
5550
5551else
5552 ac_cv_header_stdc=no
5553fi
5554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5555 conftest.$ac_objext conftest.beam conftest.$ac_ext
5556fi
5557
5558fi
5559fi
5560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5561$as_echo "$ac_cv_header_stdc" >&6; }
5562if test $ac_cv_header_stdc = yes; then
5563
5564$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5565
5566fi
5567
5568# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5569for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5570 inttypes.h stdint.h unistd.h
5571do :
5572 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5573ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5574"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005575if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005576 cat >>confdefs.h <<_ACEOF
5577#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5578_ACEOF
5579
5580fi
5581
5582done
5583
5584
5585
5586 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 +02005587if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005588 MINIX=yes
5589else
5590 MINIX=
5591fi
5592
5593
5594 if test "$MINIX" = yes; then
5595
5596$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5597
5598
5599$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5600
5601
5602$as_echo "#define _MINIX 1" >>confdefs.h
5603
5604 fi
5605
5606
5607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5608$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005609if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005610 $as_echo_n "(cached) " >&6
5611else
5612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5613/* end confdefs.h. */
5614
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005615# define __EXTENSIONS__ 1
5616 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005617int
5618main ()
5619{
5620
5621 ;
5622 return 0;
5623}
5624_ACEOF
5625if ac_fn_c_try_compile "$LINENO"; then :
5626 ac_cv_safe_to_define___extensions__=yes
5627else
5628 ac_cv_safe_to_define___extensions__=no
5629fi
5630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5631fi
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5633$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5634 test $ac_cv_safe_to_define___extensions__ = yes &&
5635 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5636
5637 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5638
5639 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5640
5641 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5642
5643 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5644
5645
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646
Xavier de Gaye95750b12016-07-09 11:05:42 +02005647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5648$as_echo_n "checking for the Android API level... " >&6; }
5649cat >> conftest.c <<EOF
5650#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005651android_api = __ANDROID_API__
5652arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005653#else
5654#error not Android
5655#endif
5656EOF
5657
5658if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005659 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5660 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5662$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005663 if test -z "$ANDROID_API_LEVEL"; then
5664 echo 'Fatal: you must define __ANDROID_API__'
5665 exit 1
5666 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005667
5668cat >>confdefs.h <<_ACEOF
5669#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5670_ACEOF
5671
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005672
5673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5674$as_echo_n "checking for the Android arm ABI... " >&6; }
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5676$as_echo "$_arm_arch" >&6; }
5677 if test "$_arm_arch" = 7; then
5678 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5679 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5680 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005681else
5682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5683$as_echo "not Android" >&6; }
5684fi
5685rm -f conftest.c conftest.out
5686
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687# Check for unsupported systems
5688case $ac_sys_system/$ac_sys_release in
5689atheos*|Linux*/1*)
5690 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5691 echo See README for details.
5692 exit 1;;
5693esac
5694
5695
Matthias Kloseb9621712010-04-24 17:59:49 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5697$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698
5699# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005700if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701 withval=$with_suffix;
5702 case $withval in
5703 no) EXEEXT=;;
5704 yes) EXEEXT=.exe;;
5705 *) EXEEXT=$withval;;
5706 esac
5707fi
5708
Matthias Kloseb9621712010-04-24 17:59:49 +00005709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5710$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711
5712# Test whether we're running on a non-case-sensitive system, in which
5713# case we give a warning if no ext is given
5714
Matthias Kloseb9621712010-04-24 17:59:49 +00005715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5716$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717if test ! -d CaseSensitiveTestDir; then
5718mkdir CaseSensitiveTestDir
5719fi
5720
5721if test -d casesensitivetestdir
5722then
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5724$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725 BUILDEXEEXT=.exe
5726else
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729 BUILDEXEEXT=$EXEEXT
5730fi
5731rmdir CaseSensitiveTestDir
5732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733case $ac_sys_system in
5734hp*|HP*)
5735 case $CC in
5736 cc|*/cc) CC="$CC -Ae";;
5737 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738esac
5739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740
Matthias Kloseb9621712010-04-24 17:59:49 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5742$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743if test -z "$LIBRARY"
5744then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005745 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5748$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749
5750# LDLIBRARY is the name of the library to link against (as opposed to the
5751# name of the library into which to insert object files). BLDLIBRARY is also
5752# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5753# is blank as the main program is not linked directly against LDLIBRARY.
5754# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5755# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5756# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5757# DLLLIBRARY is the shared (i.e., DLL) library.
5758#
5759# RUNSHARED is used to run shared python without installed libraries
5760#
5761# INSTSONAME is the name of the shared library that will be use to install
5762# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005763#
5764# LDVERSION is the shared library version number, normally the Python version
5765# with the ABI build flags appended.
5766
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767
5768
5769
5770
5771
5772
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774LDLIBRARY="$LIBRARY"
5775BLDLIBRARY='$(LDLIBRARY)'
5776INSTSONAME='$(LDLIBRARY)'
5777DLLLIBRARY=''
5778LDLIBRARYDIR=''
5779RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005780LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782# LINKCC is the command that links the python executable -- default is $(CC).
5783# If CXX is set, and if it is needed to link a main function that was
5784# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5785# python might then depend on the C++ runtime
5786# This is altered for AIX in order to build the export list before
5787# linking.
5788
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5790$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791if test -z "$LINKCC"
5792then
5793 LINKCC='$(PURIFY) $(MAINCC)'
5794 case $ac_sys_system in
5795 AIX*)
5796 exp_extra="\"\""
5797 if test $ac_sys_release -ge 5 -o \
5798 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5799 exp_extra="."
5800 fi
5801 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802 QNX*)
5803 # qcc must be used because the other compilers do not
5804 # support -N.
5805 LINKCC=qcc;;
5806 esac
5807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5809$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810
5811# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5812# make sure we default having it set to "no": this is used by
5813# distutils.unixccompiler to know if it should add --enable-new-dtags
5814# to linker command lines, and failing to detect GNU ld simply results
5815# in the same bahaviour as before.
5816
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5818$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819ac_prog=ld
5820if test "$GCC" = yes; then
5821 ac_prog=`$CC -print-prog-name=ld`
5822fi
5823case `"$ac_prog" -V 2>&1 < /dev/null` in
5824 *GNU*)
5825 GNULD=yes;;
5826 *)
5827 GNULD=no;;
5828esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5830$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831
Matthias Kloseb9621712010-04-24 17:59:49 +00005832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5833$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005835if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836 enableval=$enable_shared;
5837fi
5838
5839
5840if test -z "$enable_shared"
5841then
5842 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005843 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844 enable_shared="yes";;
5845 *)
5846 enable_shared="no";;
5847 esac
5848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5850$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5853$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005855if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005856 enableval=$enable_profiling;
5857fi
5858
5859if test "x$enable_profiling" = xyes; then
5860 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005861 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863/* end confdefs.h. */
5864int main() { return 0; }
5865_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005866if ac_fn_c_try_link "$LINENO"; then :
5867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005869 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871rm -f core conftest.err conftest.$ac_objext \
5872 conftest$ac_exeext conftest.$ac_ext
5873 CC="$ac_save_cc"
5874else
5875 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5878$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879
doko@ubuntu.comba015832012-06-30 16:52:05 +02005880if test "x$enable_profiling" = xyes; then
5881 BASECFLAGS="-pg $BASECFLAGS"
5882 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883fi
5884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5886$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887
5888# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5889# library that we build, but we do not want to link against it (we
5890# will find it with a -framework option). For this reason there is an
5891# extra variable BLDLIBRARY against which Python and the extension
5892# modules are linked, BLDLIBRARY. This is normally the same as
5893# LDLIBRARY, but empty for MacOSX framework builds.
5894if test "$enable_framework"
5895then
5896 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005897 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 BLDLIBRARY=''
5899else
5900 BLDLIBRARY='$(LDLIBRARY)'
5901fi
5902
5903# Other platforms follow
5904if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005905 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906
Matthias Kloseb9621712010-04-24 17:59:49 +00005907$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
5909 case $ac_sys_system in
5910 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 LDLIBRARY='libpython$(LDVERSION).dll.a'
5912 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ;;
5914 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).so'
5916 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005917 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005919 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005920 then
5921 PY3LIBRARY=libpython3.so
5922 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005924 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).so'
5926 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005929 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005930 then
5931 PY3LIBRARY=libpython3.so
5932 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
5934 hp*|HP*)
5935 case `uname -m` in
5936 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005937 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
5939 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 ;;
5942 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005943 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005944 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947 LDLIBRARY='libpython$(LDVERSION).dylib'
5948 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005949 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005951 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005953 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005954 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955
5956 esac
5957else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005958 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959 case $ac_sys_system in
5960 CYGWIN*)
5961 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ;;
5964 esac
5965fi
5966
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005967if test "$cross_compiling" = yes; then
5968 RUNSHARED=
5969fi
5970
Matthias Kloseb9621712010-04-24 17:59:49 +00005971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5972$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005975if test -n "$ac_tool_prefix"; then
5976 for ac_prog in ar aal
5977 do
5978 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5979set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5981$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005982if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005983 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984else
5985 if test -n "$AR"; then
5986 ac_cv_prog_AR="$AR" # Let the user override the test.
5987else
5988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5989for as_dir in $PATH
5990do
5991 IFS=$as_save_IFS
5992 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005995 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997 break 2
5998 fi
5999done
Matthias Kloseb9621712010-04-24 17:59:49 +00006000 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001IFS=$as_save_IFS
6002
6003fi
6004fi
6005AR=$ac_cv_prog_AR
6006if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6008$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009else
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6011$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012fi
6013
6014
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006015 test -n "$AR" && break
6016 done
6017fi
6018if test -z "$AR"; then
6019 ac_ct_AR=$AR
6020 for ac_prog in ar aal
6021do
6022 # Extract the first word of "$ac_prog", so it can be a program name with args.
6023set dummy $ac_prog; ac_word=$2
6024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6025$as_echo_n "checking for $ac_word... " >&6; }
6026if ${ac_cv_prog_ac_ct_AR+:} false; then :
6027 $as_echo_n "(cached) " >&6
6028else
6029 if test -n "$ac_ct_AR"; then
6030 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6031else
6032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6033for as_dir in $PATH
6034do
6035 IFS=$as_save_IFS
6036 test -z "$as_dir" && as_dir=.
6037 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006038 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006039 ac_cv_prog_ac_ct_AR="$ac_prog"
6040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6041 break 2
6042 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006044 done
6045IFS=$as_save_IFS
6046
6047fi
6048fi
6049ac_ct_AR=$ac_cv_prog_ac_ct_AR
6050if test -n "$ac_ct_AR"; then
6051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6052$as_echo "$ac_ct_AR" >&6; }
6053else
6054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6055$as_echo "no" >&6; }
6056fi
6057
6058
6059 test -n "$ac_ct_AR" && break
6060done
6061
6062 if test "x$ac_ct_AR" = x; then
6063 AR="ar"
6064 else
6065 case $cross_compiling:$ac_tool_warned in
6066yes:)
6067{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6068$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6069ac_tool_warned=yes ;;
6070esac
6071 AR=$ac_ct_AR
6072 fi
6073fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074
6075
6076# tweak ARFLAGS only if the user didn't set it on the command line
6077
6078if test -z "$ARFLAGS"
6079then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006080 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081fi
6082
doko@ubuntu.com58844492012-06-30 18:25:32 +02006083if test -n "$ac_tool_prefix"; then
6084 for ac_prog in readelf
6085 do
6086 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6087set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6089$as_echo_n "checking for $ac_word... " >&6; }
6090if ${ac_cv_prog_READELF+:} false; then :
6091 $as_echo_n "(cached) " >&6
6092else
6093 if test -n "$READELF"; then
6094 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6095else
6096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6097for as_dir in $PATH
6098do
6099 IFS=$as_save_IFS
6100 test -z "$as_dir" && as_dir=.
6101 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006103 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6105 break 2
6106 fi
6107done
6108 done
6109IFS=$as_save_IFS
6110
6111fi
6112fi
6113READELF=$ac_cv_prog_READELF
6114if test -n "$READELF"; then
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6116$as_echo "$READELF" >&6; }
6117else
6118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6119$as_echo "no" >&6; }
6120fi
6121
6122
6123 test -n "$READELF" && break
6124 done
6125fi
6126if test -z "$READELF"; then
6127 ac_ct_READELF=$READELF
6128 for ac_prog in readelf
6129do
6130 # Extract the first word of "$ac_prog", so it can be a program name with args.
6131set dummy $ac_prog; ac_word=$2
6132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6133$as_echo_n "checking for $ac_word... " >&6; }
6134if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6135 $as_echo_n "(cached) " >&6
6136else
6137 if test -n "$ac_ct_READELF"; then
6138 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6139else
6140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6141for as_dir in $PATH
6142do
6143 IFS=$as_save_IFS
6144 test -z "$as_dir" && as_dir=.
6145 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006146 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006147 ac_cv_prog_ac_ct_READELF="$ac_prog"
6148 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6149 break 2
6150 fi
6151done
6152 done
6153IFS=$as_save_IFS
6154
6155fi
6156fi
6157ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6158if test -n "$ac_ct_READELF"; then
6159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6160$as_echo "$ac_ct_READELF" >&6; }
6161else
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6163$as_echo "no" >&6; }
6164fi
6165
6166
6167 test -n "$ac_ct_READELF" && break
6168done
6169
6170 if test "x$ac_ct_READELF" = x; then
6171 READELF=":"
6172 else
6173 case $cross_compiling:$ac_tool_warned in
6174yes:)
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6176$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6177ac_tool_warned=yes ;;
6178esac
6179 READELF=$ac_ct_READELF
6180 fi
6181fi
6182
6183if test "$cross_compiling" = yes; then
6184 case "$READELF" in
6185 readelf|:)
6186 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6187 ;;
6188 esac
6189fi
6190
6191
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006193case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006194hp*|HP*)
6195 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196 if test -z "$INSTALL"
6197 then
6198 INSTALL="${srcdir}/install-sh -c"
6199 fi
6200esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006201# Find a good install program. We prefer a C program (faster),
6202# so one script is as good as another. But avoid the broken or
6203# incompatible versions:
6204# SysV /etc/install, /usr/sbin/install
6205# SunOS /usr/etc/install
6206# IRIX /sbin/install
6207# AIX /bin/install
6208# AmigaOS /C/install, which installs bootblocks on floppy discs
6209# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6210# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6211# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6212# OS/2's system install, which has a completely different semantic
6213# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006214# Reject install programs that cannot install multiple files.
6215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6216$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006218if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006219 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220else
6221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6222for as_dir in $PATH
6223do
6224 IFS=$as_save_IFS
6225 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006226 # Account for people who put trailing slashes in PATH elements.
6227case $as_dir/ in #((
6228 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006230 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231 /usr/ucb/* ) ;;
6232 *)
6233 # OSF1 and SCO ODT 3.0 have their own names for install.
6234 # Don't use installbsd from OSF since it installs stuff as root
6235 # by default.
6236 for ac_prog in ginstall scoinst install; do
6237 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006238 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239 if test $ac_prog = install &&
6240 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6241 # AIX install. It has an incompatible calling convention.
6242 :
6243 elif test $ac_prog = install &&
6244 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6245 # program-specific install script used by HP pwplus--don't use.
6246 :
6247 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006248 rm -rf conftest.one conftest.two conftest.dir
6249 echo one > conftest.one
6250 echo two > conftest.two
6251 mkdir conftest.dir
6252 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6253 test -s conftest.one && test -s conftest.two &&
6254 test -s conftest.dir/conftest.one &&
6255 test -s conftest.dir/conftest.two
6256 then
6257 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6258 break 3
6259 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260 fi
6261 fi
6262 done
6263 done
6264 ;;
6265esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006266
6267 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268IFS=$as_save_IFS
6269
Matthias Kloseb9621712010-04-24 17:59:49 +00006270rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271
6272fi
6273 if test "${ac_cv_path_install+set}" = set; then
6274 INSTALL=$ac_cv_path_install
6275 else
6276 # As a last resort, use the slow shell script. Don't cache a
6277 # value for INSTALL within a source directory, because that will
6278 # break other packages using the cache if that directory is
6279 # removed, or if the value is a relative name.
6280 INSTALL=$ac_install_sh
6281 fi
6282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6284$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285
6286# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6287# It thinks the first close brace ends the variable substitution.
6288test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6289
6290test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6291
6292test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6293
Matthias Klose93a0ef12012-03-15 18:08:34 +01006294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6295$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6296if test -z "$MKDIR_P"; then
6297 if ${ac_cv_path_mkdir+:} false; then :
6298 $as_echo_n "(cached) " >&6
6299else
6300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6301for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6302do
6303 IFS=$as_save_IFS
6304 test -z "$as_dir" && as_dir=.
6305 for ac_prog in mkdir gmkdir; do
6306 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006307 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006308 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6309 'mkdir (GNU coreutils) '* | \
6310 'mkdir (coreutils) '* | \
6311 'mkdir (fileutils) '4.1*)
6312 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6313 break 3;;
6314 esac
6315 done
6316 done
6317 done
6318IFS=$as_save_IFS
6319
6320fi
6321
6322 test -d ./--version && rmdir ./--version
6323 if test "${ac_cv_path_mkdir+set}" = set; then
6324 MKDIR_P="$ac_cv_path_mkdir -p"
6325 else
6326 # As a last resort, use the slow shell script. Don't cache a
6327 # value for MKDIR_P within a source directory, because that will
6328 # break other packages using the cache if that directory is
6329 # removed, or if the value is a relative name.
6330 MKDIR_P="$ac_install_sh -d"
6331 fi
6332fi
6333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6334$as_echo "$MKDIR_P" >&6; }
6335
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336
6337# Not every filesystem supports hard links
6338
6339if test -z "$LN" ; then
6340 case $ac_sys_system in
6341 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342 *) LN=ln;;
6343 esac
6344fi
6345
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006346# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006347
6348ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006349
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6352$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353
6354# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006355if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006356 withval=$with_pydebug;
6357if test "$withval" != no
6358then
6359
Matthias Kloseb9621712010-04-24 17:59:49 +00006360$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361
Matthias Kloseb9621712010-04-24 17:59:49 +00006362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6363$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006364 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006365 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006366else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6367$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368fi
6369else
Matthias Kloseb9621712010-04-24 17:59:49 +00006370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372fi
6373
6374
Victor Stinnerf4e47032019-04-25 00:56:28 +02006375# Check for --with-trace-refs
6376# --with-trace-refs
6377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6378$as_echo_n "checking for --with-trace-refs... " >&6; }
6379
6380# Check whether --with-trace-refs was given.
6381if test "${with_trace_refs+set}" = set; then :
6382 withval=$with_trace_refs;
6383else
6384 with_trace_refs=no
6385fi
6386
6387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6388$as_echo "$with_trace_refs" >&6; }
6389
6390if test "$with_trace_refs" = "yes"
6391then
6392
6393$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6394
6395fi
6396
6397# Check for --with-assertions.
6398# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006399assertions='false'
6400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6401$as_echo_n "checking for --with-assertions... " >&6; }
6402
6403# Check whether --with-assertions was given.
6404if test "${with_assertions+set}" = set; then :
6405 withval=$with_assertions;
6406if test "$withval" != no
6407then
6408 assertions='true'
6409fi
6410fi
6411
6412if test "$assertions" = 'true'; then
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6414$as_echo "yes" >&6; }
6415elif test "$Py_DEBUG" = 'true'; then
6416 assertions='true'
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6418$as_echo "implied by --with-pydebug" >&6; }
6419else
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6421$as_echo "no" >&6; }
6422fi
6423
Brett Cannon63d98bc2016-09-06 17:12:40 -07006424# Enable optimization flags
6425
6426
6427Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6429$as_echo_n "checking for --enable-optimizations... " >&6; }
6430# Check whether --enable-optimizations was given.
6431if test "${enable_optimizations+set}" = set; then :
6432 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006433if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006434then
6435 Py_OPT='true'
6436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6437$as_echo "yes" >&6; };
6438else
6439 Py_OPT='false'
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6441$as_echo "no" >&6; };
6442fi
6443else
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6445$as_echo "no" >&6; }
6446fi
6447
6448if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006449 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6450 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006451 # 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 +00006452 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006453 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006454 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006455 DEF_MAKE_RULE="build_all"
6456else
6457 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006458 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006459 DEF_MAKE_RULE="all"
6460fi
6461
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006462
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6464$as_echo_n "checking PROFILE_TASK... " >&6; }
6465if test -z "$PROFILE_TASK"
6466then
6467 PROFILE_TASK='-m test --pgo'
6468fi
6469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6470$as_echo "$PROFILE_TASK" >&6; }
6471
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006472# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6473# normal names in the default $PATH (ie: Ubuntu). They exist under the
6474# non-suffixed name in their versioned llvm directory.
6475
6476llvm_bin_dir=''
6477llvm_path="${PATH}"
6478if test "${CC}" = "clang"
6479then
6480 clang_bin=`which clang`
6481 # Some systems install clang elsewhere as a symlink to the real path
6482 # which is where the related llvm tools are located.
6483 if test -L "${clang_bin}"
6484 then
6485 clang_dir=`dirname "${clang_bin}"`
6486 clang_bin=`readlink "${clang_bin}"`
6487 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6488 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6489 fi
6490fi
6491
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006492# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6494$as_echo_n "checking for --with-lto... " >&6; }
6495
6496# Check whether --with-lto was given.
6497if test "${with_lto+set}" = set; then :
6498 withval=$with_lto;
6499if test "$withval" != no
6500then
6501 Py_LTO='true'
6502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6503$as_echo "yes" >&6; };
6504else
6505 Py_LTO='false'
6506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507$as_echo "no" >&6; };
6508fi
6509else
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
6512fi
6513
6514if test "$Py_LTO" = 'true' ; then
6515 case $CC in
6516 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006517
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006518 if test -n "$ac_tool_prefix"; then
6519 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6520set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6522$as_echo_n "checking for $ac_word... " >&6; }
6523if ${ac_cv_path_LLVM_AR+:} false; then :
6524 $as_echo_n "(cached) " >&6
6525else
6526 case $LLVM_AR in
6527 [\\/]* | ?:[\\/]*)
6528 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6529 ;;
6530 *)
6531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6532for as_dir in ${llvm_path}
6533do
6534 IFS=$as_save_IFS
6535 test -z "$as_dir" && as_dir=.
6536 for ac_exec_ext in '' $ac_executable_extensions; do
6537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6538 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6540 break 2
6541 fi
6542done
6543 done
6544IFS=$as_save_IFS
6545
6546 ;;
6547esac
6548fi
6549LLVM_AR=$ac_cv_path_LLVM_AR
6550if test -n "$LLVM_AR"; then
6551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6552$as_echo "$LLVM_AR" >&6; }
6553else
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6555$as_echo "no" >&6; }
6556fi
6557
6558
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006559fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006560if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006561 ac_pt_LLVM_AR=$LLVM_AR
6562 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006563set dummy llvm-ar; ac_word=$2
6564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6565$as_echo_n "checking for $ac_word... " >&6; }
6566if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6567 $as_echo_n "(cached) " >&6
6568else
6569 case $ac_pt_LLVM_AR in
6570 [\\/]* | ?:[\\/]*)
6571 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6572 ;;
6573 *)
6574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6575for as_dir in ${llvm_path}
6576do
6577 IFS=$as_save_IFS
6578 test -z "$as_dir" && as_dir=.
6579 for ac_exec_ext in '' $ac_executable_extensions; do
6580 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6581 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6583 break 2
6584 fi
6585done
6586 done
6587IFS=$as_save_IFS
6588
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006589 ;;
6590esac
6591fi
6592ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6593if test -n "$ac_pt_LLVM_AR"; then
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6595$as_echo "$ac_pt_LLVM_AR" >&6; }
6596else
6597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6598$as_echo "no" >&6; }
6599fi
6600
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006601 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006602 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006603 else
6604 case $cross_compiling:$ac_tool_warned in
6605yes:)
6606{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6607$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6608ac_tool_warned=yes ;;
6609esac
6610 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006611 fi
6612else
6613 LLVM_AR="$ac_cv_path_LLVM_AR"
6614fi
6615
6616
6617 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6618 then
6619 LLVM_AR_FOUND="found"
6620 else
6621 LLVM_AR_FOUND="not-found"
6622 fi
6623 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6624 then
6625 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6626 if test -n "${found_llvm_ar}"
6627 then
6628 LLVM_AR='/usr/bin/xcrun llvm-ar'
6629 LLVM_AR_FOUND=found
6630 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6631$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6632 fi
6633 fi
6634 if test $LLVM_AR_FOUND = not-found
6635 then
6636 LLVM_PROFR_ERR=yes
6637 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6638 else
6639 LLVM_AR_ERR=no
6640 fi
6641 AR="${LLVM_AR}"
6642 case $ac_sys_system in
6643 Darwin*)
6644 # Any changes made here should be reflected in the GCC+Darwin case below
6645 LTOFLAGS="-flto -Wl,-export_dynamic"
6646 ;;
6647 *)
6648 LTOFLAGS="-flto"
6649 ;;
6650 esac
6651 ;;
6652 *gcc*)
6653 case $ac_sys_system in
6654 Darwin*)
6655 LTOFLAGS="-flto -Wl,-export_dynamic"
6656 ;;
6657 *)
6658 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6659 ;;
6660 esac
6661 ;;
6662 esac
6663
6664 if test "$ac_cv_prog_cc_g" = "yes"
6665 then
6666 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6667 # to get debug symbols.
6668 LTOFLAGS="$LTOFLAGS -g"
6669 fi
6670
stratakisf92c7aa2018-12-04 15:54:01 +01006671 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006672 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006673fi
6674
6675# Enable PGO flags.
6676
6677
6678
6679
6680
6681
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006682if test -n "$ac_tool_prefix"; then
6683 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6684set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686$as_echo_n "checking for $ac_word... " >&6; }
6687if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6688 $as_echo_n "(cached) " >&6
6689else
6690 case $LLVM_PROFDATA in
6691 [\\/]* | ?:[\\/]*)
6692 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6693 ;;
6694 *)
6695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6696for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006697do
6698 IFS=$as_save_IFS
6699 test -z "$as_dir" && as_dir=.
6700 for ac_exec_ext in '' $ac_executable_extensions; do
6701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006702 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6704 break 2
6705 fi
6706done
6707 done
6708IFS=$as_save_IFS
6709
Gregory P. Smith799520c2016-09-07 16:10:00 -07006710 ;;
6711esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006712fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006713LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6714if test -n "$LLVM_PROFDATA"; then
6715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6716$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006717else
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6719$as_echo "no" >&6; }
6720fi
6721
6722
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006723fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006724if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006725 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6726 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006727set dummy llvm-profdata; ac_word=$2
6728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6729$as_echo_n "checking for $ac_word... " >&6; }
6730if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6731 $as_echo_n "(cached) " >&6
6732else
6733 case $ac_pt_LLVM_PROFDATA in
6734 [\\/]* | ?:[\\/]*)
6735 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6736 ;;
6737 *)
6738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6739for as_dir in ${llvm_path}
6740do
6741 IFS=$as_save_IFS
6742 test -z "$as_dir" && as_dir=.
6743 for ac_exec_ext in '' $ac_executable_extensions; do
6744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6745 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6747 break 2
6748 fi
6749done
6750 done
6751IFS=$as_save_IFS
6752
Gregory P. Smith799520c2016-09-07 16:10:00 -07006753 ;;
6754esac
6755fi
6756ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6757if test -n "$ac_pt_LLVM_PROFDATA"; then
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6759$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6760else
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6762$as_echo "no" >&6; }
6763fi
6764
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006765 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006766 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006767 else
6768 case $cross_compiling:$ac_tool_warned in
6769yes:)
6770{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6771$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6772ac_tool_warned=yes ;;
6773esac
6774 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006775 fi
6776else
6777 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6778fi
6779
6780
6781if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6782then
6783 LLVM_PROF_FOUND="found"
6784else
6785 LLVM_PROF_FOUND="not-found"
6786fi
6787if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6788then
6789 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6790 if test -n "${found_llvm_profdata}"
6791 then
6792 # llvm-profdata isn't directly in $PATH in some cases.
6793 # https://apple.stackexchange.com/questions/197053/
6794 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6795 LLVM_PROF_FOUND=found
6796 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6797$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6798 fi
6799fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006800LLVM_PROF_ERR=no
6801case $CC in
6802 *clang*)
6803 # Any changes made here should be reflected in the GCC+Darwin case below
6804 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6805 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006806 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006807 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6808 if test $LLVM_PROF_FOUND = not-found
6809 then
6810 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006811 if test "${REQUIRE_PGO}" = "yes"
6812 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006813 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 -07006814 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006815 fi
6816 ;;
6817 *gcc*)
6818 case $ac_sys_system in
6819 Darwin*)
6820 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6821 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006822 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006823 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006824 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825 then
6826 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006827 if test "${REQUIRE_PGO}" = "yes"
6828 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006829 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 -07006830 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006831 fi
6832 ;;
6833 *)
6834 PGO_PROF_GEN_FLAG="-fprofile-generate"
6835 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6836 LLVM_PROF_MERGER="true"
6837 LLVM_PROF_FILE=""
6838 ;;
6839 esac
6840 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006841 *icc*)
6842 PGO_PROF_GEN_FLAG="-prof-gen"
6843 PGO_PROF_USE_FLAG="-prof-use"
6844 LLVM_PROF_MERGER="true"
6845 LLVM_PROF_FILE=""
6846 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006847esac
6848
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6850# merged with this chunk of code?
6851
6852# Optimizer/debugger flags
6853# ------------------------
6854# (The following bit of code is complicated enough - please keep things
6855# indented properly. Just pretend you're editing Python code. ;-)
6856
6857# There are two parallel sets of case statements below, one that checks to
6858# see if OPT was set and one that does BASECFLAGS setting based upon
6859# compiler and platform. BASECFLAGS tweaks need to be made even if the
6860# user set OPT.
6861
Victor Stinner23a683a2019-04-12 21:27:37 +02006862case $CC in
6863 *clang*)
6864 cc_is_clang=1
6865 ;;
6866 *)
6867 if $CC --version 2>&1 | grep -q clang
6868 then
6869 cc_is_clang=1
6870 else
6871 cc_is_clang=
6872 fi
6873esac
6874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875# tweak OPT based on compiler and platform, only if the user didn't set
6876# it on the command line
6877
Victor Stinner9ed34a82017-05-02 22:35:58 +02006878
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006879if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880then
6881 case $GCC in
6882 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006883 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6884 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6885 WRAP="-fwrapv"
6886 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006887
Victor Stinner35f3d242017-04-21 12:35:24 +02006888 if test -n "${cc_is_clang}"
6889 then
6890 # Clang also needs -fwrapv
6891 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006892 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6893 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006894 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006895 fi
6896
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897 case $ac_cv_prog_cc_g in
6898 yes)
6899 if test "$Py_DEBUG" = 'true' ; then
6900 # Optimization messes up debuggers, so turn it off for
6901 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006902 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006903 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006904 else
Victor Stinner28205b22017-04-21 11:24:34 +02006905 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006906 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907 else
Victor Stinner28205b22017-04-21 11:24:34 +02006908 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909 fi
6910 ;;
6911 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006912 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006913 ;;
6914 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006915
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006916 case $ac_sys_system in
6917 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6918 ;;
6919 esac
6920 ;;
6921
6922 *)
6923 OPT="-O"
6924 ;;
6925 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926fi
6927
6928
6929
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006930
stratakiscf10a752018-12-19 18:19:01 +01006931
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932# The -arch flags for universal builds on OSX
6933UNIVERSAL_ARCH_FLAGS=
6934
6935
6936# tweak BASECFLAGS based on compiler and platform
6937case $GCC in
6938yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006939 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006940
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6942$as_echo_n "checking for -Wextra... " >&6; }
6943 ac_save_cc="$CC"
6944 CC="$CC -Wextra -Werror"
6945 if ${ac_cv_extra_warnings+:} false; then :
6946 $as_echo_n "(cached) " >&6
6947else
6948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6949/* end confdefs.h. */
6950
6951
6952int
6953main ()
6954{
6955
6956 ;
6957 return 0;
6958}
6959
6960_ACEOF
6961if ac_fn_c_try_compile "$LINENO"; then :
6962
6963 ac_cv_extra_warnings=yes
6964
6965else
6966
6967 ac_cv_extra_warnings=no
6968
6969fi
6970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6971fi
6972
6973 CC="$ac_save_cc"
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6975$as_echo "$ac_cv_extra_warnings" >&6; }
6976
6977 if test $ac_cv_extra_warnings = yes
6978 then
6979 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6980 fi
6981
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006982 # Python doesn't violate C99 aliasing rules, but older versions of
6983 # GCC produce warnings for legal Python code. Enable
6984 # -fno-strict-aliasing on versions of GCC that support but produce
6985 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6987$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988 ac_save_cc="$CC"
6989 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006991 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006993else
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006996
Matthias Kloseb159a552010-04-25 21:00:44 +00006997
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006998int
6999main ()
7000{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007001
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007002 ;
7003 return 0;
7004}
Matthias Kloseb159a552010-04-25 21:00:44 +00007005
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007007if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007008
7009 CC="$ac_save_cc -fstrict-aliasing"
7010 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007012/* end confdefs.h. */
7013
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007014 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007015int
7016main ()
7017{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007018double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007019 ;
7020 return 0;
7021}
Matthias Kloseb159a552010-04-25 21:00:44 +00007022
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007024if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007025
7026 ac_cv_no_strict_aliasing=no
7027
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007028else
Matthias Kloseb159a552010-04-25 21:00:44 +00007029
7030 ac_cv_no_strict_aliasing=yes
7031
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007032fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007034
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007035else
Matthias Kloseb159a552010-04-25 21:00:44 +00007036
7037 ac_cv_no_strict_aliasing=no
7038
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007039fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007041fi
7042
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007043 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007044 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7046$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007047 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007048 then
7049 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7050 fi
7051
Zachary Ware5af85642015-12-21 12:09:17 -06007052 # ICC doesn't recognize the option, but only emits a warning
7053 ## XXX does it emit an unused result warning and can it be disabled?
7054 case "$CC" in
7055 *icc*)
7056 ac_cv_disable_unused_result_warning=no
7057 ;;
7058 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7060$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7061 ac_save_cc="$CC"
7062 CC="$CC -Wunused-result -Werror"
7063 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007064 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007065 $as_echo_n "(cached) " >&6
7066else
7067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7068/* end confdefs.h. */
7069
7070
7071int
7072main ()
7073{
7074
7075 ;
7076 return 0;
7077}
7078
7079_ACEOF
7080if ac_fn_c_try_compile "$LINENO"; then :
7081
7082 ac_cv_disable_unused_result_warning=yes
7083
7084else
7085
7086 ac_cv_disable_unused_result_warning=no
7087
7088fi
7089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7090fi
7091
7092 CFLAGS="$save_CFLAGS"
7093 CC="$ac_save_cc"
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7095$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007096 ;;
7097 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007098
7099 if test $ac_cv_disable_unused_result_warning = yes
7100 then
7101 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007102 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7103 fi
7104
7105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7106$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7107 ac_save_cc="$CC"
7108 CC="$CC -Wunused-parameter -Werror"
7109 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7110 $as_echo_n "(cached) " >&6
7111else
7112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7113/* end confdefs.h. */
7114
7115
7116int
7117main ()
7118{
7119
7120 ;
7121 return 0;
7122}
7123
7124_ACEOF
7125if ac_fn_c_try_compile "$LINENO"; then :
7126
7127 ac_cv_disable_unused_parameter_warning=yes
7128
7129else
7130
7131 ac_cv_disable_unused_parameter_warning=no
7132
7133fi
7134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7135fi
7136
7137 CC="$ac_save_cc"
7138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7139$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7140
7141 if test $ac_cv_disable_unused_parameter_warning = yes
7142 then
7143 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7144 fi
7145
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7147$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7148 ac_save_cc="$CC"
7149 CC="$CC -Wmissing-field-initializers -Werror"
7150 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7151 $as_echo_n "(cached) " >&6
7152else
7153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7154/* end confdefs.h. */
7155
7156
7157int
7158main ()
7159{
7160
7161 ;
7162 return 0;
7163}
7164
7165_ACEOF
7166if ac_fn_c_try_compile "$LINENO"; then :
7167
7168 ac_cv_disable_missing_field_initializers=yes
7169
7170else
7171
7172 ac_cv_disable_missing_field_initializers=no
7173
7174fi
7175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7176fi
7177
7178 CC="$ac_save_cc"
7179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7180$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7181
7182 if test $ac_cv_disable_missing_field_initializers = yes
7183 then
7184 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007185 fi
7186
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7188$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7189 ac_save_cc="$CC"
7190 CC="$CC -Wsign-compare"
7191 save_CFLAGS="$CFLAGS"
7192 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7193 $as_echo_n "(cached) " >&6
7194else
7195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7196/* end confdefs.h. */
7197
7198
7199int
7200main ()
7201{
7202
7203 ;
7204 return 0;
7205}
7206
7207_ACEOF
7208if ac_fn_c_try_compile "$LINENO"; then :
7209
7210 ac_cv_enable_sign_compare_warning=yes
7211
7212else
7213
7214 ac_cv_enable_sign_compare_warning=no
7215
7216fi
7217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7218fi
7219
7220 CFLAGS="$save_CFLAGS"
7221 CC="$ac_save_cc"
7222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7223$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7224
7225 if test $ac_cv_enable_sign_compare_warning = yes
7226 then
7227 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7228 fi
7229
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7231$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7232 ac_save_cc="$CC"
7233 CC="$CC -Wunreachable-code"
7234 save_CFLAGS="$CFLAGS"
7235 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7236 $as_echo_n "(cached) " >&6
7237else
7238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7239/* end confdefs.h. */
7240
7241
7242int
7243main ()
7244{
7245
7246 ;
7247 return 0;
7248}
7249
7250_ACEOF
7251if ac_fn_c_try_compile "$LINENO"; then :
7252
7253 ac_cv_enable_unreachable_code_warning=yes
7254
7255else
7256
7257 ac_cv_enable_unreachable_code_warning=no
7258
7259fi
7260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7261fi
7262
7263 CFLAGS="$save_CFLAGS"
7264 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007265
7266 # Don't enable unreachable code warning in debug mode, since it usually
7267 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007268 # Issue #24324: Unfortunately, the unreachable code warning does not work
7269 # correctly on gcc and has been silently removed from the compiler.
7270 # It is supported on clang but on OS X systems gcc may be an alias
7271 # for clang. Try to determine if the compiler is not really gcc and,
7272 # if so, only then enable the warning.
7273 if test $ac_cv_enable_unreachable_code_warning = yes && \
7274 test "$Py_DEBUG" != "true" && \
7275 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007276 then
7277 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007278 else
7279 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007280 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7282$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007283
INADA Naokie3364842018-06-05 20:40:53 +09007284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7285$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7286 ac_save_cc="$CC"
7287 CC="$CC -Werror -Wstrict-prototypes"
7288 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7289 $as_echo_n "(cached) " >&6
7290else
7291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7292/* end confdefs.h. */
7293
7294
7295int
7296main ()
7297{
7298
7299 ;
7300 return 0;
7301}
7302
7303_ACEOF
7304if ac_fn_c_try_compile "$LINENO"; then :
7305
7306 ac_cv_enable_strict_prototypes_warning=yes
7307
7308else
7309
7310 ac_cv_enable_strict_prototypes_warning=no
7311
7312fi
7313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7314fi
7315
7316 CC="$ac_save_cc"
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7318$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7319
7320 if test $ac_cv_enable_strict_prototypes_warning = yes
7321 then
7322 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7323 fi
7324
Victor Stinner193ee0a2017-02-06 14:24:00 +01007325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7326$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7327 ac_save_cc="$CC"
7328 CC="$CC -Werror=implicit-function-declaration"
7329 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7330 $as_echo_n "(cached) " >&6
7331else
7332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7333/* end confdefs.h. */
7334
7335
7336int
7337main ()
7338{
7339
7340 ;
7341 return 0;
7342}
7343
7344_ACEOF
7345if ac_fn_c_try_compile "$LINENO"; then :
7346
7347 ac_cv_enable_implicit_function_declaration_error=yes
7348
7349else
7350
7351 ac_cv_enable_implicit_function_declaration_error=no
7352
7353fi
7354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7355fi
7356
7357 CC="$ac_save_cc"
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7359$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7360
7361 if test $ac_cv_enable_implicit_function_declaration_error = yes
7362 then
7363 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7364 fi
7365
Vinay Sajip0b60f642019-10-15 08:26:12 +01007366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7367$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7368 ac_save_cc="$CC"
7369 CC="$CC -fvisibility=hidden"
7370 if ${ac_cv_enable_visibility+:} false; then :
7371 $as_echo_n "(cached) " >&6
7372else
7373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7374/* end confdefs.h. */
7375
7376
7377int
7378main ()
7379{
7380
7381 ;
7382 return 0;
7383}
7384
7385_ACEOF
7386if ac_fn_c_try_compile "$LINENO"; then :
7387
7388 ac_cv_enable_visibility=yes
7389
7390else
7391
7392 ac_cv_enable_visibility=no
7393
7394fi
7395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7396fi
7397
7398 CC="$ac_save_cc"
7399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7400$as_echo "$ac_cv_enable_visibility" >&6; }
7401
7402 if test $ac_cv_enable_visibility = yes
7403 then
7404 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7405 fi
7406
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7408 # support. Without this, treatment of subnormals doesn't follow
7409 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007410 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411 alpha*)
7412 BASECFLAGS="$BASECFLAGS -mieee"
7413 ;;
7414 esac
7415
7416 case $ac_sys_system in
7417 SCO_SV*)
7418 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7419 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007420
Ned Deily87adb6e2013-10-18 21:09:56 -07007421 Darwin*)
7422 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7423 # used to be here, but non-Apple gcc doesn't accept them.
7424 if test "${CC}" = gcc
7425 then
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007427$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007428 case "${UNIVERSALSDK}" in
7429 */MacOSX10.4u.sdk)
7430 # Build using 10.4 SDK, force usage of gcc when the
7431 # compiler is gcc, otherwise the user will get very
7432 # confusing error messages when building on OSX 10.6
7433 CC=gcc-4.0
7434 CPP=cpp-4.0
7435 ;;
7436 esac
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007438$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007439 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440
Ned Deily87adb6e2013-10-18 21:09:56 -07007441 if test "${enable_universalsdk}"
7442 then
7443 case "$UNIVERSAL_ARCHS" in
7444 32-bit)
7445 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7446 LIPO_32BIT_FLAGS=""
7447 ARCH_RUN_32BIT=""
7448 ;;
7449 64-bit)
7450 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7451 LIPO_32BIT_FLAGS=""
7452 ARCH_RUN_32BIT="true"
7453 ;;
7454 all)
7455 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7456 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7457 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7458 ;;
7459 intel)
7460 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7461 LIPO_32BIT_FLAGS="-extract i386"
7462 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7463 ;;
7464 intel-32)
7465 UNIVERSAL_ARCH_FLAGS="-arch i386"
7466 LIPO_32BIT_FLAGS=""
7467 ARCH_RUN_32BIT=""
7468 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007469 intel-64)
7470 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7471 LIPO_32BIT_FLAGS=""
7472 ARCH_RUN_32BIT="true"
7473 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007474 3-way)
7475 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7476 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7477 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7478 ;;
7479 *)
7480 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7481 ;;
7482 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483
Ned Deily87adb6e2013-10-18 21:09:56 -07007484 if test "${UNIVERSALSDK}" != "/"
7485 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007486 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7487 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007488 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007489 else
7490 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7491 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007492 fi
7493 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494
Ned Deily87adb6e2013-10-18 21:09:56 -07007495 # Calculate an appropriate deployment target for this build:
7496 # The deployment target value is used explicitly to enable certain
7497 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007498 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007499 # component of the string returned by distutils.get_platform().
7500 #
7501 # Use the value from:
7502 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7503 # 2. the operating system version of the build machine if >= 10.6
7504 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7505 # below to pick either 10.3, 10.4, or 10.5 as the target.
7506 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507
Ned Deily87adb6e2013-10-18 21:09:56 -07007508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7509$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007510 cur_target_major=`sw_vers -productVersion | \
7511 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7512 cur_target_minor=`sw_vers -productVersion | \
7513 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7514 cur_target="${cur_target_major}.${cur_target_minor}"
7515 if test ${cur_target_major} -eq 10 && \
7516 test ${cur_target_minor} -ge 3 && \
7517 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007518 then
Ned Deily36820b62014-06-25 13:44:22 -07007519 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007520 cur_target=10.3
7521 if test ${enable_universalsdk}
7522 then
7523 case "$UNIVERSAL_ARCHS" in
7524 all|3-way|intel|64-bit)
7525 # These configurations were first supported in 10.5
7526 cur_target='10.5'
7527 ;;
7528 esac
7529 else
7530 if test `/usr/bin/arch` = "i386"
7531 then
7532 # 10.4 was the first release to support Intel archs
7533 cur_target="10.4"
7534 fi
7535 fi
7536 fi
7537 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007538
Ned Deily87adb6e2013-10-18 21:09:56 -07007539 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7540 # environment with a value that is the same as what we'll use
7541 # in the Makefile to ensure that we'll get the same compiler
7542 # environment during configure and build time.
7543 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7544 export MACOSX_DEPLOYMENT_TARGET
7545 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7547$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007548
Ned Deily87adb6e2013-10-18 21:09:56 -07007549 # end of Darwin* tests
7550 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551 esac
7552 ;;
7553
7554*)
7555 case $ac_sys_system in
7556 OpenUNIX*|UnixWare*)
7557 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7558 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559 SCO_SV*)
7560 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7561 ;;
7562 esac
7563 ;;
7564esac
7565
Zachary Ware5af85642015-12-21 12:09:17 -06007566# ICC needs -fp-model strict or floats behave badly
7567case "$CC" in
7568*icc*)
7569 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7570 ;;
7571esac
7572
T. Woutersddbfa2c2017-05-23 01:30:49 +02007573if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574 :
7575else
7576 OPT="-DNDEBUG $OPT"
7577fi
7578
7579if test "$ac_arch_flags"
7580then
7581 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7582fi
7583
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584# On some compilers, pthreads are available without further options
7585# (e.g. MacOS X). On some of these systems, the compiler will not
7586# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7587# So we have to see first whether pthreads are available without
7588# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7590$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007591if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007592 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593else
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595 ac_cv_pthread_is_default=no
7596else
Matthias Kloseb9621712010-04-24 17:59:49 +00007597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598/* end confdefs.h. */
7599
Stefan Krah7dba5942012-11-22 22:49:11 +01007600#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601#include <pthread.h>
7602
7603void* routine(void* p){return NULL;}
7604
7605int main(){
7606 pthread_t p;
7607 if(pthread_create(&p,NULL,routine,NULL)!=0)
7608 return 1;
7609 (void)pthread_detach(p);
7610 return 0;
7611}
7612
7613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007614if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615
7616 ac_cv_pthread_is_default=yes
7617 ac_cv_kthread=no
7618 ac_cv_pthread=no
7619
7620else
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7624 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625fi
7626
7627
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628fi
7629
Matthias Kloseb9621712010-04-24 17:59:49 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7631$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632
7633
7634if test $ac_cv_pthread_is_default = yes
7635then
7636 ac_cv_kpthread=no
7637else
7638# -Kpthread, if available, provides the right #defines
7639# and linker options to make pthread_create available
7640# Some compilers won't report that they do not support -Kpthread,
7641# so we need to run a program to see whether it really made the
7642# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7644$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007645if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007647else
7648 ac_save_cc="$CC"
7649CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007650if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651 ac_cv_kpthread=no
7652else
Matthias Kloseb9621712010-04-24 17:59:49 +00007653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654/* end confdefs.h. */
7655
Stefan Krah7dba5942012-11-22 22:49:11 +01007656#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657#include <pthread.h>
7658
7659void* routine(void* p){return NULL;}
7660
7661int main(){
7662 pthread_t p;
7663 if(pthread_create(&p,NULL,routine,NULL)!=0)
7664 return 1;
7665 (void)pthread_detach(p);
7666 return 0;
7667}
7668
7669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007670if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671 ac_cv_kpthread=yes
7672else
Matthias Kloseb9621712010-04-24 17:59:49 +00007673 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007677fi
7678
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679CC="$ac_save_cc"
7680fi
7681
Matthias Kloseb9621712010-04-24 17:59:49 +00007682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7683$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684fi
7685
7686if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7687then
7688# -Kthread, if available, provides the right #defines
7689# and linker options to make pthread_create available
7690# Some compilers won't report that they do not support -Kthread,
7691# so we need to run a program to see whether it really made the
7692# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7694$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007695if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697else
7698 ac_save_cc="$CC"
7699CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007700if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701 ac_cv_kthread=no
7702else
Matthias Kloseb9621712010-04-24 17:59:49 +00007703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704/* end confdefs.h. */
7705
Stefan Krah7dba5942012-11-22 22:49:11 +01007706#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707#include <pthread.h>
7708
7709void* routine(void* p){return NULL;}
7710
7711int main(){
7712 pthread_t p;
7713 if(pthread_create(&p,NULL,routine,NULL)!=0)
7714 return 1;
7715 (void)pthread_detach(p);
7716 return 0;
7717}
7718
7719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007720if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721 ac_cv_kthread=yes
7722else
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727fi
7728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729CC="$ac_save_cc"
7730fi
7731
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7733$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734fi
7735
7736if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7737then
7738# -pthread, if available, provides the right #defines
7739# and linker options to make pthread_create available
7740# Some compilers won't report that they do not support -pthread,
7741# so we need to run a program to see whether it really made the
7742# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7744$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007745if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007746 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747else
7748 ac_save_cc="$CC"
7749CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007750if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007751 ac_cv_pthread=no
7752else
Matthias Kloseb9621712010-04-24 17:59:49 +00007753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007754/* end confdefs.h. */
7755
Stefan Krah7dba5942012-11-22 22:49:11 +01007756#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757#include <pthread.h>
7758
7759void* routine(void* p){return NULL;}
7760
7761int main(){
7762 pthread_t p;
7763 if(pthread_create(&p,NULL,routine,NULL)!=0)
7764 return 1;
7765 (void)pthread_detach(p);
7766 return 0;
7767}
7768
7769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007770if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771 ac_cv_pthread=yes
7772else
Matthias Kloseb9621712010-04-24 17:59:49 +00007773 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007777fi
7778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779CC="$ac_save_cc"
7780fi
7781
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7783$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007784fi
7785
7786# If we have set a CC compiler flag for thread support then
7787# check if it works for CXX, too.
7788ac_cv_cxx_thread=no
7789if test ! -z "$CXX"
7790then
Matthias Kloseb9621712010-04-24 17:59:49 +00007791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7792$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007793ac_save_cxx="$CXX"
7794
7795if test "$ac_cv_kpthread" = "yes"
7796then
7797 CXX="$CXX -Kpthread"
7798 ac_cv_cxx_thread=yes
7799elif test "$ac_cv_kthread" = "yes"
7800then
7801 CXX="$CXX -Kthread"
7802 ac_cv_cxx_thread=yes
7803elif test "$ac_cv_pthread" = "yes"
7804then
7805 CXX="$CXX -pthread"
7806 ac_cv_cxx_thread=yes
7807fi
7808
7809if test $ac_cv_cxx_thread = yes
7810then
7811 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7812 $CXX -c conftest.$ac_ext 2>&5
7813 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7814 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7815 then
7816 ac_cv_cxx_thread=yes
7817 else
7818 ac_cv_cxx_thread=no
7819 fi
7820 rm -fr conftest*
7821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7823$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007824fi
7825CXX="$ac_save_cxx"
7826
7827
7828# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7830$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007831if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007832 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007833else
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835/* end confdefs.h. */
7836#include <stdlib.h>
7837#include <stdarg.h>
7838#include <string.h>
7839#include <float.h>
7840
7841int
7842main ()
7843{
7844
7845 ;
7846 return 0;
7847}
7848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007849if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007850 ac_cv_header_stdc=yes
7851else
Matthias Kloseb9621712010-04-24 17:59:49 +00007852 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007853fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7855
7856if test $ac_cv_header_stdc = yes; then
7857 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007859/* end confdefs.h. */
7860#include <string.h>
7861
7862_ACEOF
7863if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 $EGREP "memchr" >/dev/null 2>&1; then :
7865
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007866else
7867 ac_cv_header_stdc=no
7868fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007869rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007870
7871fi
7872
7873if test $ac_cv_header_stdc = yes; then
7874 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007876/* end confdefs.h. */
7877#include <stdlib.h>
7878
7879_ACEOF
7880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 $EGREP "free" >/dev/null 2>&1; then :
7882
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007883else
7884 ac_cv_header_stdc=no
7885fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007886rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007887
7888fi
7889
7890if test $ac_cv_header_stdc = yes; then
7891 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893 :
7894else
Matthias Kloseb9621712010-04-24 17:59:49 +00007895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007896/* end confdefs.h. */
7897#include <ctype.h>
7898#include <stdlib.h>
7899#if ((' ' & 0x0FF) == 0x020)
7900# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7901# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7902#else
7903# define ISLOWER(c) \
7904 (('a' <= (c) && (c) <= 'i') \
7905 || ('j' <= (c) && (c) <= 'r') \
7906 || ('s' <= (c) && (c) <= 'z'))
7907# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7908#endif
7909
7910#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7911int
7912main ()
7913{
7914 int i;
7915 for (i = 0; i < 256; i++)
7916 if (XOR (islower (i), ISLOWER (i))
7917 || toupper (i) != TOUPPER (i))
7918 return 2;
7919 return 0;
7920}
7921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007922if ac_fn_c_try_run "$LINENO"; then :
7923
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007924else
Matthias Kloseb9621712010-04-24 17:59:49 +00007925 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7928 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007929fi
7930
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007931fi
7932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7934$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007935if test $ac_cv_header_stdc = yes; then
7936
Matthias Kloseb9621712010-04-24 17:59:49 +00007937$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007938
7939fi
7940
stratakise768c862018-01-23 16:11:24 +01007941for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007942fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007943ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007944sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007945utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007946poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007947sys/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 +01007948sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007949sys/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 +01007950sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007951sys/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 -07007952libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007953linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007954sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007955do :
7956 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7957ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007958if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007960#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007961_ACEOF
7962
7963fi
7964
Guido van Rossum627b2d71993-12-24 10:39:16 +00007965done
7966
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007967ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007968for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007969 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7971$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007972if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007973 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007974else
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007976/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007977#include <sys/types.h>
7978#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007979
Martin v. Löwis11437992002-04-12 09:54:03 +00007980int
7981main ()
7982{
7983if ((DIR *) 0)
7984return 0;
7985 ;
7986 return 0;
7987}
7988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007989if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007991else
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007996eval ac_res=\$$as_ac_Header
7997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7998$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007999if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008001#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008002_ACEOF
8003
8004ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008005fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008006
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008007done
8008# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8009if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8011$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008012if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008014else
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019/* Override any GCC internal prototype to avoid an error.
8020 Use char because int might match the return type of a GCC
8021 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008022#ifdef __cplusplus
8023extern "C"
8024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008025char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008026int
8027main ()
8028{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 ;
8031 return 0;
8032}
8033_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034for ac_lib in '' dir; do
8035 if test -z "$ac_lib"; then
8036 ac_res="none required"
8037 else
8038 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008039 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008044rm -f core conftest.err conftest.$ac_objext \
8045 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008046 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008047 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049done
Victor Stinnere0be4232011-10-25 13:06:09 +02008050if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052else
8053 ac_cv_search_opendir=no
8054fi
8055rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008056LIBS=$ac_func_search_save_LIBS
8057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8059$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008060ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008061if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008063
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008064fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008065
Michael W. Hudson54241132001-12-07 15:38:26 +00008066else
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8068$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008069if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008070 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008071else
8072 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076/* Override any GCC internal prototype to avoid an error.
8077 Use char because int might match the return type of a GCC
8078 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008079#ifdef __cplusplus
8080extern "C"
8081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008082char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008083int
8084main ()
8085{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008086return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008087 ;
8088 return 0;
8089}
8090_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091for ac_lib in '' x; do
8092 if test -z "$ac_lib"; then
8093 ac_res="none required"
8094 else
8095 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008096 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008101rm -f core conftest.err conftest.$ac_objext \
8102 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008103 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106done
Victor Stinnere0be4232011-10-25 13:06:09 +02008107if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109else
8110 ac_cv_search_opendir=no
8111fi
8112rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008113LIBS=$ac_func_search_save_LIBS
8114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8116$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008117ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008118if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008120
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008121fi
8122
8123fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008124
Matthias Kloseb9621712010-04-24 17:59:49 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8126$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008127if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008128 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008129else
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008131/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008132#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008133int
8134main ()
8135{
8136return makedev(0, 0);
8137 ;
8138 return 0;
8139}
8140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008141if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008142 ac_cv_header_sys_types_h_makedev=yes
8143else
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008146rm -f core conftest.err conftest.$ac_objext \
8147 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008148
8149fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8151$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008152
8153if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008154ac_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 +02008155if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008156
Matthias Kloseb9621712010-04-24 17:59:49 +00008157$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008158
8159fi
8160
8161
8162
8163 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 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 +02008165if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008168
8169fi
8170
8171
8172 fi
8173fi
8174
Michael W. Hudson54241132001-12-07 15:38:26 +00008175
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008176# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8177# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8178SAVE_CFLAGS=$CFLAGS
8179CFLAGS="-std=c99 $CFLAGS"
8180for ac_header in bluetooth/bluetooth.h
8181do :
8182 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8183if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8184 cat >>confdefs.h <<_ACEOF
8185#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8186_ACEOF
8187
8188fi
8189
8190done
8191
8192CFLAGS=$SAVE_CFLAGS
8193
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008194# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8195for ac_header in net/if.h
8196do :
8197 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8198#ifdef STDC_HEADERS
8199# include <stdlib.h>
8200# include <stddef.h>
8201#else
8202# ifdef HAVE_STDLIB_H
8203# include <stdlib.h>
8204# endif
8205#endif
8206#ifdef HAVE_SYS_SOCKET_H
8207# include <sys/socket.h>
8208#endif
8209
8210"
Victor Stinnere0be4232011-10-25 13:06:09 +02008211if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008212 cat >>confdefs.h <<_ACEOF
8213#define HAVE_NET_IF_H 1
8214_ACEOF
8215
8216fi
8217
8218done
8219
8220
Martin v. Löwis11017b12006-01-14 18:12:57 +00008221# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008222for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008223do :
8224 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 +00008225#ifdef HAVE_ASM_TYPES_H
8226#include <asm/types.h>
8227#endif
8228#ifdef HAVE_SYS_SOCKET_H
8229#include <sys/socket.h>
8230#endif
8231
Matthias Kloseb9621712010-04-24 17:59:49 +00008232"
Victor Stinnere0be4232011-10-25 13:06:09 +02008233if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008234 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008235#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008236_ACEOF
8237
8238fi
8239
8240done
8241
8242
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008243# On Linux, qrtr.h requires asm/types.h
8244for ac_header in linux/qrtr.h
8245do :
8246 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8247#ifdef HAVE_ASM_TYPES_H
8248#include <asm/types.h>
8249#endif
8250#ifdef HAVE_SYS_SOCKET_H
8251#include <sys/socket.h>
8252#endif
8253
8254"
8255if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8256 cat >>confdefs.h <<_ACEOF
8257#define HAVE_LINUX_QRTR_H 1
8258_ACEOF
8259
8260fi
8261
8262done
8263
8264
caaveryeffc12f2017-09-06 18:18:10 -04008265for ac_header in linux/vm_sockets.h
8266do :
8267 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8268#ifdef HAVE_SYS_SOCKET_H
8269#include <sys/socket.h>
8270#endif
8271
8272"
8273if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8274 cat >>confdefs.h <<_ACEOF
8275#define HAVE_LINUX_VM_SOCKETS_H 1
8276_ACEOF
8277
8278fi
8279
8280done
8281
8282
Charles-François Natali47413c12011-10-06 19:47:44 +02008283# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008284for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008285do :
8286 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8287ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8288#ifdef HAVE_SYS_SOCKET_H
8289#include <sys/socket.h>
8290#endif
8291
8292"
8293if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8294 cat >>confdefs.h <<_ACEOF
8295#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8296_ACEOF
8297
8298fi
8299
8300done
8301
8302
Guido van Rossum627b2d71993-12-24 10:39:16 +00008303# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008304was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8306$as_echo_n "checking for clock_t in time.h... " >&6; }
8307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008308/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008309#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008310
8311_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008312if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008314 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008315else
Martin v. Löwis11437992002-04-12 09:54:03 +00008316
8317
Matthias Kloseb9621712010-04-24 17:59:49 +00008318$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008319
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008320
Guido van Rossum627b2d71993-12-24 10:39:16 +00008321fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008322rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008323
Matthias Kloseb9621712010-04-24 17:59:49 +00008324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8325$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8328$as_echo_n "checking for makedev... " >&6; }
8329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008330/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008331
Jesus Cea740f53a2010-04-28 11:35:30 +00008332#if defined(MAJOR_IN_MKDEV)
8333#include <sys/mkdev.h>
8334#elif defined(MAJOR_IN_SYSMACROS)
8335#include <sys/sysmacros.h>
8336#else
8337#include <sys/types.h>
8338#endif
8339
Neal Norwitz11690112002-07-30 01:08:28 +00008340int
8341main ()
8342{
Jesus Cea740f53a2010-04-28 11:35:30 +00008343
8344 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008345 ;
8346 return 0;
8347}
Matthias Kloseb159a552010-04-25 21:00:44 +00008348
Neal Norwitz11690112002-07-30 01:08:28 +00008349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008350if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008351 ac_cv_has_makedev=yes
8352else
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008355rm -f core conftest.err conftest.$ac_objext \
8356 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8358$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008359if test "$ac_cv_has_makedev" = "yes"; then
8360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008362
8363fi
8364
Christian Heimes985ecdc2013-11-20 11:46:18 +01008365# byte swapping
8366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8367$as_echo_n "checking for le64toh... " >&6; }
8368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8369/* end confdefs.h. */
8370
8371#ifdef HAVE_ENDIAN_H
8372#include <endian.h>
8373#elif defined(HAVE_SYS_ENDIAN_H)
8374#include <sys/endian.h>
8375#endif
8376
8377int
8378main ()
8379{
8380
8381 le64toh(1)
8382 ;
8383 return 0;
8384}
8385
8386_ACEOF
8387if ac_fn_c_try_link "$LINENO"; then :
8388 ac_cv_has_le64toh=yes
8389else
8390 ac_cv_has_le64toh=no
8391fi
8392rm -f core conftest.err conftest.$ac_objext \
8393 conftest$ac_exeext conftest.$ac_ext
8394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8395$as_echo "$ac_cv_has_le64toh" >&6; }
8396if test "$ac_cv_has_le64toh" = "yes"; then
8397
8398$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8399
8400fi
8401
Martin v. Löwis399a6892002-10-04 10:22:02 +00008402use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008403# Don't use largefile support for GNU/Hurd
8404case $ac_sys_system in GNU*)
8405 use_lfs=no
8406esac
8407
Martin v. Löwis399a6892002-10-04 10:22:02 +00008408if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008409# Two defines needed to enable largefile support on various platforms
8410# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008411case $ac_sys_system/$ac_sys_release in
8412AIX*)
8413
8414$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8415
8416 ;;
8417esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008418
Matthias Kloseb9621712010-04-24 17:59:49 +00008419$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008420
8421
Matthias Kloseb9621712010-04-24 17:59:49 +00008422$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008423
Martin v. Löwis399a6892002-10-04 10:22:02 +00008424fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008425
Guido van Rossum84e7b241996-08-19 21:59:00 +00008426# Add some code to confdefs.h so that the test for off_t works on SCO
8427cat >> confdefs.h <<\EOF
8428#if defined(SCO_DS)
8429#undef _OFF_T
8430#endif
8431EOF
8432
Guido van Rossumef2255b2000-03-10 22:30:29 +00008433# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008434ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008435if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008437else
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
8439cat >>confdefs.h <<_ACEOF
8440#define mode_t int
8441_ACEOF
8442
8443fi
8444
Matthias Kloseb9621712010-04-24 17:59:49 +00008445ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008446if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008447
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008448else
Martin v. Löwis11437992002-04-12 09:54:03 +00008449
8450cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008451#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008452_ACEOF
8453
8454fi
8455
Matthias Kloseb9621712010-04-24 17:59:49 +00008456ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008457if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008458
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008459else
Martin v. Löwis11437992002-04-12 09:54:03 +00008460
8461cat >>confdefs.h <<_ACEOF
8462#define pid_t int
8463_ACEOF
8464
8465fi
8466
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008467
Martin v. Löwis11437992002-04-12 09:54:03 +00008468cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008469#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008470_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008471
Matthias Kloseb9621712010-04-24 17:59:49 +00008472ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008473if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008474
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008475else
Martin v. Löwis11437992002-04-12 09:54:03 +00008476
8477cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008479_ACEOF
8480
8481fi
8482
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8484$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008485if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008487else
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008489/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008490#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008491
8492_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008495 ac_cv_type_uid_t=yes
8496else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008497 ac_cv_type_uid_t=no
8498fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008499rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008500
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8503$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008504if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008505
Matthias Kloseb9621712010-04-24 17:59:49 +00008506$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008507
8508
Matthias Kloseb9621712010-04-24 17:59:49 +00008509$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008510
8511fi
8512
Mark Dickinson983bc162012-12-02 12:11:38 +00008513
Matthias Kloseb9621712010-04-24 17:59:49 +00008514ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008515if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008516
Matthias Kloseb9621712010-04-24 17:59:49 +00008517$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008518
8519fi
8520
Stefan Krah1919b7e2012-03-21 18:25:23 +01008521ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8522if test "x$ac_cv_type___uint128_t" = xyes; then :
8523
8524$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8525
8526fi
8527
Jack Jansendd19cf82001-12-06 22:36:17 +00008528
Michael W. Hudson54241132001-12-07 15:38:26 +00008529# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008530# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531# The cast to long int works around a bug in the HP C Compiler
8532# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8533# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8534# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8536$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008537if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008539else
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 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 +00008541
Martin v. Löwis11437992002-04-12 09:54:03 +00008542else
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 if test "$ac_cv_type_int" = yes; then
8544 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8545$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008546as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008547See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548 else
8549 ac_cv_sizeof_int=0
8550 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008552
Martin v. Löwis11437992002-04-12 09:54:03 +00008553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8555$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556
8557
8558
Martin v. Löwis11437992002-04-12 09:54:03 +00008559cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008560#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008561_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008562
8563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564# The cast to long int works around a bug in the HP C Compiler
8565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8567# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8569$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008570if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008572else
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 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 +00008574
Martin v. Löwis11437992002-04-12 09:54:03 +00008575else
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 if test "$ac_cv_type_long" = yes; then
8577 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008579as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008580See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581 else
8582 ac_cv_sizeof_long=0
8583 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008585
Martin v. Löwis11437992002-04-12 09:54:03 +00008586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8588$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589
8590
8591
Martin v. Löwis11437992002-04-12 09:54:03 +00008592cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008593#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008594_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008595
8596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597# The cast to long int works around a bug in the HP C Compiler
8598# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8599# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8600# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8602$as_echo_n "checking size of long long... " >&6; }
8603if ${ac_cv_sizeof_long_long+:} false; then :
8604 $as_echo_n "(cached) " >&6
8605else
8606 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8607
8608else
8609 if test "$ac_cv_type_long_long" = yes; then
8610 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8612as_fn_error 77 "cannot compute sizeof (long long)
8613See \`config.log' for more details" "$LINENO" 5; }
8614 else
8615 ac_cv_sizeof_long_long=0
8616 fi
8617fi
8618
8619fi
8620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8621$as_echo "$ac_cv_sizeof_long_long" >&6; }
8622
8623
8624
8625cat >>confdefs.h <<_ACEOF
8626#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8627_ACEOF
8628
8629
8630# The cast to long int works around a bug in the HP C Compiler
8631# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8632# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8633# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8635$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008636if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008638else
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 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 +00008640
Martin v. Löwis11437992002-04-12 09:54:03 +00008641else
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 if test "$ac_cv_type_void_p" = yes; then
8643 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008645as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008646See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647 else
8648 ac_cv_sizeof_void_p=0
8649 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008651
Martin v. Löwis11437992002-04-12 09:54:03 +00008652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8654$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655
8656
8657
Martin v. Löwis11437992002-04-12 09:54:03 +00008658cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008659#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008660_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008661
8662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663# The cast to long int works around a bug in the HP C Compiler
8664# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8665# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8666# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8668$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008669if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008671else
Matthias Kloseb9621712010-04-24 17:59:49 +00008672 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 +00008673
Martin v. Löwis11437992002-04-12 09:54:03 +00008674else
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 if test "$ac_cv_type_short" = yes; then
8676 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008678as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008679See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680 else
8681 ac_cv_sizeof_short=0
8682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8687$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688
8689
8690
Martin v. Löwis11437992002-04-12 09:54:03 +00008691cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008692#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008693_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008694
8695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696# The cast to long int works around a bug in the HP C Compiler
8697# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8698# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8699# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8701$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008702if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008704else
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 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 +00008706
Martin v. Löwis11437992002-04-12 09:54:03 +00008707else
Matthias Kloseb9621712010-04-24 17:59:49 +00008708 if test "$ac_cv_type_float" = yes; then
8709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008711as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008712See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713 else
8714 ac_cv_sizeof_float=0
8715 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008717
Martin v. Löwis11437992002-04-12 09:54:03 +00008718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8720$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721
8722
8723
Martin v. Löwis11437992002-04-12 09:54:03 +00008724cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008725#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008726_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008727
8728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729# The cast to long int works around a bug in the HP C Compiler
8730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8732# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8734$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008735if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008737else
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 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 +00008739
Martin v. Löwis11437992002-04-12 09:54:03 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 if test "$ac_cv_type_double" = yes; then
8742 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008744as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008745See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746 else
8747 ac_cv_sizeof_double=0
8748 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008750
Martin v. Löwis11437992002-04-12 09:54:03 +00008751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8753$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754
8755
8756
Martin v. Löwis11437992002-04-12 09:54:03 +00008757cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008758#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008759_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008760
8761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762# The cast to long int works around a bug in the HP C Compiler
8763# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8764# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8765# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8767$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008768if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008770else
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 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 +00008772
Martin v. Löwis11437992002-04-12 09:54:03 +00008773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 if test "$ac_cv_type_fpos_t" = yes; then
8775 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8776$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008777as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008778See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779 else
8780 ac_cv_sizeof_fpos_t=0
8781 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783
Martin v. Löwis11437992002-04-12 09:54:03 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8786$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787
8788
8789
Martin v. Löwis11437992002-04-12 09:54:03 +00008790cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008791#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008792_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008793
Michael W. Hudson54241132001-12-07 15:38:26 +00008794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008795# The cast to long int works around a bug in the HP C Compiler
8796# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8797# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8798# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8800$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008801if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008803else
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 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 +00008805
Martin v. Löwis18e16552006-02-15 17:27:45 +00008806else
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 if test "$ac_cv_type_size_t" = yes; then
8808 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008810as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008811See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812 else
8813 ac_cv_sizeof_size_t=0
8814 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008816
Martin v. Löwis18e16552006-02-15 17:27:45 +00008817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8819$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820
8821
8822
Martin v. Löwis18e16552006-02-15 17:27:45 +00008823cat >>confdefs.h <<_ACEOF
8824#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8825_ACEOF
8826
8827
Christian Heimes400adb02008-02-01 08:12:03 +00008828# The cast to long int works around a bug in the HP C Compiler
8829# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8830# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8831# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8833$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008834if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008836else
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 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 +00008838
Christian Heimes400adb02008-02-01 08:12:03 +00008839else
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 if test "$ac_cv_type_pid_t" = yes; then
8841 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8842$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008843as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008844See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008845 else
8846 ac_cv_sizeof_pid_t=0
8847 fi
8848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008849
Christian Heimes400adb02008-02-01 08:12:03 +00008850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8852$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008853
8854
8855
8856cat >>confdefs.h <<_ACEOF
8857#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8858_ACEOF
8859
8860
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008861# The cast to long int works around a bug in the HP C Compiler
8862# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8863# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8864# This bug is HP SR number 8606223364.
8865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8866$as_echo_n "checking size of uintptr_t... " >&6; }
8867if ${ac_cv_sizeof_uintptr_t+:} false; then :
8868 $as_echo_n "(cached) " >&6
8869else
8870 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8871
8872else
8873 if test "$ac_cv_type_uintptr_t" = yes; then
8874 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8876as_fn_error 77 "cannot compute sizeof (uintptr_t)
8877See \`config.log' for more details" "$LINENO" 5; }
8878 else
8879 ac_cv_sizeof_uintptr_t=0
8880 fi
8881fi
8882
8883fi
8884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8885$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8886
8887
8888
8889cat >>confdefs.h <<_ACEOF
8890#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8891_ACEOF
8892
8893
Michael W. Hudson54241132001-12-07 15:38:26 +00008894
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008895
Eitan Adler3055c942018-05-15 22:58:09 -07008896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8897$as_echo_n "checking for long double... " >&6; }
8898if ${ac_cv_type_long_double+:} false; then :
8899 $as_echo_n "(cached) " >&6
8900else
8901 if test "$GCC" = yes; then
8902 ac_cv_type_long_double=yes
8903 else
8904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8905/* end confdefs.h. */
8906/* The Stardent Vistra knows sizeof (long double), but does
8907 not support it. */
8908 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008909int
8910main ()
8911{
Eitan Adler3055c942018-05-15 22:58:09 -07008912static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8913 sizeof (double) <= sizeof (long double))];
8914test_array [0] = 0;
8915return test_array [0];
8916
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008917 ;
8918 return 0;
8919}
8920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008921if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008922 ac_cv_type_long_double=yes
8923else
8924 ac_cv_type_long_double=no
8925fi
8926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8927 fi
8928fi
8929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8930$as_echo "$ac_cv_type_long_double" >&6; }
8931 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008932
Matthias Kloseb9621712010-04-24 17:59:49 +00008933$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008934
Eitan Adler3055c942018-05-15 22:58:09 -07008935 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008936
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008937# The cast to long int works around a bug in the HP C Compiler
8938# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8939# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8940# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8942$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008943if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008945else
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 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 +00008947
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008948else
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 if test "$ac_cv_type_long_double" = yes; then
8950 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008952as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008953See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008954 else
8955 ac_cv_sizeof_long_double=0
8956 fi
8957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008958
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8961$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008962
8963
8964
8965cat >>confdefs.h <<_ACEOF
8966#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8967_ACEOF
8968
8969
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008971# The cast to long int works around a bug in the HP C Compiler
8972# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8973# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8974# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8976$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008977if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008979else
Matthias Kloseb9621712010-04-24 17:59:49 +00008980 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 +00008981
Thomas Woutersb2137042007-02-01 18:02:27 +00008982else
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 if test "$ac_cv_type__Bool" = yes; then
8984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008986as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008987See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988 else
8989 ac_cv_sizeof__Bool=0
8990 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008992
Thomas Woutersb2137042007-02-01 18:02:27 +00008993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8995$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996
8997
8998
Thomas Woutersb2137042007-02-01 18:02:27 +00008999cat >>confdefs.h <<_ACEOF
9000#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9001_ACEOF
9002
9003
Thomas Woutersb2137042007-02-01 18:02:27 +00009004
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009005# The cast to long int works around a bug in the HP C Compiler
9006# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9007# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9008# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9010$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009011if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009013else
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009015#ifdef HAVE_SYS_TYPES_H
9016#include <sys/types.h>
9017#endif
9018
Matthias Kloseb9621712010-04-24 17:59:49 +00009019"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009020
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009021else
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 if test "$ac_cv_type_off_t" = yes; then
9023 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009025as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009026See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009027 else
9028 ac_cv_sizeof_off_t=0
9029 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009031
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9034$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009035
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009036
9037
Martin v. Löwis11437992002-04-12 09:54:03 +00009038cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009039#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009040_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009041
Michael W. Hudson54241132001-12-07 15:38:26 +00009042
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009043
Matthias Kloseb9621712010-04-24 17:59:49 +00009044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9045$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009046if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009047 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009048
Matthias Kloseb9621712010-04-24 17:59:49 +00009049$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009050
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9052$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009053else
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9055$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009056fi
9057
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009058# The cast to long int works around a bug in the HP C Compiler
9059# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9060# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9061# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9063$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009064if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009066else
Matthias Kloseb9621712010-04-24 17:59:49 +00009067 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009068#ifdef HAVE_SYS_TYPES_H
9069#include <sys/types.h>
9070#endif
9071#ifdef HAVE_TIME_H
9072#include <time.h>
9073#endif
9074
Matthias Kloseb9621712010-04-24 17:59:49 +00009075"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009076
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009077else
Matthias Kloseb9621712010-04-24 17:59:49 +00009078 if test "$ac_cv_type_time_t" = yes; then
9079 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009081as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009082See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009083 else
9084 ac_cv_sizeof_time_t=0
9085 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009087
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9090$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009091
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009092
9093
Martin v. Löwis11437992002-04-12 09:54:03 +00009094cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009095#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009096_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009097
Michael W. Hudson54241132001-12-07 15:38:26 +00009098
9099
Trent Mick635f6fb2000-08-23 21:33:05 +00009100# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009101ac_save_cc="$CC"
9102if test "$ac_cv_kpthread" = "yes"
9103then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009104elif test "$ac_cv_kthread" = "yes"
9105then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009106elif test "$ac_cv_pthread" = "yes"
9107then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009108fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009109
Matthias Kloseb9621712010-04-24 17:59:49 +00009110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9111$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009112have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009114/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009115
9116 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009117int
9118main ()
9119{
Guido van Rossum12580492000-09-24 16:47:19 +00009120pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 ;
9122 return 0;
9123}
Matthias Kloseb159a552010-04-25 21:00:44 +00009124
Martin v. Löwis11437992002-04-12 09:54:03 +00009125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009126if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009127 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9131$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009132if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009133 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009134# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9135# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9136# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9138$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009139if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009140 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009141else
Matthias Kloseb9621712010-04-24 17:59:49 +00009142 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009143#ifdef HAVE_PTHREAD_H
9144#include <pthread.h>
9145#endif
9146
Matthias Kloseb9621712010-04-24 17:59:49 +00009147"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009148
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009149else
Matthias Kloseb9621712010-04-24 17:59:49 +00009150 if test "$ac_cv_type_pthread_t" = yes; then
9151 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009153as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009154See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009155 else
9156 ac_cv_sizeof_pthread_t=0
9157 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009159
Trent Mick635f6fb2000-08-23 21:33:05 +00009160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9162$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009163
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009164
9165
Martin v. Löwis11437992002-04-12 09:54:03 +00009166cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009167#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009168_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009170
Trent Mick635f6fb2000-08-23 21:33:05 +00009171fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009172
9173# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9174# This checking will be unnecessary after removing deprecated TLS API.
9175# The cast to long int works around a bug in the HP C Compiler
9176# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9177# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9178# This bug is HP SR number 8606223364.
9179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9180$as_echo_n "checking size of pthread_key_t... " >&6; }
9181if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9182 $as_echo_n "(cached) " >&6
9183else
9184 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9185"; then :
9186
9187else
9188 if test "$ac_cv_type_pthread_key_t" = yes; then
9189 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9191as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9192See \`config.log' for more details" "$LINENO" 5; }
9193 else
9194 ac_cv_sizeof_pthread_key_t=0
9195 fi
9196fi
9197
9198fi
9199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9200$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9201
9202
9203
9204cat >>confdefs.h <<_ACEOF
9205#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9206_ACEOF
9207
9208
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9210$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9211if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9213/* end confdefs.h. */
9214#include <pthread.h>
9215int
9216main ()
9217{
9218pthread_key_t k; k * 1;
9219 ;
9220 return 0;
9221}
9222_ACEOF
9223if ac_fn_c_try_compile "$LINENO"; then :
9224 ac_pthread_key_t_is_arithmetic_type=yes
9225else
9226 ac_pthread_key_t_is_arithmetic_type=no
9227
9228fi
9229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9231$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9232 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9233
9234$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9235
9236 fi
9237else
9238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9239$as_echo "no" >&6; }
9240fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009241CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009242
Michael W. Hudson54241132001-12-07 15:38:26 +00009243
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009244case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009245 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009246 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9247 ;;
9248 Darwin/*)
9249 OTHER_LIBTOOL_OPT=""
9250 ;;
9251esac
9252
9253
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009254
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009255case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009256 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009257 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9258 if test "${enable_universalsdk}"; then
9259 :
9260 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009261 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009262 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009263 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009264 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009265 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009266 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009267 if test ${gcc_version} '<' 4.0
9268 then
9269 LIBTOOL_CRUFT="-lcc_dynamic"
9270 else
9271 LIBTOOL_CRUFT=""
9272 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009273 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009274 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009275else
Matthias Kloseb9621712010-04-24 17:59:49 +00009276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009277/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009278
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009279 #include <unistd.h>
9280 int main(int argc, char*argv[])
9281 {
9282 if (sizeof(long) == 4) {
9283 return 0;
9284 } else {
9285 return 1;
9286 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009287 }
9288
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009290if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009291 ac_osx_32bit=yes
9292else
Matthias Kloseb9621712010-04-24 17:59:49 +00009293 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9296 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009297fi
9298
9299
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009300 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009301 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009302 i386)
9303 MACOSX_DEFAULT_ARCH="i386"
9304 ;;
9305 ppc)
9306 MACOSX_DEFAULT_ARCH="ppc"
9307 ;;
9308 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009309 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009310 ;;
9311 esac
9312 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009313 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009314 i386)
9315 MACOSX_DEFAULT_ARCH="x86_64"
9316 ;;
9317 ppc)
9318 MACOSX_DEFAULT_ARCH="ppc64"
9319 ;;
9320 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009321 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009322 ;;
9323 esac
9324
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009325 fi
9326
9327 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009328 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009329 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009330esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9332$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009333if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009335 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009336 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009337 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009338
Matthias Kloseb9621712010-04-24 17:59:49 +00009339$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009340
Matthias Kloseb9621712010-04-24 17:59:49 +00009341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9342$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009343 if test $enable_shared = "yes"
9344 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009345 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 +00009346 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009347else
Matthias Kloseb9621712010-04-24 17:59:49 +00009348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9349$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009350fi
9351
Matthias Kloseb9621712010-04-24 17:59:49 +00009352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9353$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009354case $ac_sys_system/$ac_sys_release in
9355 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009356
Matthias Kloseb9621712010-04-24 17:59:49 +00009357$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009358
Matthias Kloseb9621712010-04-24 17:59:49 +00009359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9360$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009361 ;;
9362 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9364$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009365 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009366esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009367
Guido van Rossum0a516c91994-09-12 10:58:40 +00009368# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009369
Michael W. Hudson54241132001-12-07 15:38:26 +00009370
9371
9372
9373
Benjamin Peterson99f03762010-04-11 22:15:28 +00009374
Thomas Wouters477c8d52006-05-27 19:21:47 +00009375
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009376# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9377# -- usually .so, .sl on HP-UX, .dll on Cygwin
9378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9379$as_echo_n "checking the extension of shared libraries... " >&6; }
9380if test -z "$SHLIB_SUFFIX"; then
9381 case $ac_sys_system in
9382 hp*|HP*)
9383 case `uname -m` in
9384 ia64) SHLIB_SUFFIX=.so;;
9385 *) SHLIB_SUFFIX=.sl;;
9386 esac
9387 ;;
9388 CYGWIN*) SHLIB_SUFFIX=.dll;;
9389 *) SHLIB_SUFFIX=.so;;
9390 esac
9391fi
9392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9393$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009394
Guido van Rossum0a516c91994-09-12 10:58:40 +00009395# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009396# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009397# (Shared libraries in this instance are shared modules to be loaded into
9398# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9400$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009401if test -z "$LDSHARED"
9402then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009403 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009404 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009405 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009406 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009407 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009409 if test "$GCC" = "yes" ; then
9410 LDSHARED='$(CC) -shared'
9411 LDCXXSHARED='$(CXX) -shared'
9412 else
9413 LDSHARED='$(CC) -G'
9414 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009415 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009416 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009417 if test "$GCC" = "yes" ; then
9418 LDSHARED='$(CC) -shared'
9419 LDCXXSHARED='$(CXX) -shared'
9420 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009421 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009422 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009423 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009424 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009425 LDSHARED='$(CC) -bundle'
9426 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009427 if test "$enable_framework" ; then
9428 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009429 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9430 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009431 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009432 else
9433 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009434 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009435 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009436 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009437 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009438 LDSHARED='$(CC) -bundle'
9439 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009440 if test "$enable_framework" ; then
9441 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009442 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9443 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009444 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009445 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009446 # No framework, use the Python app as bundle-loader
9447 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009448 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009449 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009450 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009451 Darwin/*)
9452 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9453 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009454
Ned Deily36820b62014-06-25 13:44:22 -07009455 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9456 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9457 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9458 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9459 if test ${dep_target_major} -eq 10 && \
9460 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009461 then
Ned Deily36820b62014-06-25 13:44:22 -07009462 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009463 LDSHARED='$(CC) -bundle'
9464 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009465 if test "$enable_framework" ; then
9466 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009467 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9468 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009469 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009470 else
9471 # No framework, use the Python app as bundle-loader
9472 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9473 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009474 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009475 fi
Ned Deily36820b62014-06-25 13:44:22 -07009476 else
9477 # building for OS X 10.3 and later
9478 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9479 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9480 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009481 fi
9482 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009483 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009484 LDSHARED='$(CC) -shared'
9485 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009486 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009487 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009488 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009489 LDSHARED='$(CC) -shared'
9490 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009491 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009492 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009493 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009494 OpenBSD*)
9495 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9496 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009497 LDSHARED='$(CC) -shared $(CCSHARED)'
9498 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009499 else
9500 case `uname -r` in
9501 [01].* | 2.[0-7] | 2.[0-7].*)
9502 LDSHARED="ld -Bshareable ${LDFLAGS}"
9503 ;;
9504 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009505 LDSHARED='$(CC) -shared $(CCSHARED)'
9506 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009507 ;;
9508 esac
9509 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009510 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009511 LDSHARED='$(CC) -shared'
9512 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009513 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009514 if test "$GCC" = "yes" ; then
9515 LDSHARED='$(CC) -shared'
9516 LDCXXSHARED='$(CXX) -shared'
9517 else
9518 LDSHARED='$(CC) -G'
9519 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009520 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009521 SCO_SV*)
9522 LDSHARED='$(CC) -Wl,-G,-Bexport'
9523 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9524 CYGWIN*)
9525 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9526 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009527 *) LDSHARED="ld";;
9528 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9531$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009532LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009533BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009534# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009535# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9537$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009538if test -z "$CCSHARED"
9539then
Guido van Rossum07397971997-04-29 21:49:50 +00009540 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009541 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009542 then CCSHARED="-fPIC";
9543 elif test `uname -p` = sparc;
9544 then CCSHARED="-xcode=pic32";
9545 else CCSHARED="-Kpic";
9546 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009547 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009548 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009549 else CCSHARED="+z";
9550 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009551 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009552 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009553 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009554 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009555 if test "$GCC" = "yes"
9556 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009557 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009558 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009559 SCO_SV*)
9560 if test "$GCC" = "yes"
9561 then CCSHARED="-fPIC"
9562 else CCSHARED="-Kpic -belf"
9563 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009564 VxWorks*)
9565 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009566 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9569$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009570# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009571# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9573$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009574if test -z "$LINKFORSHARED"
9575then
Guido van Rossum07397971997-04-29 21:49:50 +00009576 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009577 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009578 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009579 LINKFORSHARED="-Wl,-E -Wl,+s";;
9580# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009581 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009582 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009583 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009585 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009586
9587 # Issue #18075: the default maximum stack size (8MBytes) is too
9588 # small for the default recursion limit. Increase the stack size
9589 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009590 # Note: This matches the value of THREAD_STACK_SIZE in
9591 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009592 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9593
Jack Jansene578a632001-08-15 01:27:14 +00009594 if test "$enable_framework"
9595 then
Jack Jansenda49e192005-01-07 13:08:22 +00009596 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009597 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009598 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009599 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009600 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009601 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009602 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009603 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9604 then
9605 LINKFORSHARED="-Wl,--export-dynamic"
9606 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009607 SunOS/5*) case $CC in
9608 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009609 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009610 then
9611 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009612 fi;;
9613 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009614 CYGWIN*)
9615 if test $enable_shared = "no"
9616 then
9617 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9618 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009619 QNX*)
9620 # -Wl,-E causes the symbols to be added to the dynamic
9621 # symbol table so that they can be found when a module
9622 # is loaded. -N 2048K causes the stack size to be set
9623 # to 2048 kilobytes so that the stack doesn't overflow
9624 # when running test_compile.py.
9625 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009626 VxWorks*)
9627 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009628 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9631$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009632
Michael W. Hudson54241132001-12-07 15:38:26 +00009633
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009634
Matthias Kloseb9621712010-04-24 17:59:49 +00009635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9636$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009637if test ! "$LIBRARY" = "$LDLIBRARY"
9638then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009639 case $ac_sys_system in
9640 CYGWIN*)
9641 # Cygwin needs CCSHARED when building extension DLLs
9642 # but not when building the interpreter DLL.
9643 CFLAGSFORSHARED='';;
9644 *)
9645 CFLAGSFORSHARED='$(CCSHARED)'
9646 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9649$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009650
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009651# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9652# library (with --enable-shared).
9653# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009654# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9655# if it is not required, since it creates a dependency of the shared library
9656# to LIBS. This, in turn, means that applications linking the shared libpython
9657# don't need to link LIBS explicitly. The default should be only changed
9658# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009659
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9661$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009662case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009663 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009664 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009665esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9667$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009668
9669
Guido van Rossum627b2d71993-12-24 10:39:16 +00009670# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9672$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009673if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009674 $as_echo_n "(cached) " >&6
9675else
9676 ac_check_lib_save_LIBS=$LIBS
9677LIBS="-lsendfile $LIBS"
9678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9679/* end confdefs.h. */
9680
9681/* Override any GCC internal prototype to avoid an error.
9682 Use char because int might match the return type of a GCC
9683 builtin and then its argument prototype would still apply. */
9684#ifdef __cplusplus
9685extern "C"
9686#endif
9687char sendfile ();
9688int
9689main ()
9690{
9691return sendfile ();
9692 ;
9693 return 0;
9694}
9695_ACEOF
9696if ac_fn_c_try_link "$LINENO"; then :
9697 ac_cv_lib_sendfile_sendfile=yes
9698else
9699 ac_cv_lib_sendfile_sendfile=no
9700fi
9701rm -f core conftest.err conftest.$ac_objext \
9702 conftest$ac_exeext conftest.$ac_ext
9703LIBS=$ac_check_lib_save_LIBS
9704fi
9705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9706$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009707if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009708 cat >>confdefs.h <<_ACEOF
9709#define HAVE_LIBSENDFILE 1
9710_ACEOF
9711
9712 LIBS="-lsendfile $LIBS"
9713
9714fi
9715
Matthias Kloseb9621712010-04-24 17:59:49 +00009716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9717$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009718if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009720else
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009722LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726/* Override any GCC internal prototype to avoid an error.
9727 Use char because int might match the return type of a GCC
9728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009729#ifdef __cplusplus
9730extern "C"
9731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009732char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009733int
9734main ()
9735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 ;
9738 return 0;
9739}
9740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009743else
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009746rm -f core conftest.err conftest.$ac_objext \
9747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009748LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9751$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009752if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 cat >>confdefs.h <<_ACEOF
9754#define HAVE_LIBDL 1
9755_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009756
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009757 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009758
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009759fi
9760 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9762$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009763if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009764 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009765else
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009767LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771/* Override any GCC internal prototype to avoid an error.
9772 Use char because int might match the return type of a GCC
9773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009774#ifdef __cplusplus
9775extern "C"
9776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009777char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009778int
9779main ()
9780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ;
9783 return 0;
9784}
9785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009788else
Matthias Kloseb9621712010-04-24 17:59:49 +00009789 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009791rm -f core conftest.err conftest.$ac_objext \
9792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009793LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9796$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009797if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 cat >>confdefs.h <<_ACEOF
9799#define HAVE_LIBDLD 1
9800_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009801
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009802 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009803
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009804fi
9805 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009806
Michael Felt0d3ccb42017-12-30 22:39:20 +01009807# checks for uuid.h location
9808for ac_header in uuid/uuid.h uuid.h
9809do :
9810 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9811ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9812if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9813 cat >>confdefs.h <<_ACEOF
9814#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9815_ACEOF
9816
9817fi
9818
9819done
9820
9821
Berker Peksag9a10ff42017-11-08 23:09:16 +03009822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9823$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9825/* end confdefs.h. */
9826#include <uuid/uuid.h>
9827int
9828main ()
9829{
9830
9831#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009832void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009833#endif
9834
9835 ;
9836 return 0;
9837}
9838_ACEOF
9839if ac_fn_c_try_compile "$LINENO"; then :
9840
9841$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9842
9843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9844$as_echo "yes" >&6; }
9845else
9846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9847$as_echo "no" >&6; }
9848
9849fi
9850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9851
Michael Felt0d3ccb42017-12-30 22:39:20 +01009852# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009853# FreeBSD and OpenBSD provides support as well
9854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9855$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9857/* end confdefs.h. */
9858#include <uuid.h>
9859int
9860main ()
9861{
9862
9863#ifndef uuid_create
9864void *x = uuid_create
9865#endif
9866
9867 ;
9868 return 0;
9869}
9870_ACEOF
9871if ac_fn_c_try_compile "$LINENO"; then :
9872
9873$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9874
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9876$as_echo "yes" >&6; }
9877else
9878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9879$as_echo "no" >&6; }
9880
9881fi
9882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9883
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009884# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9885# stream in big-endian byte-order
9886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9887$as_echo_n "checking for uuid_enc_be... " >&6; }
9888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9889/* end confdefs.h. */
9890#include <uuid.h>
9891int
9892main ()
9893{
9894
9895#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009896void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009897#endif
9898
9899 ;
9900 return 0;
9901}
9902_ACEOF
9903if ac_fn_c_try_compile "$LINENO"; then :
9904
9905$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9906
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9908$as_echo "yes" >&6; }
9909else
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9911$as_echo "no" >&6; }
9912
9913fi
9914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9915
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009916# 'Real Time' functions on Solaris
9917# posix4 on Solaris 2.6
9918# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009920$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009921if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009923else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009924 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928/* Override any GCC internal prototype to avoid an error.
9929 Use char because int might match the return type of a GCC
9930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009931#ifdef __cplusplus
9932extern "C"
9933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009934char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009935int
9936main ()
9937{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009938return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009939 ;
9940 return 0;
9941}
9942_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009943for ac_lib in '' pthread rt posix4; do
9944 if test -z "$ac_lib"; then
9945 ac_res="none required"
9946 else
9947 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009948 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009950 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009951 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009953rm -f core conftest.err conftest.$ac_objext \
9954 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009955 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009956 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009958done
Victor Stinnere0be4232011-10-25 13:06:09 +02009959if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961else
9962 ac_cv_search_sem_init=no
9963fi
9964rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009965LIBS=$ac_func_search_save_LIBS
9966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9968$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009969ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009970if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009972
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009973fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009974
Martin v. Löwis519adae2003-09-20 10:47:47 +00009975
Martin v. Löwis19d17342003-06-14 21:03:05 +00009976# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9978$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009979if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009981else
9982 ac_check_lib_save_LIBS=$LIBS
9983LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009985/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009987/* Override any GCC internal prototype to avoid an error.
9988 Use char because int might match the return type of a GCC
9989 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009990#ifdef __cplusplus
9991extern "C"
9992#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009993char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009994int
9995main ()
9996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009998 ;
9999 return 0;
10000}
10001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010003 ac_cv_lib_intl_textdomain=yes
10004else
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010007rm -f core conftest.err conftest.$ac_objext \
10008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010009LIBS=$ac_check_lib_save_LIBS
10010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10012$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010013if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010014
Matthias Kloseb9621712010-04-24 17:59:49 +000010015$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010016
Brett Cannonc6d936e2009-06-07 20:09:53 +000010017 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010018fi
10019
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010020
10021# checks for system dependent C++ extensions support
10022case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10024$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010026/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010027
Georg Brandl59e87bd2011-02-15 19:48:59 +000010028 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010029int
10030main ()
10031{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010032loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 ;
10034 return 0;
10035}
Matthias Kloseb159a552010-04-25 21:00:44 +000010036
Martin v. Löwis11437992002-04-12 09:54:03 +000010037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010038if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010039
Matthias Kloseb159a552010-04-25 21:00:44 +000010040
Matthias Kloseb9621712010-04-24 17:59:49 +000010041$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010042
Matthias Kloseb159a552010-04-25 21:00:44 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010044$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010045
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010046else
Matthias Kloseb159a552010-04-25 21:00:44 +000010047
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010049$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010050
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010052rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010053 conftest$ac_exeext conftest.$ac_ext
10054# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10055# of the AIX system used to build/package Python executable. This tag serves
10056# as a baseline for bdist module packages
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10058$as_echo_n "checking for the system builddate... " >&6; }
10059 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10060
10061cat >>confdefs.h <<_ACEOF
10062#define AIX_BUILDDATE $AIX_BUILDDATE
10063_ACEOF
10064
10065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10066$as_echo "$AIX_BUILDDATE" >&6; }
10067 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010068 *) ;;
10069esac
10070
Christian Heimes985ecdc2013-11-20 11:46:18 +010010071# check for systems that require aligned memory access
10072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10073$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010074if ${ac_cv_aligned_required+:} false; then :
10075 $as_echo_n "(cached) " >&6
10076else
10077 if test "$cross_compiling" = yes; then :
10078 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010079else
10080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10081/* end confdefs.h. */
10082
10083int main()
10084{
10085 char s[16];
10086 int i, *p1, *p2;
10087 for (i=0; i < 16; i++)
10088 s[i] = i;
10089 p1 = (int*)(s+1);
10090 p2 = (int*)(s+2);
10091 if (*p1 == *p2)
10092 return 1;
10093 return 0;
10094}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010095_ACEOF
10096if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010097 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010098else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010099 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010100fi
10101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10102 conftest.$ac_objext conftest.beam conftest.$ac_ext
10103fi
10104
10105
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010106fi
10107
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10109$as_echo "$ac_cv_aligned_required" >&6; }
10110if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010111
10112$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10113
10114fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010115
10116# str, bytes and memoryview hash algorithm
10117
10118
10119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10120$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10121
10122# Check whether --with-hash_algorithm was given.
10123if test "${with_hash_algorithm+set}" = set; then :
10124 withval=$with_hash_algorithm;
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10126$as_echo "$withval" >&6; }
10127case "$withval" in
10128 siphash24)
10129 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10130
10131 ;;
10132 fnv)
10133 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10134
10135 ;;
10136 *)
10137 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10138 ;;
10139esac
10140
10141else
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10143$as_echo "default" >&6; }
10144fi
10145
10146
Charles-François Natalid30b0222014-05-08 23:08:51 +010010147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10148$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10149
10150# Check whether --with-address_sanitizer was given.
10151if test "${with_address_sanitizer+set}" = set; then :
10152 withval=$with_address_sanitizer;
10153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10154$as_echo "$withval" >&6; }
10155BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10156LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010157# ASan works by controlling memory allocation, our own malloc interferes.
10158with_pymalloc="no"
10159
10160else
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10162$as_echo "no" >&6; }
10163fi
10164
10165
10166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10167$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10168
10169# Check whether --with-memory_sanitizer was given.
10170if test "${with_memory_sanitizer+set}" = set; then :
10171 withval=$with_memory_sanitizer;
10172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10173$as_echo "$withval" >&6; }
10174BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10175LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10176# MSan works by controlling memory allocation, our own malloc interferes.
10177with_pymalloc="no"
10178
10179else
10180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181$as_echo "no" >&6; }
10182fi
10183
10184
10185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10186$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10187
10188# Check whether --with-undefined_behavior_sanitizer was given.
10189if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10190 withval=$with_undefined_behavior_sanitizer;
10191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10192$as_echo "$withval" >&6; }
10193BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10194LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010195
10196else
10197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10198$as_echo "no" >&6; }
10199fi
10200
10201
Guido van Rossum70c7f481998-03-26 18:44:10 +000010202# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10204$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010205if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010207else
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010209LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010213/* Override any GCC internal prototype to avoid an error.
10214 Use char because int might match the return type of a GCC
10215 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010216#ifdef __cplusplus
10217extern "C"
10218#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010219char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010220int
10221main ()
10222{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 ;
10225 return 0;
10226}
10227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010228if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010230else
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010233rm -f core conftest.err conftest.$ac_objext \
10234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010235LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10238$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010239if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010240 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010241fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010242 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10244$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010245if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010247else
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010249LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253/* Override any GCC internal prototype to avoid an error.
10254 Use char because int might match the return type of a GCC
10255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010256#ifdef __cplusplus
10257extern "C"
10258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010259char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010260int
10261main ()
10262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 ;
10265 return 0;
10266}
10267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010268if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010269 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010270else
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010273rm -f core conftest.err conftest.$ac_objext \
10274 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010275LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10278$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010279if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010280 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010281fi
10282 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010283
Matthias Kloseb9621712010-04-24 17:59:49 +000010284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10285$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010288if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10291$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010292LIBS="$withval $LIBS"
10293
10294else
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10296$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297fi
10298
Guido van Rossum7f43da71994-08-01 12:15:30 +000010299
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010300
10301
10302
10303
10304
10305
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010306if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10307 if test -n "$ac_tool_prefix"; then
10308 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10309set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10311$as_echo_n "checking for $ac_word... " >&6; }
10312if ${ac_cv_path_PKG_CONFIG+:} false; then :
10313 $as_echo_n "(cached) " >&6
10314else
10315 case $PKG_CONFIG in
10316 [\\/]* | ?:[\\/]*)
10317 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10318 ;;
10319 *)
10320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10321for as_dir in $PATH
10322do
10323 IFS=$as_save_IFS
10324 test -z "$as_dir" && as_dir=.
10325 for ac_exec_ext in '' $ac_executable_extensions; do
10326 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10327 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10328 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10329 break 2
10330 fi
10331done
10332 done
10333IFS=$as_save_IFS
10334
10335 ;;
10336esac
10337fi
10338PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10339if test -n "$PKG_CONFIG"; then
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10341$as_echo "$PKG_CONFIG" >&6; }
10342else
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10344$as_echo "no" >&6; }
10345fi
10346
10347
10348fi
10349if test -z "$ac_cv_path_PKG_CONFIG"; then
10350 ac_pt_PKG_CONFIG=$PKG_CONFIG
10351 # Extract the first word of "pkg-config", so it can be a program name with args.
10352set dummy pkg-config; ac_word=$2
10353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10354$as_echo_n "checking for $ac_word... " >&6; }
10355if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10356 $as_echo_n "(cached) " >&6
10357else
10358 case $ac_pt_PKG_CONFIG in
10359 [\\/]* | ?:[\\/]*)
10360 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10361 ;;
10362 *)
10363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10364for as_dir in $PATH
10365do
10366 IFS=$as_save_IFS
10367 test -z "$as_dir" && as_dir=.
10368 for ac_exec_ext in '' $ac_executable_extensions; do
10369 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10370 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10371 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10372 break 2
10373 fi
10374done
10375 done
10376IFS=$as_save_IFS
10377
10378 ;;
10379esac
10380fi
10381ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10382if test -n "$ac_pt_PKG_CONFIG"; then
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10384$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10385else
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10387$as_echo "no" >&6; }
10388fi
10389
10390 if test "x$ac_pt_PKG_CONFIG" = x; then
10391 PKG_CONFIG=""
10392 else
10393 case $cross_compiling:$ac_tool_warned in
10394yes:)
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10396$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10397ac_tool_warned=yes ;;
10398esac
10399 PKG_CONFIG=$ac_pt_PKG_CONFIG
10400 fi
10401else
10402 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10403fi
10404
10405fi
10406if test -n "$PKG_CONFIG"; then
10407 _pkg_min_version=0.9.0
10408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10409$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10410 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10412$as_echo "yes" >&6; }
10413 else
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10415$as_echo "no" >&6; }
10416 PKG_CONFIG=""
10417 fi
10418fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010419
10420# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10422$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010423
10424# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010425if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010426 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010427else
10428 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010429fi
10430
10431
Matthias Kloseb9621712010-04-24 17:59:49 +000010432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10433$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010434
10435# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10437$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010438
10439# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010440if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010441 withval=$with_system_ffi;
10442fi
10443
10444
Zachary Waref40d4dd2016-09-17 01:25:24 -050010445if test "$ac_sys_system" = "Darwin"
10446then
10447 case "$with_system_ffi" in
10448 "")
10449 with_system_ffi="no"
10450 ;;
10451 yes|no)
10452 ;;
10453 *)
10454 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10455 ;;
10456 esac
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10458$as_echo "$with_system_ffi" >&6; }
10459else
10460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10461$as_echo "yes" >&6; }
10462 if test "$with_system_ffi" != ""
10463 then
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10465$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10466 fi
10467 with_system_ffi="yes"
10468fi
Zachary Ware935043d2016-09-09 17:01:21 -070010469
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010470if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010471 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10472else
10473 LIBFFI_INCLUDEDIR=""
10474fi
10475
10476
Stefan Krah60187b52012-03-23 19:06:27 +010010477# Check for use of the system libmpdec library
10478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10479$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10480
10481# Check whether --with-system_libmpdec was given.
10482if test "${with_system_libmpdec+set}" = set; then :
10483 withval=$with_system_libmpdec;
10484else
10485 with_system_libmpdec="no"
10486fi
10487
10488
10489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10490$as_echo "$with_system_libmpdec" >&6; }
10491
Benjamin Peterson076ed002010-10-31 17:11:02 +000010492# Check for support for loadable sqlite extensions
10493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10494$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10495# Check whether --enable-loadable-sqlite-extensions was given.
10496if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10497 enableval=$enable_loadable_sqlite_extensions;
10498else
10499 enable_loadable_sqlite_extensions="no"
10500fi
10501
10502
10503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10504$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10505
Ned Deilyd819b932013-09-06 01:07:05 -070010506# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10507
10508
10509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10510$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10511
10512# Check whether --with-tcltk-includes was given.
10513if test "${with_tcltk_includes+set}" = set; then :
10514 withval=$with_tcltk_includes;
10515else
10516 with_tcltk_includes="default"
10517fi
10518
10519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10520$as_echo "$with_tcltk_includes" >&6; }
10521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10522$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10523
10524# Check whether --with-tcltk-libs was given.
10525if test "${with_tcltk_libs+set}" = set; then :
10526 withval=$with_tcltk_libs;
10527else
10528 with_tcltk_libs="default"
10529fi
10530
10531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10532$as_echo "$with_tcltk_libs" >&6; }
10533if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10534then
10535 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10536 then
10537 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10538 fi
10539 TCLTK_INCLUDES=""
10540 TCLTK_LIBS=""
10541else
10542 TCLTK_INCLUDES="$with_tcltk_includes"
10543 TCLTK_LIBS="$with_tcltk_libs"
10544fi
10545
Matthias Klose55708cc2009-04-30 08:06:49 +000010546# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10548$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010549
10550# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010551if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010552 withval=$with_dbmliborder;
10553if test x$with_dbmliborder = xyes
10554then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010555as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010556else
10557 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10558 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10559 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010560 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010561 fi
10562 done
10563fi
10564fi
10565
Matthias Kloseb9621712010-04-24 17:59:49 +000010566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10567$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010568
Martin v. Löwis11437992002-04-12 09:54:03 +000010569# Templates for things AC_DEFINEd more than once.
10570# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010571
10572
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010573if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010574then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010575 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010577
10578 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010579 if test "$ac_sys_system" = "SunOS"; then
10580 CFLAGS="$CFLAGS -D_REENTRANT"
10581 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010582elif test "$ac_cv_kpthread" = "yes"
10583then
10584 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010585 if test "$ac_cv_cxx_thread" = "yes"; then
10586 CXX="$CXX -Kpthread"
10587 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010588 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010589elif test "$ac_cv_kthread" = "yes"
10590then
10591 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010592 if test "$ac_cv_cxx_thread" = "yes"; then
10593 CXX="$CXX -Kthread"
10594 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010595 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596elif test "$ac_cv_pthread" = "yes"
10597then
10598 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010599 if test "$ac_cv_cxx_thread" = "yes"; then
10600 CXX="$CXX -pthread"
10601 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010602 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010603else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010604 if test ! -z "$withval" -a -d "$withval"
10605 then LDFLAGS="$LDFLAGS -L$withval"
10606 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010607
10608 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010609 # define _POSIX_THREADS in unistd.h. Some apparently don't
10610 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10612$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010614/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010615
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010616#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010617#ifdef _POSIX_THREADS
10618yes
10619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010620
10621_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010624 unistd_defines_pthreads=yes
10625else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010626 unistd_defines_pthreads=no
10627fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010628rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010629
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10631$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010632
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010634
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010635 # Just looking for pthread_create in libpthread is not enough:
10636 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10637 # So we really have to include pthread.h, and then link.
10638 _libs=$LIBS
10639 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10641$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010643/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010644
10645#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010646#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010647
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010648void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010649int
10650main ()
10651{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010652
10653pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010654 ;
10655 return 0;
10656}
10657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010658if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010659
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10661$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010662 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010663
Guido van Rossum02a1c402000-02-25 19:26:31 +000010664else
Martin v. Löwis11437992002-04-12 09:54:03 +000010665
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010666 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010668if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010669
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010670 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010671
Guido van Rossumad678af1998-10-02 14:42:15 +000010672else
Guido van Rossumad678af1998-10-02 14:42:15 +000010673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10675$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010676if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010678else
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010680LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684/* Override any GCC internal prototype to avoid an error.
10685 Use char because int might match the return type of a GCC
10686 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010687#ifdef __cplusplus
10688extern "C"
10689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010690char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010691int
10692main ()
10693{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010694return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 ;
10696 return 0;
10697}
10698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010699if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010701else
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010704rm -f core conftest.err conftest.$ac_objext \
10705 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010706LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10709$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010710if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010711
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010712 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010713 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010714
Greg Steinadf63d62000-07-05 10:38:09 +000010715else
Greg Steinadf63d62000-07-05 10:38:09 +000010716
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10718$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010719if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010721else
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010723LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010726
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727/* Override any GCC internal prototype to avoid an error.
10728 Use char because int might match the return type of a GCC
10729 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010730#ifdef __cplusplus
10731extern "C"
10732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010733char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010734int
10735main ()
10736{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010738 ;
10739 return 0;
10740}
10741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010743 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010744else
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010747rm -f core conftest.err conftest.$ac_objext \
10748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010749LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10752$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010753if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010754
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010755 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010756 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010757
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010758else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010759
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10761$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010762if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010764else
Martin v. Löwis11437992002-04-12 09:54:03 +000010765 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010766LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010770/* Override any GCC internal prototype to avoid an error.
10771 Use char because int might match the return type of a GCC
10772 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010773#ifdef __cplusplus
10774extern "C"
10775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010776char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010777int
10778main ()
10779{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010780return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010781 ;
10782 return 0;
10783}
10784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010785if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010786 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010787else
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010790rm -f core conftest.err conftest.$ac_objext \
10791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010792LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10795$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010796if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010797
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010798 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010799 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010800
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010801else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010802
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10804$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010805if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010807else
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010809LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813/* Override any GCC internal prototype to avoid an error.
10814 Use char because int might match the return type of a GCC
10815 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010816#ifdef __cplusplus
10817extern "C"
10818#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010819char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010820int
10821main ()
10822{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010824 ;
10825 return 0;
10826}
10827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010828if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010829 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010830else
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010833rm -f core conftest.err conftest.$ac_objext \
10834 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010835LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10838$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010839if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010840
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010841 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010842 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010843
Guido van Rossumb93a8621998-05-07 13:27:32 +000010844else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010845
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010846 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10847
Guido van Rossum2d38f911996-06-26 19:47:01 +000010848fi
10849
Guido van Rossum627b2d71993-12-24 10:39:16 +000010850
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010851fi
10852
Guido van Rossum0be3e491997-05-22 20:33:33 +000010853fi
10854
Guido van Rossum49545951997-12-02 19:28:29 +000010855fi
10856
Guido van Rossumb93a8621998-05-07 13:27:32 +000010857fi
10858
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010860rm -f core conftest.err conftest.$ac_objext \
10861 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10864$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010865if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010867else
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010869LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010873/* Override any GCC internal prototype to avoid an error.
10874 Use char because int might match the return type of a GCC
10875 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010876#ifdef __cplusplus
10877extern "C"
10878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010879char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010880int
10881main ()
10882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010883return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010884 ;
10885 return 0;
10886}
10887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010888if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010890else
Matthias Kloseb9621712010-04-24 17:59:49 +000010891 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010893rm -f core conftest.err conftest.$ac_objext \
10894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010895LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10898$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010899if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010900
Martin v. Löwis130fb172001-07-19 11:00:41 +000010901 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010902
Guido van Rossum627b2d71993-12-24 10:39:16 +000010903fi
10904
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010905
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010906fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010907
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010908if test "$posix_threads" = "yes"; then
10909 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010912
10913 fi
10914
10915 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10916 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010917 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010918$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010919
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010920 ;;
10921 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010922$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010923
10924 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010925 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010926$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010927
10928 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010929 esac
10930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10932$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010933 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010935else
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010937 ac_cv_pthread_system_supported=no
10938else
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010941
10942 #include <stdio.h>
10943 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010944 void *foo(void *parm) {
10945 return NULL;
10946 }
10947 main() {
10948 pthread_attr_t attr;
10949 pthread_t id;
10950 if (pthread_attr_init(&attr)) exit(-1);
10951 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10952 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10953 exit(0);
10954 }
10955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010956if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010957 ac_cv_pthread_system_supported=yes
10958else
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010963fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010965
Guido van Rossum627b2d71993-12-24 10:39:16 +000010966fi
10967
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10969$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010970 if test "$ac_cv_pthread_system_supported" = "yes"; then
10971
Matthias Kloseb9621712010-04-24 17:59:49 +000010972$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010973
10974 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 for ac_func in pthread_sigmask
10976do :
10977 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010978if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010979 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010980#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010981_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010982 case $ac_sys_system in
10983 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010984
Matthias Kloseb9621712010-04-24 17:59:49 +000010985$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010986
10987 ;;
10988 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010989fi
10990done
10991
pdoxe14679c2017-10-05 00:01:56 -070010992 for ac_func in pthread_getcpuclockid
10993do :
10994 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10995if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10996 cat >>confdefs.h <<_ACEOF
10997#define HAVE_PTHREAD_GETCPUCLOCKID 1
10998_ACEOF
10999
11000fi
11001done
11002
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011003fi
11004
11005
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011007
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11009$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011011if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011012 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011013 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11015$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011016 ipv6=no
11017 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011018 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11019$as_echo "yes" >&6; }
11020 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021
11022 ipv6=yes
11023 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011024 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011025else
Martin v. Löwis11437992002-04-12 09:54:03 +000011026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011028/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011029 /* AF_INET6 available check */
11030#include <sys/types.h>
11031#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011032int
11033main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011034{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011035int domain = AF_INET6;
11036 ;
11037 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011038}
Martin v. Löwis11437992002-04-12 09:54:03 +000011039_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011040if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011041
Matthias Kloseb9621712010-04-24 17:59:49 +000011042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11043$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011044 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011045
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046else
Matthias Kloseb159a552010-04-25 21:00:44 +000011047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11049$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011051
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011052fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011054
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011055if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11057$as_echo_n "checking if RFC2553 API is available... " >&6; }
11058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011059/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011060
11061 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011062#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011063int
11064main ()
11065{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011066struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011067 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 ;
11069 return 0;
11070}
Matthias Kloseb159a552010-04-25 21:00:44 +000011071
Martin v. Löwis11437992002-04-12 09:54:03 +000011072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011073if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011074
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011076$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011077 ipv6=yes
11078
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011079else
Matthias Kloseb159a552010-04-25 21:00:44 +000011080
11081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011082$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011083 ipv6=no
11084
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011087fi
11088
11089if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011091
11092fi
11093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011094fi
11095
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096
11097ipv6type=unknown
11098ipv6lib=none
11099ipv6trylibc=no
11100
11101if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11103$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011104 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11105 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011106 case $i in
11107 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011109/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011110
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011111#include <netinet/in.h>
11112#ifdef IPV6_INRIA_VERSION
11113yes
11114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011115_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011118 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011119fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011120rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121
11122 ;;
11123 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011125/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011126
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011127#include <netinet/in.h>
11128#ifdef __KAME__
11129yes
11130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011131_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011132if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011133 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011134 ipv6type=$i;
11135 ipv6lib=inet6
11136 ipv6libdir=/usr/local/v6/lib
11137 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011138fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011139rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140
11141 ;;
11142 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011144/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011145
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011146#include <features.h>
11147#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11148yes
11149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011150_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011151if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011153 ipv6type=$i;
11154 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011155fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011156rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011157
11158 ;;
11159 linux-inet6)
11160 if test -d /usr/inet6; then
11161 ipv6type=$i
11162 ipv6lib=inet6
11163 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011164 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011165 fi
11166 ;;
11167 solaris)
11168 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011169 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011170 ipv6type=$i
11171 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011172 fi
11173 fi
11174 ;;
11175 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011178
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011179#include <sys/param.h>
11180#ifdef _TOSHIBA_INET6
11181yes
11182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011183_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011185 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011186 ipv6type=$i;
11187 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011188 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011189fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011190rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011191
11192 ;;
11193 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011195/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011196
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011197#include </usr/local/v6/include/sys/v6config.h>
11198#ifdef __V6D__
11199yes
11200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011201_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011204 ipv6type=$i;
11205 ipv6lib=v6;
11206 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011207 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011208fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011209rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011210
11211 ;;
11212 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011214/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011215
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011216#include <sys/param.h>
11217#ifdef _ZETA_MINAMI_INET6
11218yes
11219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011220_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011222 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011223 ipv6type=$i;
11224 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011225 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011226fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011227rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011228
11229 ;;
11230 esac
11231 if test "$ipv6type" != "unknown"; then
11232 break
11233 fi
11234 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11236$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011237fi
11238
11239if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11240 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11241 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11242 echo "using lib$ipv6lib"
11243 else
11244 if test $ipv6trylibc = "yes"; then
11245 echo "using libc"
11246 else
11247 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11248 echo "You need to fetch lib$ipv6lib.a from appropriate"
11249 echo 'ipv6 kit and compile beforehand.'
11250 exit 1
11251 fi
11252 fi
11253fi
11254
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11256$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11258/* end confdefs.h. */
11259 /* CAN_RAW_FD_FRAMES available check */
11260#include <linux/can/raw.h>
11261int
11262main ()
11263{
11264int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11265 ;
11266 return 0;
11267}
11268_ACEOF
11269if ac_fn_c_try_compile "$LINENO"; then :
11270
11271
11272$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11273
11274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11275$as_echo "yes" >&6; }
11276
11277else
11278
11279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11280$as_echo "no" >&6; }
11281
11282fi
11283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11284
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011285# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11287$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011289# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011290if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291 withval=$with_doc_strings;
11292fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011293
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011294
11295if test -z "$with_doc_strings"
11296then with_doc_strings="yes"
11297fi
11298if test "$with_doc_strings" != "no"
11299then
11300
Matthias Kloseb9621712010-04-24 17:59:49 +000011301$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011302
11303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11305$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011306
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011307# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11309$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011311# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011312if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313 withval=$with_pymalloc;
11314fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011315
Neil Schemenauera35c6882001-02-27 04:45:05 +000011316
Neil Schemenauer16c22972002-03-22 15:34:49 +000011317if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011318then
11319 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011320fi
11321if test "$with_pymalloc" != "no"
11322then
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011325
11326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11328$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011329
Nick Coghlan6ea41862017-06-11 13:16:15 +100011330# Check for --with-c-locale-coercion
11331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11332$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11333
11334# Check whether --with-c-locale-coercion was given.
11335if test "${with_c_locale_coercion+set}" = set; then :
11336 withval=$with_c_locale_coercion;
11337fi
11338
11339
11340if test -z "$with_c_locale_coercion"
11341then
11342 with_c_locale_coercion="yes"
11343fi
11344if test "$with_c_locale_coercion" != "no"
11345then
11346
11347$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11348
11349fi
11350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11351$as_echo "$with_c_locale_coercion" >&6; }
11352
Benjamin Peterson05159c42009-12-03 03:01:27 +000011353# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11355$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011356
11357# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011358if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011359 withval=$with_valgrind;
11360else
11361 with_valgrind=no
11362fi
11363
Matthias Kloseb9621712010-04-24 17:59:49 +000011364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11365$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011366if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 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 +020011368if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011369
Matthias Kloseb9621712010-04-24 17:59:49 +000011370$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011371
11372else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011373 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011374
11375fi
11376
11377
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011378 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011379fi
11380
Łukasz Langaa785c872016-09-09 17:37:37 -070011381# Check for DTrace support
11382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11383$as_echo_n "checking for --with-dtrace... " >&6; }
11384
11385# Check whether --with-dtrace was given.
11386if test "${with_dtrace+set}" = set; then :
11387 withval=$with_dtrace;
11388else
11389 with_dtrace=no
11390fi
11391
11392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11393$as_echo "$with_dtrace" >&6; }
11394
11395
11396
11397
11398
11399DTRACE=
11400DFLAGS=
11401DTRACE_HEADERS=
11402DTRACE_OBJS=
11403
11404if test "$with_dtrace" = "yes"
11405then
11406 # Extract the first word of "dtrace", so it can be a program name with args.
11407set dummy dtrace; ac_word=$2
11408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11409$as_echo_n "checking for $ac_word... " >&6; }
11410if ${ac_cv_path_DTRACE+:} false; then :
11411 $as_echo_n "(cached) " >&6
11412else
11413 case $DTRACE in
11414 [\\/]* | ?:[\\/]*)
11415 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11416 ;;
11417 *)
11418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11419for as_dir in $PATH
11420do
11421 IFS=$as_save_IFS
11422 test -z "$as_dir" && as_dir=.
11423 for ac_exec_ext in '' $ac_executable_extensions; do
11424 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11425 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11426 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11427 break 2
11428 fi
11429done
11430 done
11431IFS=$as_save_IFS
11432
11433 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11434 ;;
11435esac
11436fi
11437DTRACE=$ac_cv_path_DTRACE
11438if test -n "$DTRACE"; then
11439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11440$as_echo "$DTRACE" >&6; }
11441else
11442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11443$as_echo "no" >&6; }
11444fi
11445
11446
11447 if test "$DTRACE" = "not found"; then
11448 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11449 fi
11450
11451$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11452
11453 DTRACE_HEADERS="Include/pydtrace_probes.h"
11454
11455 # On OS X, DTrace providers do not need to be explicitly compiled and
11456 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11457 # generation flag '-G'. We check for presence of this flag, rather than
11458 # hardcoding support by OS, in the interest of robustness.
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11460$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11461if ${ac_cv_dtrace_link+:} false; then :
11462 $as_echo_n "(cached) " >&6
11463else
11464 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011465 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011466 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11467 ac_cv_dtrace_link=yes
11468
11469fi
11470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11471$as_echo "$ac_cv_dtrace_link" >&6; }
11472 if test "$ac_cv_dtrace_link" = "yes"; then
11473 DTRACE_OBJS="Python/pydtrace.o"
11474 fi
11475fi
11476
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011477# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011478
Guido van Rossum98935bf2001-09-05 19:13:16 +000011479DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011480
Guido van Rossume97ee181999-12-20 21:27:22 +000011481# the dlopen() function means we might want to use dynload_shlib.o. some
11482# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011483for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011484do :
11485 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011486if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011488#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011489_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011490
Guido van Rossume97ee181999-12-20 21:27:22 +000011491fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011492done
Guido van Rossume97ee181999-12-20 21:27:22 +000011493
Michael W. Hudson54241132001-12-07 15:38:26 +000011494
Guido van Rossume97ee181999-12-20 21:27:22 +000011495# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11496# loading of modules.
11497
Matthias Kloseb9621712010-04-24 17:59:49 +000011498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11499$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011500if test -z "$DYNLOADFILE"
11501then
11502 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011503 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11504 if test "$ac_cv_func_dlopen" = yes
11505 then DYNLOADFILE="dynload_shlib.o"
11506 else DYNLOADFILE="dynload_aix.o"
11507 fi
11508 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011509 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011510 *)
11511 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11512 # out any dynamic loading
11513 if test "$ac_cv_func_dlopen" = yes
11514 then DYNLOADFILE="dynload_shlib.o"
11515 else DYNLOADFILE="dynload_stub.o"
11516 fi
11517 ;;
11518 esac
11519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11521$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011522if test "$DYNLOADFILE" != "dynload_stub.o"
11523then
Martin v. Löwis11437992002-04-12 09:54:03 +000011524
Matthias Kloseb9621712010-04-24 17:59:49 +000011525$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011526
11527fi
11528
Neil Schemenauer4e425612001-06-19 15:44:15 +000011529# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11530
Michael W. Hudson54241132001-12-07 15:38:26 +000011531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11533$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011534if test -z "$MACHDEP_OBJS"
11535then
Jack Jansene578a632001-08-15 01:27:14 +000011536 MACHDEP_OBJS=$extra_machdep_objs
11537else
11538 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011539fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011540if test -z "$MACHDEP_OBJS"; then
11541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11542$as_echo "none" >&6; }
11543else
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11545$as_echo "$MACHDEP_OBJS" >&6; }
11546fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011547
Guido van Rossum627b2d71993-12-24 10:39:16 +000011548# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011549for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011550 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11551 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011552 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011553 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011554 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011555 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011556 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011557 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011558 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011559 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011560 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011561 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011562 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11563 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011564 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011565 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011566 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011567 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11568 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011569 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011570 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011571 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011572 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011573 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011574do :
11575 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11576ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011577if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011579#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011580_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011581
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011582fi
11583done
11584
Michael W. Hudson54241132001-12-07 15:38:26 +000011585
Benjamin Peterson40caa052018-09-12 15:52:40 -070011586# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11587# links. Some libc implementations have a stub lchmod implementation that always
11588# returns an error.
11589if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011590 for ac_func in lchmod
11591do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011592 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11593if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011594 cat >>confdefs.h <<_ACEOF
11595#define HAVE_LCHMOD 1
11596_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011597
11598fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011599done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011600
11601fi
11602
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011603ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11604 #include <dirent.h>
11605"
11606if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11607
11608$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11609
11610fi
11611
11612
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011613# For some functions, having a definition is not sufficient, since
11614# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11616$as_echo_n "checking for chroot... " >&6; }
11617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011618/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011619#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011620int
11621main ()
11622{
11623void *x=chroot
11624 ;
11625 return 0;
11626}
11627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011629
Matthias Kloseb9621712010-04-24 17:59:49 +000011630$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011631
Matthias Kloseb159a552010-04-25 21:00:44 +000011632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011633$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011634else
Matthias Kloseb9621712010-04-24 17:59:49 +000011635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11636$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011637
11638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11641$as_echo_n "checking for link... " >&6; }
11642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011643/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011644#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011645int
11646main ()
11647{
11648void *x=link
11649 ;
11650 return 0;
11651}
11652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011654
Matthias Kloseb9621712010-04-24 17:59:49 +000011655$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011656
Matthias Kloseb159a552010-04-25 21:00:44 +000011657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011658$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011659else
Matthias Kloseb9621712010-04-24 17:59:49 +000011660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11661$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011662
11663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11666$as_echo_n "checking for symlink... " >&6; }
11667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011668/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011669#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011670int
11671main ()
11672{
11673void *x=symlink
11674 ;
11675 return 0;
11676}
11677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011679
Matthias Kloseb9621712010-04-24 17:59:49 +000011680$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011681
Matthias Kloseb159a552010-04-25 21:00:44 +000011682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011683$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011684else
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11686$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011687
11688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11691$as_echo_n "checking for fchdir... " >&6; }
11692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011693/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011694#include <unistd.h>
11695int
11696main ()
11697{
11698void *x=fchdir
11699 ;
11700 return 0;
11701}
11702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011704
Matthias Kloseb9621712010-04-24 17:59:49 +000011705$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011706
Matthias Kloseb159a552010-04-25 21:00:44 +000011707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011708$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011709else
Matthias Kloseb9621712010-04-24 17:59:49 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011712
11713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11716$as_echo_n "checking for fsync... " >&6; }
11717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011718/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011719#include <unistd.h>
11720int
11721main ()
11722{
11723void *x=fsync
11724 ;
11725 return 0;
11726}
11727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011728if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011729
Matthias Kloseb9621712010-04-24 17:59:49 +000011730$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011731
Matthias Kloseb159a552010-04-25 21:00:44 +000011732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011733$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011734else
Matthias Kloseb9621712010-04-24 17:59:49 +000011735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11736$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011737
11738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11741$as_echo_n "checking for fdatasync... " >&6; }
11742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011743/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011744#include <unistd.h>
11745int
11746main ()
11747{
11748void *x=fdatasync
11749 ;
11750 return 0;
11751}
11752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011753if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011754
Matthias Kloseb9621712010-04-24 17:59:49 +000011755$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011756
Matthias Kloseb159a552010-04-25 21:00:44 +000011757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011758$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011759else
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11761$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011762
11763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11766$as_echo_n "checking for epoll... " >&6; }
11767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011768/* end confdefs.h. */
11769#include <sys/epoll.h>
11770int
11771main ()
11772{
11773void *x=epoll_create
11774 ;
11775 return 0;
11776}
11777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011778if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011779
Matthias Kloseb9621712010-04-24 17:59:49 +000011780$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011781
Matthias Kloseb159a552010-04-25 21:00:44 +000011782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011783$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011784else
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11786$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011787
11788fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11791$as_echo_n "checking for epoll_create1... " >&6; }
11792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11793/* end confdefs.h. */
11794#include <sys/epoll.h>
11795int
11796main ()
11797{
11798void *x=epoll_create1
11799 ;
11800 return 0;
11801}
11802_ACEOF
11803if ac_fn_c_try_compile "$LINENO"; then :
11804
11805$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11806
11807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11808$as_echo "yes" >&6; }
11809else
11810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11811$as_echo "no" >&6; }
11812
11813fi
11814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11816$as_echo_n "checking for kqueue... " >&6; }
11817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011818/* end confdefs.h. */
11819
11820#include <sys/types.h>
11821#include <sys/event.h>
11822
11823int
11824main ()
11825{
11826int x=kqueue()
11827 ;
11828 return 0;
11829}
11830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011831if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011834
Matthias Kloseb159a552010-04-25 21:00:44 +000011835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011836$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11839$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011840
11841fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11844$as_echo_n "checking for prlimit... " >&6; }
11845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11846/* end confdefs.h. */
11847
11848#include <sys/time.h>
11849#include <sys/resource.h>
11850
11851int
11852main ()
11853{
11854void *x=prlimit
11855 ;
11856 return 0;
11857}
11858_ACEOF
11859if ac_fn_c_try_compile "$LINENO"; then :
11860
11861$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11862
11863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11864$as_echo "yes" >&6; }
11865else
11866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11867$as_echo "no" >&6; }
11868
11869fi
11870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11871
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11873$as_echo_n "checking for memfd_create... " >&6; }
11874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11875/* end confdefs.h. */
11876
11877#ifdef HAVE_SYS_MMAN_H
11878#include <sys/mman.h>
11879#endif
11880#ifdef HAVE_SYS_MEMFD_H
11881#include <sys/memfd.h>
11882#endif
11883
11884int
11885main ()
11886{
11887void *x=memfd_create
11888 ;
11889 return 0;
11890}
11891_ACEOF
11892if ac_fn_c_try_compile "$LINENO"; then :
11893
11894$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11895
11896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11897$as_echo "yes" >&6; }
11898else
11899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11900$as_echo "no" >&6; }
11901
11902fi
11903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11904
Martin v. Löwisd5843682002-11-21 20:41:28 +000011905# On some systems (eg. FreeBSD 5), we would find a definition of the
11906# functions ctermid_r, setgroups in the library, but no prototype
11907# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11908# address to avoid compiler warnings and potential miscompilations
11909# because of the missing prototypes.
11910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11912$as_echo_n "checking for ctermid_r... " >&6; }
11913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011914/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011915
Martin v. Löwisd5843682002-11-21 20:41:28 +000011916#include <stdio.h>
11917
Martin v. Löwisd5843682002-11-21 20:41:28 +000011918int
11919main ()
11920{
11921void* p = ctermid_r
11922 ;
11923 return 0;
11924}
11925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011926if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011927
Matthias Kloseb9621712010-04-24 17:59:49 +000011928$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011929
Matthias Kloseb159a552010-04-25 21:00:44 +000011930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011931$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011932else
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11934$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011935
11936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11938
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11940$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011941if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011942 $as_echo_n "(cached) " >&6
11943else
11944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011945/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011946#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011947int
11948main ()
11949{
11950void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011951
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011952 ;
11953 return 0;
11954}
11955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011956if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011957 ac_cv_flock_decl=yes
11958else
11959 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011960
11961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011963
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011964fi
11965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11966$as_echo "$ac_cv_flock_decl" >&6; }
11967if test "x${ac_cv_flock_decl}" = xyes; then
11968 for ac_func in flock
11969do :
11970 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011971if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011972 cat >>confdefs.h <<_ACEOF
11973#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011974_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011975
Antoine Pitroua3000072010-09-07 14:52:42 +000011976else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011978$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011979if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011980 $as_echo_n "(cached) " >&6
11981else
11982 ac_check_lib_save_LIBS=$LIBS
11983LIBS="-lbsd $LIBS"
11984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11985/* end confdefs.h. */
11986
11987/* Override any GCC internal prototype to avoid an error.
11988 Use char because int might match the return type of a GCC
11989 builtin and then its argument prototype would still apply. */
11990#ifdef __cplusplus
11991extern "C"
11992#endif
11993char flock ();
11994int
11995main ()
11996{
11997return flock ();
11998 ;
11999 return 0;
12000}
12001_ACEOF
12002if ac_fn_c_try_link "$LINENO"; then :
12003 ac_cv_lib_bsd_flock=yes
12004else
12005 ac_cv_lib_bsd_flock=no
12006fi
12007rm -f core conftest.err conftest.$ac_objext \
12008 conftest$ac_exeext conftest.$ac_ext
12009LIBS=$ac_check_lib_save_LIBS
12010fi
12011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12012$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012013if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012014 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012015
12016
12017$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12018
12019
12020fi
12021
12022
12023fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012024done
12025
Antoine Pitroua3000072010-09-07 14:52:42 +000012026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012027
Matthias Kloseb9621712010-04-24 17:59:49 +000012028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12029$as_echo_n "checking for getpagesize... " >&6; }
12030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012031/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012032
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012033#include <unistd.h>
12034
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012035int
12036main ()
12037{
12038void* p = getpagesize
12039 ;
12040 return 0;
12041}
12042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012043if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012044
Matthias Kloseb9621712010-04-24 17:59:49 +000012045$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012046
Matthias Kloseb159a552010-04-25 21:00:44 +000012047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012048$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012049else
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12051$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012052
12053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012055
Victor Stinner984890f2011-11-24 13:53:38 +010012056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12057$as_echo_n "checking for broken unsetenv... " >&6; }
12058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12059/* end confdefs.h. */
12060
12061#include <stdlib.h>
12062
12063int
12064main ()
12065{
12066int res = unsetenv("DUMMY")
12067 ;
12068 return 0;
12069}
12070_ACEOF
12071if ac_fn_c_try_compile "$LINENO"; then :
12072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12073$as_echo "no" >&6; }
12074else
12075
12076$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12077
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12079$as_echo "yes" >&6; }
12080
12081fi
12082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12083
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012084for ac_prog in true
12085do
12086 # Extract the first word of "$ac_prog", so it can be a program name with args.
12087set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12089$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012090if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012092else
12093 if test -n "$TRUE"; then
12094 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12095else
12096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12097for as_dir in $PATH
12098do
12099 IFS=$as_save_IFS
12100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012103 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 $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 +000012105 break 2
12106 fi
12107done
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012110
12111fi
12112fi
12113TRUE=$ac_cv_prog_TRUE
12114if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12116$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12119$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012120fi
12121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012122
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012123 test -n "$TRUE" && break
12124done
12125test -n "$TRUE" || TRUE="/bin/true"
12126
12127
Matthias Kloseb9621712010-04-24 17:59:49 +000012128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12129$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012130if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012132else
12133 ac_check_lib_save_LIBS=$LIBS
12134LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012136/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012138/* Override any GCC internal prototype to avoid an error.
12139 Use char because int might match the return type of a GCC
12140 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012141#ifdef __cplusplus
12142extern "C"
12143#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012144char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012145int
12146main ()
12147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012148return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012149 ;
12150 return 0;
12151}
12152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012153if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012154 ac_cv_lib_c_inet_aton=yes
12155else
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012158rm -f core conftest.err conftest.$ac_objext \
12159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012160LIBS=$ac_check_lib_save_LIBS
12161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12163$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012164if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012165 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012166else
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12168$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012169if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012171else
12172 ac_check_lib_save_LIBS=$LIBS
12173LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012175/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012177/* Override any GCC internal prototype to avoid an error.
12178 Use char because int might match the return type of a GCC
12179 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012180#ifdef __cplusplus
12181extern "C"
12182#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012183char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012184int
12185main ()
12186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012188 ;
12189 return 0;
12190}
12191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012192if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012193 ac_cv_lib_resolv_inet_aton=yes
12194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012197rm -f core conftest.err conftest.$ac_objext \
12198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012199LIBS=$ac_check_lib_save_LIBS
12200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12202$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012203if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012204 cat >>confdefs.h <<_ACEOF
12205#define HAVE_LIBRESOLV 1
12206_ACEOF
12207
12208 LIBS="-lresolv $LIBS"
12209
12210fi
12211
12212
12213fi
12214
12215
Christian Heimesd0764e22007-12-04 15:00:33 +000012216# On Tru64, chflags seems to be present, but calling it will
12217# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12219$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012220if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012221 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012222else
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012224 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012225else
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012227/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012228
Christian Heimesd0764e22007-12-04 15:00:33 +000012229#include <sys/stat.h>
12230#include <unistd.h>
12231int main(int argc, char*argv[])
12232{
12233 if(chflags(argv[0], 0) != 0)
12234 return 1;
12235 return 0;
12236}
Ned Deily3eb67d52011-06-28 00:00:28 -070012237
Christian Heimesd0764e22007-12-04 15:00:33 +000012238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012239if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012240 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012241else
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12245 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012246fi
12247
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012248
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12251$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012252if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012254if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012255 ac_cv_have_chflags="yes"
12256else
12257 ac_cv_have_chflags="no"
12258fi
12259
12260fi
12261if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012262
Matthias Kloseb9621712010-04-24 17:59:49 +000012263$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012264
12265fi
12266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12268$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012269if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012271else
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012273 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012274else
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012276/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012277
Christian Heimesd0764e22007-12-04 15:00:33 +000012278#include <sys/stat.h>
12279#include <unistd.h>
12280int main(int argc, char*argv[])
12281{
12282 if(lchflags(argv[0], 0) != 0)
12283 return 1;
12284 return 0;
12285}
Ned Deily3eb67d52011-06-28 00:00:28 -070012286
Christian Heimesd0764e22007-12-04 15:00:33 +000012287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012288if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012289 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012290else
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012295fi
12296
12297
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12300$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012301if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012303if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012304 ac_cv_have_lchflags="yes"
12305else
12306 ac_cv_have_lchflags="no"
12307fi
12308
12309fi
12310if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012311
Matthias Kloseb9621712010-04-24 17:59:49 +000012312$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012313
12314fi
12315
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012316case $ac_sys_system/$ac_sys_release in
12317Darwin/*)
12318 _CUR_CFLAGS="${CFLAGS}"
12319 _CUR_LDFLAGS="${LDFLAGS}"
12320 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12321 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12322 ;;
12323esac
12324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12326$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012327if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012328 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012329else
12330 ac_check_lib_save_LIBS=$LIBS
12331LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012333/* end confdefs.h. */
12334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335/* Override any GCC internal prototype to avoid an error.
12336 Use char because int might match the return type of a GCC
12337 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012338#ifdef __cplusplus
12339extern "C"
12340#endif
12341char inflateCopy ();
12342int
12343main ()
12344{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012345return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012346 ;
12347 return 0;
12348}
12349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012350if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012351 ac_cv_lib_z_inflateCopy=yes
12352else
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012355rm -f core conftest.err conftest.$ac_objext \
12356 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012357LIBS=$ac_check_lib_save_LIBS
12358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12360$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012361if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012362
Matthias Kloseb9621712010-04-24 17:59:49 +000012363$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012364
12365fi
12366
12367
12368case $ac_sys_system/$ac_sys_release in
12369Darwin/*)
12370 CFLAGS="${_CUR_CFLAGS}"
12371 LDFLAGS="${_CUR_LDFLAGS}"
12372 ;;
12373esac
12374
Matthias Kloseb9621712010-04-24 17:59:49 +000012375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12376$as_echo_n "checking for hstrerror... " >&6; }
12377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012379
Martin v. Löwise9416172003-05-03 10:12:45 +000012380#include <netdb.h>
12381
Martin v. Löwise9416172003-05-03 10:12:45 +000012382int
12383main ()
12384{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012385void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012386 ;
12387 return 0;
12388}
12389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012390if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012391
Matthias Kloseb9621712010-04-24 17:59:49 +000012392$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012393
Matthias Kloseb159a552010-04-25 21:00:44 +000012394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012395$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012396else
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12398$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012399
12400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012401rm -f core conftest.err conftest.$ac_objext \
12402 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403
Matthias Kloseb9621712010-04-24 17:59:49 +000012404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12405$as_echo_n "checking for inet_aton... " >&6; }
12406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012407/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012408
Martin v. Löwis86d66262006-02-17 08:40:11 +000012409#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012410#include <sys/socket.h>
12411#include <netinet/in.h>
12412#include <arpa/inet.h>
12413
Martin v. Löwise9416172003-05-03 10:12:45 +000012414int
12415main ()
12416{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012417void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012418 ;
12419 return 0;
12420}
12421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012423
Matthias Kloseb9621712010-04-24 17:59:49 +000012424$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012425
Matthias Kloseb159a552010-04-25 21:00:44 +000012426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012427$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012428else
Matthias Kloseb9621712010-04-24 17:59:49 +000012429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12430$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012431
12432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012433rm -f core conftest.err conftest.$ac_objext \
12434 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12437$as_echo_n "checking for inet_pton... " >&6; }
12438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012439/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012440
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012441#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012442#include <sys/socket.h>
12443#include <netinet/in.h>
12444#include <arpa/inet.h>
12445
Martin v. Löwise9416172003-05-03 10:12:45 +000012446int
12447main ()
12448{
12449void* p = inet_pton
12450 ;
12451 return 0;
12452}
12453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012455
Matthias Kloseb9621712010-04-24 17:59:49 +000012456$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012457
Matthias Kloseb159a552010-04-25 21:00:44 +000012458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012459$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012460else
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12462$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012463
12464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012466
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012467# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12469$as_echo_n "checking for setgroups... " >&6; }
12470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012471/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012472
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012473#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012474#ifdef HAVE_GRP_H
12475#include <grp.h>
12476#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012477
Martin v. Löwisd5843682002-11-21 20:41:28 +000012478int
12479main ()
12480{
12481void* p = setgroups
12482 ;
12483 return 0;
12484}
12485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012486if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012489
Matthias Kloseb159a552010-04-25 21:00:44 +000012490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012491$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012492else
Matthias Kloseb9621712010-04-24 17:59:49 +000012493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12494$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012495
12496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012498
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012499# check for openpty and forkpty
12500
12501for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012502do :
12503 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012504if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012506#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012507_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012508
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012509else
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12511$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012512if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012513 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012514else
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012516LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520/* Override any GCC internal prototype to avoid an error.
12521 Use char because int might match the return type of a GCC
12522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012523#ifdef __cplusplus
12524extern "C"
12525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012526char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012527int
12528main ()
12529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012531 ;
12532 return 0;
12533}
12534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012535if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012536 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012537else
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012540rm -f core conftest.err conftest.$ac_objext \
12541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012542LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12545$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012546if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012547 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012548 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012549else
Matthias Kloseb9621712010-04-24 17:59:49 +000012550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12551$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012552if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012554else
12555 ac_check_lib_save_LIBS=$LIBS
12556LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012558/* end confdefs.h. */
12559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012560/* Override any GCC internal prototype to avoid an error.
12561 Use char because int might match the return type of a GCC
12562 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012563#ifdef __cplusplus
12564extern "C"
12565#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012566char openpty ();
12567int
12568main ()
12569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012570return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012571 ;
12572 return 0;
12573}
12574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012575if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012576 ac_cv_lib_bsd_openpty=yes
12577else
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012580rm -f core conftest.err conftest.$ac_objext \
12581 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012582LIBS=$ac_check_lib_save_LIBS
12583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12585$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012586if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012588 LIBS="$LIBS -lbsd"
12589fi
12590
12591
12592fi
12593
Fred Drake8cef4cf2000-06-28 16:40:38 +000012594
12595fi
12596done
12597
12598for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012599do :
12600 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012601if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012602 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012603#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012604_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012605
Fred Drake8cef4cf2000-06-28 16:40:38 +000012606else
Matthias Kloseb9621712010-04-24 17:59:49 +000012607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12608$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012609if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012610 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012611else
Martin v. Löwis11437992002-04-12 09:54:03 +000012612 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012613LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012617/* Override any GCC internal prototype to avoid an error.
12618 Use char because int might match the return type of a GCC
12619 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012620#ifdef __cplusplus
12621extern "C"
12622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012623char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012624int
12625main ()
12626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012627return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 ;
12629 return 0;
12630}
12631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012632if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012633 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012634else
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012637rm -f core conftest.err conftest.$ac_objext \
12638 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012639LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12642$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012643if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012645 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012646else
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12648$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012649if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012650 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012651else
12652 ac_check_lib_save_LIBS=$LIBS
12653LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012655/* end confdefs.h. */
12656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657/* Override any GCC internal prototype to avoid an error.
12658 Use char because int might match the return type of a GCC
12659 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012660#ifdef __cplusplus
12661extern "C"
12662#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012663char forkpty ();
12664int
12665main ()
12666{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012667return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012668 ;
12669 return 0;
12670}
12671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012673 ac_cv_lib_bsd_forkpty=yes
12674else
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012677rm -f core conftest.err conftest.$ac_objext \
12678 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012679LIBS=$ac_check_lib_save_LIBS
12680fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12682$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012683if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012685 LIBS="$LIBS -lbsd"
12686fi
12687
12688
12689fi
12690
Fred Drake8cef4cf2000-06-28 16:40:38 +000012691
12692fi
12693done
12694
Jack Jansendd19cf82001-12-06 22:36:17 +000012695
Michael W. Hudson54241132001-12-07 15:38:26 +000012696# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012697for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012698do :
12699 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12700ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012701if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012703#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012704_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012705
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012706fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012707done
12708
Michael W. Hudson54241132001-12-07 15:38:26 +000012709
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012710ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012711if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012712 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012713
Martin v. Löwis1142de32002-03-29 16:28:31 +000012714else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012716 *" dup2.$ac_objext "* ) ;;
12717 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012719esac
12720
Martin v. Löwis1142de32002-03-29 16:28:31 +000012721fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012722
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012723ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012724if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012725 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12726
12727else
12728 case " $LIBOBJS " in
12729 *" strdup.$ac_objext "* ) ;;
12730 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12731 ;;
12732esac
12733
12734fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012735
12736
12737for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012738do :
12739 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012740if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012742#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012745/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012746#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012747int
12748main ()
12749{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012750getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 ;
12752 return 0;
12753}
12754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012755if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Matthias Kloseb9621712010-04-24 17:59:49 +000012757$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012758
Guido van Rossum627b2d71993-12-24 10:39:16 +000012759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012761
Guido van Rossum627b2d71993-12-24 10:39:16 +000012762fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012763done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012764
Jack Jansen150753c2003-03-29 22:07:47 +000012765for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012766do :
12767 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012768if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012769 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012770#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012773/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012774#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012775int
12776main ()
12777{
12778setpgrp(0,0);
12779 ;
12780 return 0;
12781}
12782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012783if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012784
Matthias Kloseb9621712010-04-24 17:59:49 +000012785$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012786
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012789
12790fi
12791done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012792
Michael W. Hudson54241132001-12-07 15:38:26 +000012793
Gregory P. Smith387512c2018-12-30 15:42:32 -080012794# We search for both crypt and crypt_r as one or the other may be defined
12795# This gets us our -lcrypt in LIBS when required on the target platform.
12796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12797$as_echo_n "checking for library containing crypt... " >&6; }
12798if ${ac_cv_search_crypt+:} false; then :
12799 $as_echo_n "(cached) " >&6
12800else
12801 ac_func_search_save_LIBS=$LIBS
12802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12803/* end confdefs.h. */
12804
12805/* Override any GCC internal prototype to avoid an error.
12806 Use char because int might match the return type of a GCC
12807 builtin and then its argument prototype would still apply. */
12808#ifdef __cplusplus
12809extern "C"
12810#endif
12811char crypt ();
12812int
12813main ()
12814{
12815return crypt ();
12816 ;
12817 return 0;
12818}
12819_ACEOF
12820for ac_lib in '' crypt; do
12821 if test -z "$ac_lib"; then
12822 ac_res="none required"
12823 else
12824 ac_res=-l$ac_lib
12825 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12826 fi
12827 if ac_fn_c_try_link "$LINENO"; then :
12828 ac_cv_search_crypt=$ac_res
12829fi
12830rm -f core conftest.err conftest.$ac_objext \
12831 conftest$ac_exeext
12832 if ${ac_cv_search_crypt+:} false; then :
12833 break
12834fi
12835done
12836if ${ac_cv_search_crypt+:} false; then :
12837
12838else
12839 ac_cv_search_crypt=no
12840fi
12841rm conftest.$ac_ext
12842LIBS=$ac_func_search_save_LIBS
12843fi
12844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12845$as_echo "$ac_cv_search_crypt" >&6; }
12846ac_res=$ac_cv_search_crypt
12847if test "$ac_res" != no; then :
12848 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12849
12850fi
12851
12852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12853$as_echo_n "checking for library containing crypt_r... " >&6; }
12854if ${ac_cv_search_crypt_r+:} false; then :
12855 $as_echo_n "(cached) " >&6
12856else
12857 ac_func_search_save_LIBS=$LIBS
12858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12859/* end confdefs.h. */
12860
12861/* Override any GCC internal prototype to avoid an error.
12862 Use char because int might match the return type of a GCC
12863 builtin and then its argument prototype would still apply. */
12864#ifdef __cplusplus
12865extern "C"
12866#endif
12867char crypt_r ();
12868int
12869main ()
12870{
12871return crypt_r ();
12872 ;
12873 return 0;
12874}
12875_ACEOF
12876for ac_lib in '' crypt; do
12877 if test -z "$ac_lib"; then
12878 ac_res="none required"
12879 else
12880 ac_res=-l$ac_lib
12881 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12882 fi
12883 if ac_fn_c_try_link "$LINENO"; then :
12884 ac_cv_search_crypt_r=$ac_res
12885fi
12886rm -f core conftest.err conftest.$ac_objext \
12887 conftest$ac_exeext
12888 if ${ac_cv_search_crypt_r+:} false; then :
12889 break
12890fi
12891done
12892if ${ac_cv_search_crypt_r+:} false; then :
12893
12894else
12895 ac_cv_search_crypt_r=no
12896fi
12897rm conftest.$ac_ext
12898LIBS=$ac_func_search_save_LIBS
12899fi
12900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12901$as_echo "$ac_cv_search_crypt_r" >&6; }
12902ac_res=$ac_cv_search_crypt_r
12903if test "$ac_res" != no; then :
12904 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12905
12906fi
12907
12908
12909ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12910if test "x$ac_cv_func_crypt_r" = xyes; then :
12911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12912/* end confdefs.h. */
12913
12914#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12915#include <crypt.h>
12916
12917int
12918main ()
12919{
12920
12921struct crypt_data d;
12922char *r = crypt_r("", "", &d);
12923
12924 ;
12925 return 0;
12926}
12927_ACEOF
12928if ac_fn_c_try_compile "$LINENO"; then :
12929
12930$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12931
12932fi
12933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12934
12935fi
12936
12937
Victor Stinnere0be4232011-10-25 13:06:09 +020012938for ac_func in clock_gettime
12939do :
12940 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12941if test "x$ac_cv_func_clock_gettime" = xyes; then :
12942 cat >>confdefs.h <<_ACEOF
12943#define HAVE_CLOCK_GETTIME 1
12944_ACEOF
12945
12946else
12947
12948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12949$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12950if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12951 $as_echo_n "(cached) " >&6
12952else
12953 ac_check_lib_save_LIBS=$LIBS
12954LIBS="-lrt $LIBS"
12955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12956/* end confdefs.h. */
12957
12958/* Override any GCC internal prototype to avoid an error.
12959 Use char because int might match the return type of a GCC
12960 builtin and then its argument prototype would still apply. */
12961#ifdef __cplusplus
12962extern "C"
12963#endif
12964char clock_gettime ();
12965int
12966main ()
12967{
12968return clock_gettime ();
12969 ;
12970 return 0;
12971}
12972_ACEOF
12973if ac_fn_c_try_link "$LINENO"; then :
12974 ac_cv_lib_rt_clock_gettime=yes
12975else
12976 ac_cv_lib_rt_clock_gettime=no
12977fi
12978rm -f core conftest.err conftest.$ac_objext \
12979 conftest$ac_exeext conftest.$ac_ext
12980LIBS=$ac_check_lib_save_LIBS
12981fi
12982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12983$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12984if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12985
Victor Stinner7efb8332014-08-29 15:41:08 +020012986 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012987 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12988
12989
12990$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12991
12992
12993fi
12994
12995
12996fi
12997done
12998
12999
13000for ac_func in clock_getres
13001do :
13002 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13003if test "x$ac_cv_func_clock_getres" = xyes; then :
13004 cat >>confdefs.h <<_ACEOF
13005#define HAVE_CLOCK_GETRES 1
13006_ACEOF
13007
13008else
13009
13010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13011$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13012if ${ac_cv_lib_rt_clock_getres+:} false; then :
13013 $as_echo_n "(cached) " >&6
13014else
13015 ac_check_lib_save_LIBS=$LIBS
13016LIBS="-lrt $LIBS"
13017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13018/* end confdefs.h. */
13019
13020/* Override any GCC internal prototype to avoid an error.
13021 Use char because int might match the return type of a GCC
13022 builtin and then its argument prototype would still apply. */
13023#ifdef __cplusplus
13024extern "C"
13025#endif
13026char clock_getres ();
13027int
13028main ()
13029{
13030return clock_getres ();
13031 ;
13032 return 0;
13033}
13034_ACEOF
13035if ac_fn_c_try_link "$LINENO"; then :
13036 ac_cv_lib_rt_clock_getres=yes
13037else
13038 ac_cv_lib_rt_clock_getres=no
13039fi
13040rm -f core conftest.err conftest.$ac_objext \
13041 conftest$ac_exeext conftest.$ac_ext
13042LIBS=$ac_check_lib_save_LIBS
13043fi
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13045$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13046if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13047
13048 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13049
13050
13051fi
13052
13053
13054fi
13055done
13056
13057
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013058for ac_func in clock_settime
13059do :
13060 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13061if test "x$ac_cv_func_clock_settime" = xyes; then :
13062 cat >>confdefs.h <<_ACEOF
13063#define HAVE_CLOCK_SETTIME 1
13064_ACEOF
13065
13066else
13067
13068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13069$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13070if ${ac_cv_lib_rt_clock_settime+:} false; then :
13071 $as_echo_n "(cached) " >&6
13072else
13073 ac_check_lib_save_LIBS=$LIBS
13074LIBS="-lrt $LIBS"
13075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13076/* end confdefs.h. */
13077
13078/* Override any GCC internal prototype to avoid an error.
13079 Use char because int might match the return type of a GCC
13080 builtin and then its argument prototype would still apply. */
13081#ifdef __cplusplus
13082extern "C"
13083#endif
13084char clock_settime ();
13085int
13086main ()
13087{
13088return clock_settime ();
13089 ;
13090 return 0;
13091}
13092_ACEOF
13093if ac_fn_c_try_link "$LINENO"; then :
13094 ac_cv_lib_rt_clock_settime=yes
13095else
13096 ac_cv_lib_rt_clock_settime=no
13097fi
13098rm -f core conftest.err conftest.$ac_objext \
13099 conftest$ac_exeext conftest.$ac_ext
13100LIBS=$ac_check_lib_save_LIBS
13101fi
13102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13103$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13104if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13105
13106 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13107
13108
13109fi
13110
13111
13112fi
13113done
13114
13115
Matthias Kloseb9621712010-04-24 17:59:49 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13117$as_echo_n "checking for major... " >&6; }
13118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013119/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013120
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013121#if defined(MAJOR_IN_MKDEV)
13122#include <sys/mkdev.h>
13123#elif defined(MAJOR_IN_SYSMACROS)
13124#include <sys/sysmacros.h>
13125#else
13126#include <sys/types.h>
13127#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013128
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013129int
13130main ()
13131{
13132
13133 makedev(major(0),minor(0));
13134
13135 ;
13136 return 0;
13137}
13138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013139if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013140
13141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13145$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013146
13147else
Skip Montanaro6dead952003-09-25 14:50:04 +000013148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13150$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013151
13152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013153rm -f core conftest.err conftest.$ac_objext \
13154 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013155
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013156# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013157# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13159$as_echo_n "checking for getaddrinfo... " >&6; }
13160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013161/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013162
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013163#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013164#include <sys/socket.h>
13165#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013166#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013167
Martin v. Löwis11437992002-04-12 09:54:03 +000013168int
13169main ()
13170{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013171getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 ;
13173 return 0;
13174}
13175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013176if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013177 have_getaddrinfo=yes
13178else
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013181rm -f core conftest.err conftest.$ac_objext \
13182 conftest$ac_exeext conftest.$ac_ext
13183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13184$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013185if test $have_getaddrinfo = yes
13186then
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13188$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013189 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013191else
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013193
13194if test "${enable_ipv6+set}" = set; then
13195 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13196else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013197 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013198fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013199else
Matthias Kloseb9621712010-04-24 17:59:49 +000013200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013201/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013202
Stefan Krah19c21392012-11-22 23:47:32 +010013203#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013204#include <sys/types.h>
13205#include <netdb.h>
13206#include <string.h>
13207#include <sys/socket.h>
13208#include <netinet/in.h>
13209
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013210int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211{
13212 int passive, gaierr, inet4 = 0, inet6 = 0;
13213 struct addrinfo hints, *ai, *aitop;
13214 char straddr[INET6_ADDRSTRLEN], strport[16];
13215
13216 for (passive = 0; passive <= 1; passive++) {
13217 memset(&hints, 0, sizeof(hints));
13218 hints.ai_family = AF_UNSPEC;
13219 hints.ai_flags = passive ? AI_PASSIVE : 0;
13220 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013221 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013222 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13223 (void)gai_strerror(gaierr);
13224 goto bad;
13225 }
13226 for (ai = aitop; ai; ai = ai->ai_next) {
13227 if (ai->ai_addr == NULL ||
13228 ai->ai_addrlen == 0 ||
13229 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13230 straddr, sizeof(straddr), strport, sizeof(strport),
13231 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13232 goto bad;
13233 }
13234 switch (ai->ai_family) {
13235 case AF_INET:
13236 if (strcmp(strport, "54321") != 0) {
13237 goto bad;
13238 }
13239 if (passive) {
13240 if (strcmp(straddr, "0.0.0.0") != 0) {
13241 goto bad;
13242 }
13243 } else {
13244 if (strcmp(straddr, "127.0.0.1") != 0) {
13245 goto bad;
13246 }
13247 }
13248 inet4++;
13249 break;
13250 case AF_INET6:
13251 if (strcmp(strport, "54321") != 0) {
13252 goto bad;
13253 }
13254 if (passive) {
13255 if (strcmp(straddr, "::") != 0) {
13256 goto bad;
13257 }
13258 } else {
13259 if (strcmp(straddr, "::1") != 0) {
13260 goto bad;
13261 }
13262 }
13263 inet6++;
13264 break;
13265 case AF_UNSPEC:
13266 goto bad;
13267 break;
13268 default:
13269 /* another family support? */
13270 break;
13271 }
13272 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013273 freeaddrinfo(aitop);
13274 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013275 }
13276
13277 if (!(inet4 == 0 || inet4 == 2))
13278 goto bad;
13279 if (!(inet6 == 0 || inet6 == 2))
13280 goto bad;
13281
13282 if (aitop)
13283 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013284 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285
13286 bad:
13287 if (aitop)
13288 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013289 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013290}
13291
Martin v. Löwis11437992002-04-12 09:54:03 +000013292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013293if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013294 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13299 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013301
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013302fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013303
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013305
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13307$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13308
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013309if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013310then
13311 if test $ipv6 = yes
13312 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013313 echo 'Fatal: You must get working getaddrinfo() function.'
13314 echo ' or you can specify "--disable-ipv6"'.
13315 exit 1
13316 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013317else
Martin v. Löwis11437992002-04-12 09:54:03 +000013318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013320
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013321fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013322
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013323for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013324do :
13325 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013326if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013327 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013328#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013329_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013330
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013331fi
13332done
13333
Michael W. Hudson54241132001-12-07 15:38:26 +000013334
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013335# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13337$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013338if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340else
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013342/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343#include <sys/types.h>
13344#include <sys/time.h>
13345#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
Martin v. Löwis11437992002-04-12 09:54:03 +000013347int
13348main ()
13349{
13350if ((struct tm *) 0)
13351return 0;
13352 ;
13353 return 0;
13354}
13355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013356if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013357 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013358else
Matthias Kloseb9621712010-04-24 17:59:49 +000013359 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13364$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013365if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368
13369fi
13370
Matthias Kloseb9621712010-04-24 17:59:49 +000013371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13372$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013373if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013375else
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013377/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013378#include <sys/types.h>
13379#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013380
Martin v. Löwis11437992002-04-12 09:54:03 +000013381int
13382main ()
13383{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013384struct tm tm;
13385 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013387 ;
13388 return 0;
13389}
13390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013391if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013392 ac_cv_struct_tm=time.h
13393else
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13399$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013400if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Matthias Kloseb9621712010-04-24 17:59:49 +000013402$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013403
13404fi
13405
Matthias Kloseb9621712010-04-24 17:59:49 +000013406ac_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 +000013407#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409"
Victor Stinnere0be4232011-10-25 13:06:09 +020013410if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013411
13412cat >>confdefs.h <<_ACEOF
13413#define HAVE_STRUCT_TM_TM_ZONE 1
13414_ACEOF
13415
13416
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013417fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013418
Martin v. Löwis11437992002-04-12 09:54:03 +000013419if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013422
13423else
Matthias Kloseb9621712010-04-24 17:59:49 +000013424 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13425"
Victor Stinnere0be4232011-10-25 13:06:09 +020013426if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013428else
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013430fi
13431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013432cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013433#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013434_ACEOF
13435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13437$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013438if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013440else
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013442/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013443#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013444#if !HAVE_DECL_TZNAME
13445extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013447
Martin v. Löwis11437992002-04-12 09:54:03 +000013448int
13449main ()
13450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013452 ;
13453 return 0;
13454}
13455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013456if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457 ac_cv_var_tzname=yes
13458else
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013461rm -f core conftest.err conftest.$ac_objext \
13462 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13465$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013466 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013469
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470 fi
13471fi
13472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473ac_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 +020013474if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013475
13476cat >>confdefs.h <<_ACEOF
13477#define HAVE_STRUCT_STAT_ST_RDEV 1
13478_ACEOF
13479
13480
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013481fi
13482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483ac_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 +020013484if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013485
Martin v. Löwis11437992002-04-12 09:54:03 +000013486cat >>confdefs.h <<_ACEOF
13487#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13488_ACEOF
13489
13490
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013491fi
13492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493ac_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 +020013494if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013495
13496cat >>confdefs.h <<_ACEOF
13497#define HAVE_STRUCT_STAT_ST_FLAGS 1
13498_ACEOF
13499
13500
13501fi
13502
Matthias Kloseb9621712010-04-24 17:59:49 +000013503ac_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 +020013504if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013505
13506cat >>confdefs.h <<_ACEOF
13507#define HAVE_STRUCT_STAT_ST_GEN 1
13508_ACEOF
13509
13510
13511fi
13512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513ac_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 +020013514if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013515
13516cat >>confdefs.h <<_ACEOF
13517#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13518_ACEOF
13519
13520
13521fi
13522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523ac_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 +020013524if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526cat >>confdefs.h <<_ACEOF
13527#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13528_ACEOF
13529
13530
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013531fi
13532
Stefan Krah267b6392016-04-26 01:09:18 +020013533ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13534 #include <sys/types.h>
13535 #include <pwd.h>
13536
13537"
13538if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13539
13540cat >>confdefs.h <<_ACEOF
13541#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13542_ACEOF
13543
13544
13545fi
13546ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13547 #include <sys/types.h>
13548 #include <pwd.h>
13549
13550"
13551if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13552
13553cat >>confdefs.h <<_ACEOF
13554#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13555_ACEOF
13556
13557
13558fi
13559
Zachary Ware6a6967e2016-10-01 00:47:27 -050013560# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13561ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13562"
13563if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13564
13565cat >>confdefs.h <<_ACEOF
13566#define HAVE_SIGINFO_T_SI_BAND 1
13567_ACEOF
13568
13569
13570fi
13571
Michael W. Hudson54241132001-12-07 15:38:26 +000013572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13574$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013575if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577else
Matthias Kloseb159a552010-04-25 21:00:44 +000013578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013580/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013581#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013582int
13583main ()
13584{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013585return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013586 ;
13587 return 0;
13588}
13589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013590if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013591 ac_cv_header_time_altzone=yes
13592else
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013597fi
13598
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13600$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013601if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013604
13605fi
13606
Guido van Rossumda88dad1995-01-26 00:46:29 +000013607was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13609$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013611/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013612
13613#include <sys/types.h>
13614#include <sys/select.h>
13615#include <sys/time.h>
13616
Martin v. Löwis11437992002-04-12 09:54:03 +000013617int
13618main ()
13619{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013620;
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 ;
13622 return 0;
13623}
13624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013626
13627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013629
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013630 was_it_defined=yes
13631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13635$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13638$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013639if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013643/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013644#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013645int
13646main ()
13647{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013648struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013649 ;
13650 return 0;
13651}
13652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013654 ac_cv_struct_addrinfo=yes
13655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13659fi
13660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13662$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013663if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013664
Matthias Kloseb9621712010-04-24 17:59:49 +000013665$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013666
13667fi
13668
Matthias Kloseb9621712010-04-24 17:59:49 +000013669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13670$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013671if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013672 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013673else
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013675/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013676
13677# include <sys/types.h>
13678# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013679int
13680main ()
13681{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013682struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013683 ;
13684 return 0;
13685}
13686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013687if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013688 ac_cv_struct_sockaddr_storage=yes
13689else
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13693fi
13694
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13696$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013697if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013700
13701fi
13702
Christian Heimesdffa3942016-09-05 23:54:41 +020013703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13704$as_echo_n "checking for sockaddr_alg... " >&6; }
13705if ${ac_cv_struct_sockaddr_alg+:} false; then :
13706 $as_echo_n "(cached) " >&6
13707else
13708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13709/* end confdefs.h. */
13710
13711# include <sys/types.h>
13712# include <sys/socket.h>
13713# include <linux/if_alg.h>
13714int
13715main ()
13716{
13717struct sockaddr_alg s
13718 ;
13719 return 0;
13720}
13721_ACEOF
13722if ac_fn_c_try_compile "$LINENO"; then :
13723 ac_cv_struct_sockaddr_alg=yes
13724else
13725 ac_cv_struct_sockaddr_alg=no
13726fi
13727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13728fi
13729
13730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13731$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13732if test $ac_cv_struct_sockaddr_alg = yes; then
13733
13734$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13735
13736fi
13737
Guido van Rossum627b2d71993-12-24 10:39:16 +000013738# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013739
Matthias Kloseb9621712010-04-24 17:59:49 +000013740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13741$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013742if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013744else
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013747$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013748int
13749main ()
13750{
13751static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013752test_array [0] = 0;
13753return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013754
13755 ;
13756 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013757}
Martin v. Löwis11437992002-04-12 09:54:03 +000013758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013759if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013760 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013761else
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13767$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013768if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013769 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013770
13771fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013772
Matthias Kloseb9621712010-04-24 17:59:49 +000013773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13774$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013775if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013776 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013777else
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013779/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780
Martin v. Löwis11437992002-04-12 09:54:03 +000013781int
13782main ()
13783{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013784
Martin v. Löwis11437992002-04-12 09:54:03 +000013785#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013786 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013788 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013790 char const *const *pcpcc;
13791 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 /* NEC SVR4.0.2 mips cc rejects this. */
13793 struct point {int x, y;};
13794 static struct point const zero = {0,0};
13795 /* AIX XL C 1.02.0.0 rejects this.
13796 It does not let you subtract one const X* pointer from another in
13797 an arm of an if-expression whose if-part is not a constant
13798 expression */
13799 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013802 ++pcpcc;
13803 ppc = (char**) pcpcc;
13804 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013805 { /* SCO 3.2v4 cc rejects this sort of thing. */
13806 char tx;
13807 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013808 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013809
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 }
13813 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13814 int x[] = {25, 17};
13815 const int *foo = &x[0];
13816 ++foo;
13817 }
13818 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13819 typedef const int *iptr;
13820 iptr p = 0;
13821 ++p;
13822 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013823 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013825 struct s { int j; const int *ap[3]; } bx;
13826 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 }
13828 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13829 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013830 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013832 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013833#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013834
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 ;
13836 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013837}
Martin v. Löwis11437992002-04-12 09:54:03 +000013838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013839if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840 ac_cv_c_const=yes
13841else
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13847$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013848if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013851
13852fi
13853
Michael W. Hudson54241132001-12-07 15:38:26 +000013854
Guido van Rossumda88dad1995-01-26 00:46:29 +000013855works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13857$as_echo_n "checking for working signed char... " >&6; }
13858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013859/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013860
Martin v. Löwis11437992002-04-12 09:54:03 +000013861int
13862main ()
13863{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013864signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013865 ;
13866 return 0;
13867}
13868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013869if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013870 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013871else
Skip Montanaro6dead952003-09-25 14:50:04 +000013872
Matthias Kloseb9621712010-04-24 17:59:49 +000013873$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013874
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013875
Guido van Rossum7f43da71994-08-01 12:15:30 +000013876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13879$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013880
Guido van Rossumda88dad1995-01-26 00:46:29 +000013881have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13883$as_echo_n "checking for prototypes... " >&6; }
13884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013885/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013886int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013887int
13888main ()
13889{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013890return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013891 ;
13892 return 0;
13893}
13894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013895if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013896
Matthias Kloseb9621712010-04-24 17:59:49 +000013897$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013898
Matthias Kloseb159a552010-04-25 21:00:44 +000013899 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13903$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013904
Guido van Rossumda88dad1995-01-26 00:46:29 +000013905works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13907$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013909/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013910
13911#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013912int foo(int x, ...) {
13913 va_list va;
13914 va_start(va, x);
13915 va_arg(va, int);
13916 va_arg(va, char *);
13917 va_arg(va, double);
13918 return 0;
13919}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013920
Martin v. Löwis11437992002-04-12 09:54:03 +000013921int
13922main ()
13923{
Guido van Rossum90eea071996-08-30 20:58:57 +000013924return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 ;
13926 return 0;
13927}
13928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013929if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013930
13931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013933
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013934 works=yes
13935
Guido van Rossum627b2d71993-12-24 10:39:16 +000013936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13939$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013940
Martin v. Löwisd6320502004-08-12 13:45:08 +000013941# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13943$as_echo_n "checking for socketpair... " >&6; }
13944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013945/* end confdefs.h. */
13946
13947#include <sys/types.h>
13948#include <sys/socket.h>
13949
13950int
13951main ()
13952{
13953void *x=socketpair
13954 ;
13955 return 0;
13956}
13957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013959
Matthias Kloseb9621712010-04-24 17:59:49 +000013960$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013961
Matthias Kloseb159a552010-04-25 21:00:44 +000013962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013963$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013964else
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13966$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013967
13968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013970
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013971# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13973$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013975/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013976#include <sys/types.h>
13977#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013978int
13979main ()
13980{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013981struct sockaddr x;
13982x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 ;
13984 return 0;
13985}
13986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013987if ac_fn_c_try_compile "$LINENO"; then :
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13989$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013992
13993else
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13995$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013996
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013999
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014000# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
14002
Matthias Kloseb9621712010-04-24 17:59:49 +000014003ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014004if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14009$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014010 OLD_CFLAGS=$CFLAGS
14011 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014013/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014014
14015# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014016
Martin v. Löwis11437992002-04-12 09:54:03 +000014017int
14018main ()
14019{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014020
14021 char *name;
14022 struct hostent *he, *res;
14023 char buffer[2048];
14024 int buflen = 2048;
14025 int h_errnop;
14026
14027 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014028
14029 ;
14030 return 0;
14031}
14032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014033if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014034
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014036
Martin v. Löwis11437992002-04-12 09:54:03 +000014037
Matthias Kloseb9621712010-04-24 17:59:49 +000014038$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14041$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014043else
Skip Montanaro6dead952003-09-25 14:50:04 +000014044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14046$as_echo "no" >&6; }
14047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14048$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014050/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014051
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014053
Martin v. Löwis11437992002-04-12 09:54:03 +000014054int
14055main ()
14056{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014057
14058 char *name;
14059 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014060 char buffer[2048];
14061 int buflen = 2048;
14062 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063
Matthias Kloseb159a552010-04-25 21:00:44 +000014064 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014065
14066 ;
14067 return 0;
14068}
14069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014070if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014073
Martin v. Löwis11437992002-04-12 09:54:03 +000014074
Matthias Kloseb159a552010-04-25 21:00:44 +000014075$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14078$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014079
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014080else
Skip Montanaro6dead952003-09-25 14:50:04 +000014081
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14083$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14085$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14087/* end confdefs.h. */
14088
14089# include <netdb.h>
14090
14091int
14092main ()
14093{
14094
14095 char *name;
14096 struct hostent *he;
14097 struct hostent_data data;
14098
14099 (void) gethostbyname_r(name, he, &data);
14100
14101 ;
14102 return 0;
14103}
14104_ACEOF
14105if ac_fn_c_try_compile "$LINENO"; then :
14106
14107 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14108
14109
14110$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14111
14112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14113$as_echo "yes" >&6; }
14114
14115else
14116
14117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14118$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014119
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014122
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014128 CFLAGS=$OLD_CFLAGS
14129
14130else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014131
Matthias Kloseb9621712010-04-24 17:59:49 +000014132 for ac_func in gethostbyname
14133do :
14134 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014135if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014136 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014137#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014138_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014139
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014140fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014141done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014142
Michael W. Hudson54241132001-12-07 15:38:26 +000014143
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014144fi
14145
Michael W. Hudson54241132001-12-07 15:38:26 +000014146
14147
14148
14149
14150
14151
Guido van Rossum627b2d71993-12-24 10:39:16 +000014152# checks for system services
14153# (none yet)
14154
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014155# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014156ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014157if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014158
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014159else
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14161$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014162if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014164else
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014166LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170/* Override any GCC internal prototype to avoid an error.
14171 Use char because int might match the return type of a GCC
14172 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014173#ifdef __cplusplus
14174extern "C"
14175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014176char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014177int
14178main ()
14179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014180return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014181 ;
14182 return 0;
14183}
14184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014185if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014186 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014187else
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014190rm -f core conftest.err conftest.$ac_objext \
14191 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014192LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14195$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014196if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014197 cat >>confdefs.h <<_ACEOF
14198#define HAVE_LIBIEEE 1
14199_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014200
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014201 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014202
Guido van Rossum627b2d71993-12-24 10:39:16 +000014203fi
14204
Michael W. Hudson54241132001-12-07 15:38:26 +000014205
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014206fi
14207
Michael W. Hudson54241132001-12-07 15:38:26 +000014208
Guido van Rossum7f43da71994-08-01 12:15:30 +000014209# check for --with-libm=...
14210
Guido van Rossum563e7081996-09-10 18:20:48 +000014211case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014212Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014213*) LIBM=-lm
14214esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14216$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014219if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014220 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014221if test "$withval" = no
14222then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14224$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014225elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014226then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14228$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014229else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014230fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014231else
Matthias Kloseb9621712010-04-24 17:59:49 +000014232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14233$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234fi
14235
Guido van Rossum7f43da71994-08-01 12:15:30 +000014236
14237# check for --with-libc=...
14238
Matthias Kloseb9621712010-04-24 17:59:49 +000014239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14240$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014243if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014245if test "$withval" = no
14246then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14248$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014249elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014250then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14252$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014253else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014254fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014255else
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14257$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258fi
14259
Guido van Rossum7f43da71994-08-01 12:15:30 +000014260
Stefan Krah1919b7e2012-03-21 18:25:23 +010014261# **************************************
14262# * Check for gcc x64 inline assembler *
14263# **************************************
14264
14265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14266$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14268/* end confdefs.h. */
14269
14270int
14271main ()
14272{
14273
14274 __asm__ __volatile__ ("movq %rcx, %rax");
14275
14276 ;
14277 return 0;
14278}
14279_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014280if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014281 have_gcc_asm_for_x64=yes
14282else
14283 have_gcc_asm_for_x64=no
14284fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014285rm -f core conftest.err conftest.$ac_objext \
14286 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14288$as_echo "$have_gcc_asm_for_x64" >&6; }
14289if test "$have_gcc_asm_for_x64" = yes
14290then
14291
14292$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14293
14294fi
14295
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014296# **************************************************
14297# * Check for various properties of floating point *
14298# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014299
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14301$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14302if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014303 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014304else
14305
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014306
14307ax_cv_c_float_words_bigendian=unknown
14308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014309/* end confdefs.h. */
14310
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014311
14312double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14313
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014314
14315_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014316if ac_fn_c_try_compile "$LINENO"; then :
14317
14318
14319if grep noonsees conftest.$ac_objext >/dev/null ; then
14320 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014321fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014322if grep seesnoon conftest.$ac_objext >/dev/null ; then
14323 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14324 ax_cv_c_float_words_bigendian=no
14325 else
14326 ax_cv_c_float_words_bigendian=unknown
14327 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014328fi
14329
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014330
14331fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014333fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14335$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014336
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014337case $ax_cv_c_float_words_bigendian in
14338 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014339
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014340$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14341 ;;
14342 no)
14343 ;;
14344 *)
14345 as_fn_error $? "
14346
14347Unknown float word ordering. You need to manually preset
14348ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14349
14350 " "$LINENO" 5 ;;
14351esac
14352
14353
14354if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014355then
14356
Matthias Kloseb9621712010-04-24 17:59:49 +000014357$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014358
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014359elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014360then
14361
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014362$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14363
14364else
14365 # Some ARM platforms use a mixed-endian representation for doubles.
14366 # While Python doesn't currently have full support for these platforms
14367 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14368 # conversions work.
14369 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14370 # or little, then it must be this?
14371
Matthias Kloseb9621712010-04-24 17:59:49 +000014372$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014373
14374fi
14375
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014376# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014377# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014378# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014379# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014380# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014381# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014382
14383# This inline assembler syntax may also work for suncc and icc,
14384# so we try it on all platforms.
14385
Matthias Kloseb9621712010-04-24 17:59:49 +000014386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14387$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014389/* end confdefs.h. */
14390
14391int
14392main ()
14393{
14394
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014395 unsigned short cw;
14396 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14397 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014398
14399 ;
14400 return 0;
14401}
14402_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014403if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014404 have_gcc_asm_for_x87=yes
14405else
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014407fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014408rm -f core conftest.err conftest.$ac_objext \
14409 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14411$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014412if test "$have_gcc_asm_for_x87" = yes
14413then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014416
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014417fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014418
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14420$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14422/* end confdefs.h. */
14423
14424int
14425main ()
14426{
14427
14428 unsigned int fpcr;
14429 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14430 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14431
14432 ;
14433 return 0;
14434}
14435_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014436if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014437 have_gcc_asm_for_mc68881=yes
14438else
14439 have_gcc_asm_for_mc68881=no
14440fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014441rm -f core conftest.err conftest.$ac_objext \
14442 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14444$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14445if test "$have_gcc_asm_for_mc68881" = yes
14446then
14447
14448$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14449
14450fi
14451
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014452# Detect whether system arithmetic is subject to x87-style double
14453# rounding issues. The result of this test has little meaning on non
14454# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14455# mode is round-to-nearest and double rounding issues are present, and
14456# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14458$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014459# $BASECFLAGS may affect the result
14460ac_save_cc="$CC"
14461CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014462if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014463 ac_cv_x87_double_rounding=no
14464else
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014466/* end confdefs.h. */
14467
14468#include <stdlib.h>
14469#include <math.h>
14470int main() {
14471 volatile double x, y, z;
14472 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14473 x = 0.99999999999999989; /* 1-2**-53 */
14474 y = 1./x;
14475 if (y != 1.)
14476 exit(0);
14477 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14478 x = 1e16;
14479 y = 2.99999;
14480 z = x + y;
14481 if (z != 1e16+4.)
14482 exit(0);
14483 /* both tests show evidence of double rounding */
14484 exit(1);
14485}
14486
14487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014488if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014489 ac_cv_x87_double_rounding=no
14490else
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014493rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14494 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014495fi
14496
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014497CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14499$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014500if test "$ac_cv_x87_double_rounding" = yes
14501then
14502
Matthias Kloseb9621712010-04-24 17:59:49 +000014503$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014504
14505fi
14506
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014507# ************************************
14508# * Check for mathematical functions *
14509# ************************************
14510
14511LIBS_SAVE=$LIBS
14512LIBS="$LIBS $LIBM"
14513
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014514for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14515do :
14516 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14517ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014518if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014519 cat >>confdefs.h <<_ACEOF
14520#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14521_ACEOF
14522
14523fi
14524done
14525
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014526for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014527do :
14528 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14529ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014530if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014531 cat >>confdefs.h <<_ACEOF
14532#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14533_ACEOF
14534
14535fi
14536done
14537
14538ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14539"
Victor Stinnere0be4232011-10-25 13:06:09 +020014540if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014541 ac_have_decl=1
14542else
14543 ac_have_decl=0
14544fi
14545
14546cat >>confdefs.h <<_ACEOF
14547#define HAVE_DECL_ISINF $ac_have_decl
14548_ACEOF
14549ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14550"
Victor Stinnere0be4232011-10-25 13:06:09 +020014551if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014552 ac_have_decl=1
14553else
14554 ac_have_decl=0
14555fi
14556
14557cat >>confdefs.h <<_ACEOF
14558#define HAVE_DECL_ISNAN $ac_have_decl
14559_ACEOF
14560ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14561"
Victor Stinnere0be4232011-10-25 13:06:09 +020014562if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014563 ac_have_decl=1
14564else
14565 ac_have_decl=0
14566fi
14567
14568cat >>confdefs.h <<_ACEOF
14569#define HAVE_DECL_ISFINITE $ac_have_decl
14570_ACEOF
14571
14572
Mark Dickinsona614f042009-11-28 12:48:43 +000014573# For multiprocessing module, check that sem_open
14574# actually works. For FreeBSD versions <= 7.2,
14575# the kernel module that provides POSIX semaphores
14576# isn't loaded by default, so an attempt to call
14577# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14579$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014580if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014582else
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014584 ac_cv_posix_semaphores_enabled=yes
14585else
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014587/* end confdefs.h. */
14588
14589#include <unistd.h>
14590#include <fcntl.h>
14591#include <stdio.h>
14592#include <semaphore.h>
14593#include <sys/stat.h>
14594
14595int main(void) {
14596 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14597 if (a == SEM_FAILED) {
14598 perror("sem_open");
14599 return 1;
14600 }
14601 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014602 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014603 return 0;
14604}
14605
14606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014607if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014608 ac_cv_posix_semaphores_enabled=yes
14609else
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014611fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14613 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014614fi
14615
14616
Mark Dickinsona614f042009-11-28 12:48:43 +000014617fi
14618
Matthias Kloseb9621712010-04-24 17:59:49 +000014619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14620$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014621if test $ac_cv_posix_semaphores_enabled = no
14622then
14623
Matthias Kloseb9621712010-04-24 17:59:49 +000014624$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014625
14626fi
14627
Mark Dickinson10683072009-04-18 21:18:19 +000014628# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14630$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014631if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014633else
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014635 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014636else
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014638/* end confdefs.h. */
14639
14640#include <unistd.h>
14641#include <fcntl.h>
14642#include <stdio.h>
14643#include <semaphore.h>
14644#include <sys/stat.h>
14645
14646int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014647 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014648 int count;
14649 int res;
14650 if(a==SEM_FAILED){
14651 perror("sem_open");
14652 return 1;
14653
14654 }
14655 res = sem_getvalue(a, &count);
14656 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014657 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014658 return res==-1 ? 1 : 0;
14659}
14660
Mark Dickinson10683072009-04-18 21:18:19 +000014661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014662if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014663 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014664else
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014667rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14668 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014669fi
14670
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014671
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014672fi
14673
Matthias Kloseb9621712010-04-24 17:59:49 +000014674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14675$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014676if test $ac_cv_broken_sem_getvalue = yes
14677then
14678
Matthias Kloseb9621712010-04-24 17:59:49 +000014679$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014680
14681fi
14682
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014683ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14684"
14685if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14686 ac_have_decl=1
14687else
14688 ac_have_decl=0
14689fi
14690
14691cat >>confdefs.h <<_ACEOF
14692#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14693_ACEOF
14694ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14695"
14696if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14697 ac_have_decl=1
14698else
14699 ac_have_decl=0
14700fi
14701
14702cat >>confdefs.h <<_ACEOF
14703#define HAVE_DECL_RTLD_NOW $ac_have_decl
14704_ACEOF
14705ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14706"
14707if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14708 ac_have_decl=1
14709else
14710 ac_have_decl=0
14711fi
14712
14713cat >>confdefs.h <<_ACEOF
14714#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14715_ACEOF
14716ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14717"
14718if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14719 ac_have_decl=1
14720else
14721 ac_have_decl=0
14722fi
14723
14724cat >>confdefs.h <<_ACEOF
14725#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14726_ACEOF
14727ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14728"
14729if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14730 ac_have_decl=1
14731else
14732 ac_have_decl=0
14733fi
14734
14735cat >>confdefs.h <<_ACEOF
14736#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14737_ACEOF
14738ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14739"
14740if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14741 ac_have_decl=1
14742else
14743 ac_have_decl=0
14744fi
14745
14746cat >>confdefs.h <<_ACEOF
14747#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14748_ACEOF
14749ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14750"
14751if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14752 ac_have_decl=1
14753else
14754 ac_have_decl=0
14755fi
14756
14757cat >>confdefs.h <<_ACEOF
14758#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14759_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014760ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14761"
14762if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14763 ac_have_decl=1
14764else
14765 ac_have_decl=0
14766fi
14767
14768cat >>confdefs.h <<_ACEOF
14769#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14770_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014771
14772
Mark Dickinsonbd792642009-03-18 20:06:12 +000014773# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14775$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014776# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014777if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014778 enableval=$enable_big_digits; case $enable_big_digits in
14779yes)
14780 enable_big_digits=30 ;;
14781no)
14782 enable_big_digits=15 ;;
1478315|30)
14784 ;;
14785*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014786 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 +000014787esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14789$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014790
14791cat >>confdefs.h <<_ACEOF
14792#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14793_ACEOF
14794
14795
14796else
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14798$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014799fi
14800
14801
Guido van Rossumef2255b2000-03-10 22:30:29 +000014802# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014803ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014804if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014805
14806
Matthias Kloseb9621712010-04-24 17:59:49 +000014807$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014808
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014809 wchar_h="yes"
14810
Guido van Rossumef2255b2000-03-10 22:30:29 +000014811else
Martin v. Löwis11437992002-04-12 09:54:03 +000014812 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014813
14814fi
14815
Michael W. Hudson54241132001-12-07 15:38:26 +000014816
Martin v. Löwis11437992002-04-12 09:54:03 +000014817
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014818# determine wchar_t size
14819if test "$wchar_h" = yes
14820then
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14824# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14826$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014827if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014828 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014829else
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14831"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
Martin v. Löwis11437992002-04-12 09:54:03 +000014833else
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 if test "$ac_cv_type_wchar_t" = yes; then
14835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014837as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014838See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839 else
14840 ac_cv_sizeof_wchar_t=0
14841 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014843
Martin v. Löwis11437992002-04-12 09:54:03 +000014844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14846$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847
14848
14849
Martin v. Löwis11437992002-04-12 09:54:03 +000014850cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014851#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014852_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014853
Michael W. Hudson54241132001-12-07 15:38:26 +000014854
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014855fi
14856
Matthias Kloseb9621712010-04-24 17:59:49 +000014857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14858$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014859have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014861/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014862
14863#include <tcl.h>
14864#if TCL_UTF_MAX != 6
14865# error "NOT UCS4_TCL"
14866#endif
14867int
14868main ()
14869{
14870
14871 ;
14872 return 0;
14873}
14874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014875if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014876
14877
Matthias Kloseb9621712010-04-24 17:59:49 +000014878$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014879
14880 have_ucs4_tcl=yes
14881
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14885$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014886
Skip Montanaro6dead952003-09-25 14:50:04 +000014887# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014888if test "$wchar_h" = yes
14889then
14890 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14892$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014893 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014895else
14896
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014898 ac_cv_wchar_t_signed=yes
14899else
Matthias Kloseb9621712010-04-24 17:59:49 +000014900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014901/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014902
14903 #include <wchar.h>
14904 int main()
14905 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014906 /* Success: exit code 0 */
14907 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014908 }
14909
14910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014911if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014912 ac_cv_wchar_t_signed=yes
14913else
Matthias Kloseb9621712010-04-24 17:59:49 +000014914 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14917 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014918fi
14919
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014920fi
14921
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14923$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924fi
14925
Michael Osipov3738fad2018-08-24 18:17:19 +020014926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14927$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014928# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014929if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014930 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014931then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014932
Matthias Kloseb9621712010-04-24 17:59:49 +000014933$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014934
Michael Osipov3738fad2018-08-24 18:17:19 +020014935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14936$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014937else
Michael Osipov3738fad2018-08-24 18:17:19 +020014938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14939$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014940fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014941
14942# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14944$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014945if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014947else
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 ac_cv_c_bigendian=unknown
14949 # See if we're dealing with a universal compiler.
14950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14951/* end confdefs.h. */
14952#ifndef __APPLE_CC__
14953 not a universal capable compiler
14954 #endif
14955 typedef int dummy;
14956
Skip Montanaro6dead952003-09-25 14:50:04 +000014957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014958if ac_fn_c_try_compile "$LINENO"; then :
14959
14960 # Check for potential -arch flags. It is not universal unless
14961 # there are at least two -arch flags with different values.
14962 ac_arch=
14963 ac_prev=
14964 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14965 if test -n "$ac_prev"; then
14966 case $ac_word in
14967 i?86 | x86_64 | ppc | ppc64)
14968 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14969 ac_arch=$ac_word
14970 else
14971 ac_cv_c_bigendian=universal
14972 break
14973 fi
14974 ;;
14975 esac
14976 ac_prev=
14977 elif test "x$ac_word" = "x-arch"; then
14978 ac_prev=arch
14979 fi
14980 done
14981fi
14982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14983 if test $ac_cv_c_bigendian = unknown; then
14984 # See if sys/param.h defines the BYTE_ORDER macro.
14985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014986/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014987#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014988 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014989
Martin v. Löwis11437992002-04-12 09:54:03 +000014990int
14991main ()
14992{
Matthias Kloseb9621712010-04-24 17:59:49 +000014993#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14994 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14995 && LITTLE_ENDIAN)
14996 bogus endian macros
14997 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014998
14999 ;
15000 return 0;
15001}
15002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015003if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015004 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015006/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015007#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015009
Martin v. Löwis11437992002-04-12 09:54:03 +000015010int
15011main ()
15012{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015013#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 not big endian
15015 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015016
15017 ;
15018 return 0;
15019}
15020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015021if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015022 ac_cv_c_bigendian=yes
15023else
Matthias Kloseb9621712010-04-24 17:59:49 +000015024 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015027fi
15028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15029 fi
15030 if test $ac_cv_c_bigendian = unknown; then
15031 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015033/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015034#include <limits.h>
15035
Martin v. Löwis11437992002-04-12 09:54:03 +000015036int
15037main ()
15038{
Matthias Kloseb9621712010-04-24 17:59:49 +000015039#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15040 bogus endian macros
15041 #endif
15042
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 ;
15044 return 0;
15045}
15046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015047if ac_fn_c_try_compile "$LINENO"; then :
15048 # It does; now see whether it defined to _BIG_ENDIAN or not.
15049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15050/* end confdefs.h. */
15051#include <limits.h>
15052
15053int
15054main ()
15055{
15056#ifndef _BIG_ENDIAN
15057 not big endian
15058 #endif
15059
15060 ;
15061 return 0;
15062}
15063_ACEOF
15064if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015065 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015066else
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15070fi
15071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15072 fi
15073 if test $ac_cv_c_bigendian = unknown; then
15074 # Compile a test program.
15075 if test "$cross_compiling" = yes; then :
15076 # Try to guess by grepping values from an object file.
15077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15078/* end confdefs.h. */
15079short int ascii_mm[] =
15080 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15081 short int ascii_ii[] =
15082 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15083 int use_ascii (int i) {
15084 return ascii_mm[i] + ascii_ii[i];
15085 }
15086 short int ebcdic_ii[] =
15087 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15088 short int ebcdic_mm[] =
15089 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15090 int use_ebcdic (int i) {
15091 return ebcdic_mm[i] + ebcdic_ii[i];
15092 }
15093 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095int
15096main ()
15097{
15098return use_ascii (foo) == use_ebcdic (foo);
15099 ;
15100 return 0;
15101}
15102_ACEOF
15103if ac_fn_c_try_compile "$LINENO"; then :
15104 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15105 ac_cv_c_bigendian=yes
15106 fi
15107 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15108 if test "$ac_cv_c_bigendian" = unknown; then
15109 ac_cv_c_bigendian=no
15110 else
15111 # finding both strings is unlikely to happen, but who knows?
15112 ac_cv_c_bigendian=unknown
15113 fi
15114 fi
15115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015117else
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015119/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015120$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015121int
15122main ()
15123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015124
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 /* Are we little or big endian? From Harbison&Steele. */
15126 union
15127 {
15128 long int l;
15129 char c[sizeof (long int)];
15130 } u;
15131 u.l = 1;
15132 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015133
15134 ;
15135 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015136}
Martin v. Löwis11437992002-04-12 09:54:03 +000015137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015138if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015139 ac_cv_c_bigendian=no
15140else
Matthias Kloseb9621712010-04-24 17:59:49 +000015141 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15144 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015146
Matthias Kloseb9621712010-04-24 17:59:49 +000015147 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15150$as_echo "$ac_cv_c_bigendian" >&6; }
15151 case $ac_cv_c_bigendian in #(
15152 yes)
15153 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15154;; #(
15155 no)
15156 ;; #(
15157 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015158
Matthias Kloseb9621712010-04-24 17:59:49 +000015159$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015160
Matthias Kloseb9621712010-04-24 17:59:49 +000015161 ;; #(
15162 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015163 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015164 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015166
Michael W. Hudson54241132001-12-07 15:38:26 +000015167
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015168# ABI version string for Python extension modules. This appears between the
15169# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15170# from the following attributes which affect the ABI of this Python build (in
15171# this order):
15172#
15173# * The Python implementation (always 'cpython-' for us)
15174# * The major and minor version numbers
15175# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015176#
15177# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015178# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15179# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015180#
15181# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15182# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015183
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15185$as_echo_n "checking ABIFLAGS... " >&6; }
15186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15187$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15189$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015190SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15192$as_echo "$SOABI" >&6; }
15193
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015194# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15195if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015196 # Similar to SOABI but remove "d" flag from ABIFLAGS
15197
15198 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15199
15200cat >>confdefs.h <<_ACEOF
15201#define ALT_SOABI "${ALT_SOABI}"
15202_ACEOF
15203
15204fi
15205
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015206
15207case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015208 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015209 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15210 *)
15211 EXT_SUFFIX=${SHLIB_SUFFIX};;
15212esac
15213
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15215$as_echo_n "checking LDVERSION... " >&6; }
15216LDVERSION='$(VERSION)$(ABIFLAGS)'
15217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15218$as_echo "$LDVERSION" >&6; }
15219
E. M. Brayc994c8f2019-05-24 17:33:47 +020015220# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015221
E. M. Brayb1fc4172019-05-24 18:39:39 +020015222if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015223 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015224else
15225 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015226fi
15227
doko@python.org87421192013-01-26 11:39:31 +010015228
doko@ubuntu.com55532312016-06-14 08:55:19 +020015229if test x$PLATFORM_TRIPLET = x; then
15230 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15231else
15232 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15233fi
doko@python.org87421192013-01-26 11:39:31 +010015234
15235
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015236# Check whether right shifting a negative integer extends the sign bit
15237# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15239$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015240if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015241 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015242else
Martin v. Löwis11437992002-04-12 09:54:03 +000015243
Matthias Kloseb9621712010-04-24 17:59:49 +000015244if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015245 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015246else
Matthias Kloseb9621712010-04-24 17:59:49 +000015247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015248/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015249
15250int main()
15251{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015252 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015253}
15254
Martin v. Löwis11437992002-04-12 09:54:03 +000015255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015256if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015257 ac_cv_rshift_extends_sign=yes
15258else
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15262 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015263fi
15264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265fi
15266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15268$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015269if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015270then
Martin v. Löwis11437992002-04-12 09:54:03 +000015271
Matthias Kloseb9621712010-04-24 17:59:49 +000015272$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015273
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015274fi
15275
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015276# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15278$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015279if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015280 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015281else
Martin v. Löwis11437992002-04-12 09:54:03 +000015282
Matthias Kloseb9621712010-04-24 17:59:49 +000015283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015284/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015285#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015286int
15287main ()
15288{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015289
15290 FILE *f = fopen("/dev/null", "r");
15291 flockfile(f);
15292 getc_unlocked(f);
15293 funlockfile(f);
15294
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 ;
15296 return 0;
15297}
15298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015299if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015300 ac_cv_have_getc_unlocked=yes
15301else
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 ac_cv_have_getc_unlocked=no
15303fi
15304rm -f core conftest.err conftest.$ac_objext \
15305 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307
Matthias Kloseb9621712010-04-24 17:59:49 +000015308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15309$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015310if test "$ac_cv_have_getc_unlocked" = yes
15311then
Martin v. Löwis11437992002-04-12 09:54:03 +000015312
Matthias Kloseb9621712010-04-24 17:59:49 +000015313$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015314
15315fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015316
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015317# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015318# save the value of LIBS so we don't actually link Python with readline
15319LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015320
Gregory P. Smith18820942008-09-07 06:24:49 +000015321# On some systems we need to link readline to a termcap compatible
15322# library. NOTE: Keep the precedence of listed libraries synchronised
15323# with setup.py.
15324py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15326$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015327for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015328 if test -z "$py_libtermcap"; then
15329 READLINE_LIBS="-lreadline"
15330 else
15331 READLINE_LIBS="-lreadline -l$py_libtermcap"
15332 fi
15333 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015335/* end confdefs.h. */
15336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015337/* Override any GCC internal prototype to avoid an error.
15338 Use char because int might match the return type of a GCC
15339 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015340#ifdef __cplusplus
15341extern "C"
15342#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015343char readline ();
15344int
15345main ()
15346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015347return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015348 ;
15349 return 0;
15350}
15351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015352if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015353 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015355rm -f core conftest.err conftest.$ac_objext \
15356 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015357 if test $py_cv_lib_readline = yes; then
15358 break
15359 fi
15360done
15361# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15362#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015363if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15365$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015366else
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15368$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015371
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015372fi
15373
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015374# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015376/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015377#include <readline/readline.h>
15378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015379if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015380 have_readline=yes
15381else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015382 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015383
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015384fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015385rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015386if test $have_readline = yes
15387then
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015389/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015390#include <readline/readline.h>
15391
15392_ACEOF
15393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015394 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015395
Matthias Kloseb9621712010-04-24 17:59:49 +000015396$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015397
15398fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015399rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015400
Matthias Kloseb9621712010-04-24 17:59:49 +000015401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015402/* end confdefs.h. */
15403#include <readline/readline.h>
15404
15405_ACEOF
15406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015407 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015408
Matthias Kloseb9621712010-04-24 17:59:49 +000015409$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015410
15411fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015412rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015413
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015414fi
15415
Martin v. Löwis0daad592001-09-30 21:09:59 +000015416# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15418$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015419if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015420 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015421else
Martin v. Löwis11437992002-04-12 09:54:03 +000015422 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015423LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427/* Override any GCC internal prototype to avoid an error.
15428 Use char because int might match the return type of a GCC
15429 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015430#ifdef __cplusplus
15431extern "C"
15432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015433char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015434int
15435main ()
15436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015438 ;
15439 return 0;
15440}
15441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015442if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015443 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015444else
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015447rm -f core conftest.err conftest.$ac_objext \
15448 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015449LIBS=$ac_check_lib_save_LIBS
15450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15452$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015453if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015454
Matthias Kloseb9621712010-04-24 17:59:49 +000015455$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015456
Martin v. Löwis0daad592001-09-30 21:09:59 +000015457fi
15458
Michael W. Hudson54241132001-12-07 15:38:26 +000015459
Thomas Wouters89d996e2007-09-08 17:39:28 +000015460# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15462$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015463if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015464 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015465else
15466 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015467LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015469/* end confdefs.h. */
15470
15471/* Override any GCC internal prototype to avoid an error.
15472 Use char because int might match the return type of a GCC
15473 builtin and then its argument prototype would still apply. */
15474#ifdef __cplusplus
15475extern "C"
15476#endif
15477char rl_completion_display_matches_hook ();
15478int
15479main ()
15480{
15481return rl_completion_display_matches_hook ();
15482 ;
15483 return 0;
15484}
15485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015486if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015487 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15488else
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015491rm -f core conftest.err conftest.$ac_objext \
15492 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015493LIBS=$ac_check_lib_save_LIBS
15494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15496$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015497if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015498
Matthias Kloseb9621712010-04-24 17:59:49 +000015499$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015500
15501fi
15502
15503
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015504# also in 4.0, but not in editline
15505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15506$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15507if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15508 $as_echo_n "(cached) " >&6
15509else
15510 ac_check_lib_save_LIBS=$LIBS
15511LIBS="-lreadline $READLINE_LIBS $LIBS"
15512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15513/* end confdefs.h. */
15514
15515/* Override any GCC internal prototype to avoid an error.
15516 Use char because int might match the return type of a GCC
15517 builtin and then its argument prototype would still apply. */
15518#ifdef __cplusplus
15519extern "C"
15520#endif
15521char rl_resize_terminal ();
15522int
15523main ()
15524{
15525return rl_resize_terminal ();
15526 ;
15527 return 0;
15528}
15529_ACEOF
15530if ac_fn_c_try_link "$LINENO"; then :
15531 ac_cv_lib_readline_rl_resize_terminal=yes
15532else
15533 ac_cv_lib_readline_rl_resize_terminal=no
15534fi
15535rm -f core conftest.err conftest.$ac_objext \
15536 conftest$ac_exeext conftest.$ac_ext
15537LIBS=$ac_check_lib_save_LIBS
15538fi
15539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15540$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15541if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15542
15543$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15544
15545fi
15546
15547
Martin v. Löwis0daad592001-09-30 21:09:59 +000015548# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15550$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015551if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015553else
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015555LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015559/* Override any GCC internal prototype to avoid an error.
15560 Use char because int might match the return type of a GCC
15561 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015562#ifdef __cplusplus
15563extern "C"
15564#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015565char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015566int
15567main ()
15568{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 ;
15571 return 0;
15572}
15573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015574if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015575 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015576else
Matthias Kloseb9621712010-04-24 17:59:49 +000015577 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015579rm -f core conftest.err conftest.$ac_objext \
15580 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015581LIBS=$ac_check_lib_save_LIBS
15582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15584$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015585if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015586
Matthias Kloseb9621712010-04-24 17:59:49 +000015587$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015588
Guido van Rossum353ae582001-07-10 16:45:32 +000015589fi
15590
Jack Jansendd19cf82001-12-06 22:36:17 +000015591
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015592# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015594/* end confdefs.h. */
15595#include <readline/readline.h>
15596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015597if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015598 have_readline=yes
15599else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015600 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015601
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015602fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015603rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015604if test $have_readline = yes
15605then
Matthias Kloseb9621712010-04-24 17:59:49 +000015606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015607/* end confdefs.h. */
15608#include <readline/readline.h>
15609
15610_ACEOF
15611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015612 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015613
Matthias Kloseb9621712010-04-24 17:59:49 +000015614$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015615
15616fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015617rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015618
15619fi
15620
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15622$as_echo_n "checking for append_history in -lreadline... " >&6; }
15623if ${ac_cv_lib_readline_append_history+:} false; then :
15624 $as_echo_n "(cached) " >&6
15625else
15626 ac_check_lib_save_LIBS=$LIBS
15627LIBS="-lreadline $READLINE_LIBS $LIBS"
15628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15629/* end confdefs.h. */
15630
15631/* Override any GCC internal prototype to avoid an error.
15632 Use char because int might match the return type of a GCC
15633 builtin and then its argument prototype would still apply. */
15634#ifdef __cplusplus
15635extern "C"
15636#endif
15637char append_history ();
15638int
15639main ()
15640{
15641return append_history ();
15642 ;
15643 return 0;
15644}
15645_ACEOF
15646if ac_fn_c_try_link "$LINENO"; then :
15647 ac_cv_lib_readline_append_history=yes
15648else
15649 ac_cv_lib_readline_append_history=no
15650fi
15651rm -f core conftest.err conftest.$ac_objext \
15652 conftest$ac_exeext conftest.$ac_ext
15653LIBS=$ac_check_lib_save_LIBS
15654fi
15655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15656$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15657if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15658
15659$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15660
15661fi
15662
15663
Martin v. Löwis82bca632006-02-10 20:49:30 +000015664# End of readline checks: restore LIBS
15665LIBS=$LIBS_no_readline
15666
Matthias Kloseb9621712010-04-24 17:59:49 +000015667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15668$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015669if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015670 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015671else
Martin v. Löwis11437992002-04-12 09:54:03 +000015672
Matthias Kloseb9621712010-04-24 17:59:49 +000015673if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015674 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015675else
Matthias Kloseb9621712010-04-24 17:59:49 +000015676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015677/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015678
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015679#include <stdlib.h>
15680#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015681int main()
15682{
15683 int val1 = nice(1);
15684 if (val1 != -1 && val1 == nice(2))
15685 exit(0);
15686 exit(1);
15687}
15688
Martin v. Löwis11437992002-04-12 09:54:03 +000015689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015690if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015691 ac_cv_broken_nice=yes
15692else
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15696 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015697fi
15698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015699fi
15700
Matthias Kloseb9621712010-04-24 17:59:49 +000015701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15702$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015703if test "$ac_cv_broken_nice" = yes
15704then
Martin v. Löwis11437992002-04-12 09:54:03 +000015705
Matthias Kloseb9621712010-04-24 17:59:49 +000015706$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015707
15708fi
15709
Matthias Kloseb9621712010-04-24 17:59:49 +000015710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15711$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015712if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015713 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015714else
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015716 ac_cv_broken_poll=no
15717else
Matthias Kloseb9621712010-04-24 17:59:49 +000015718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015719/* end confdefs.h. */
15720
15721#include <poll.h>
15722
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015723int main()
15724{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015725 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015726 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015727
15728 close (42);
15729
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015730 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015731 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015732 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015733 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015734 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015735 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015736 return 1;
15737}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015738
15739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015740if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015741 ac_cv_broken_poll=yes
15742else
Matthias Kloseb9621712010-04-24 17:59:49 +000015743 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015749fi
15750
Matthias Kloseb9621712010-04-24 17:59:49 +000015751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15752$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015753if test "$ac_cv_broken_poll" = yes
15754then
15755
Matthias Kloseb9621712010-04-24 17:59:49 +000015756$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015757
15758fi
15759
Martin v. Löwis1d459062005-03-14 21:23:33 +000015760# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15762$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015763if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015764 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015765else
15766
Matthias Kloseb9621712010-04-24 17:59:49 +000015767if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015768 ac_cv_working_tzset=no
15769else
Matthias Kloseb9621712010-04-24 17:59:49 +000015770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015771/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015772
15773#include <stdlib.h>
15774#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015775#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015776
15777#if HAVE_TZNAME
15778extern char *tzname[];
15779#endif
15780
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015781int main()
15782{
Brett Cannon18367812003-09-19 00:59:16 +000015783 /* Note that we need to ensure that not only does tzset(3)
15784 do 'something' with localtime, but it works as documented
15785 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015786 This includes making sure that tzname is set properly if
15787 tm->tm_zone does not exist since it is the alternative way
15788 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015789
15790 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015791 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015792 */
15793
Martin v. Löwis1d459062005-03-14 21:23:33 +000015794 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015795 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15796
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015797 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015798 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015799 if (localtime(&groundhogday)->tm_hour != 0)
15800 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015801#if HAVE_TZNAME
15802 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15803 if (strcmp(tzname[0], "UTC") ||
15804 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15805 exit(1);
15806#endif
Brett Cannon18367812003-09-19 00:59:16 +000015807
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015808 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015809 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015810 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015811 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015812#if HAVE_TZNAME
15813 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15814 exit(1);
15815#endif
Brett Cannon18367812003-09-19 00:59:16 +000015816
15817 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15818 tzset();
15819 if (localtime(&groundhogday)->tm_hour != 11)
15820 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015821#if HAVE_TZNAME
15822 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15823 exit(1);
15824#endif
15825
15826#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015827 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15828 exit(1);
15829 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15830 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015831#endif
Brett Cannon18367812003-09-19 00:59:16 +000015832
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015833 exit(0);
15834}
15835
15836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015837if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015838 ac_cv_working_tzset=yes
15839else
Matthias Kloseb9621712010-04-24 17:59:49 +000015840 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015844fi
15845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015846fi
15847
Matthias Kloseb9621712010-04-24 17:59:49 +000015848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15849$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015850if test "$ac_cv_working_tzset" = yes
15851then
15852
Matthias Kloseb9621712010-04-24 17:59:49 +000015853$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015854
15855fi
15856
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015857# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15859$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015860if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015861 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015862else
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015864/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015865#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015866int
15867main ()
15868{
15869
15870struct stat st;
15871st.st_mtim.tv_nsec = 1;
15872
15873 ;
15874 return 0;
15875}
15876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015877if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015878 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015879else
Matthias Kloseb9621712010-04-24 17:59:49 +000015880 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15883fi
15884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15886$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015887if test "$ac_cv_stat_tv_nsec" = yes
15888then
15889
Matthias Kloseb9621712010-04-24 17:59:49 +000015890$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015891
15892fi
15893
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015894# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15896$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015897if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015898 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015899else
Matthias Kloseb9621712010-04-24 17:59:49 +000015900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015901/* end confdefs.h. */
15902#include <sys/stat.h>
15903int
15904main ()
15905{
15906
15907struct stat st;
15908st.st_mtimespec.tv_nsec = 1;
15909
15910 ;
15911 return 0;
15912}
15913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015914if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015915 ac_cv_stat_tv_nsec2=yes
15916else
Matthias Kloseb9621712010-04-24 17:59:49 +000015917 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15920fi
15921
Matthias Kloseb9621712010-04-24 17:59:49 +000015922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15923$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015924if test "$ac_cv_stat_tv_nsec2" = yes
15925then
15926
Matthias Kloseb9621712010-04-24 17:59:49 +000015927$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015928
15929fi
15930
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015931# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015932ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015933if test "$cross_compiling" = no; then
15934 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15935fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015936
15937for ac_header in curses.h ncurses.h
15938do :
15939 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15940ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15941if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15942 cat >>confdefs.h <<_ACEOF
15943#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15944_ACEOF
15945
15946fi
15947
15948done
15949
15950
15951# On Solaris, term.h requires curses.h
15952for ac_header in term.h
15953do :
15954 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15955#ifdef HAVE_CURSES_H
15956#include <curses.h>
15957#endif
15958
15959"
15960if test "x$ac_cv_header_term_h" = xyes; then :
15961 cat >>confdefs.h <<_ACEOF
15962#define HAVE_TERM_H 1
15963_ACEOF
15964
15965fi
15966
15967done
15968
15969
Jack Jansen666b1e72001-10-31 12:11:48 +000015970# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15972$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015973if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015974 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015975else
Matthias Kloseb9621712010-04-24 17:59:49 +000015976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015977/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015978#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015979int
15980main ()
15981{
Jack Jansen666b1e72001-10-31 12:11:48 +000015982
15983 int rtn;
15984 rtn = mvwdelch(0,0,0);
15985
Martin v. Löwis11437992002-04-12 09:54:03 +000015986 ;
15987 return 0;
15988}
15989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015990if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015991 ac_cv_mvwdelch_is_expression=yes
15992else
Matthias Kloseb9621712010-04-24 17:59:49 +000015993 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15996fi
15997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15999$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016000
16001if test "$ac_cv_mvwdelch_is_expression" = yes
16002then
Martin v. Löwis11437992002-04-12 09:54:03 +000016003
Matthias Kloseb9621712010-04-24 17:59:49 +000016004$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016005
16006fi
16007
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016008# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16009# structs since version 5.7. If the macro is defined as zero before including
16010# [n]curses.h, ncurses will expose fields of the structs regardless of the
16011# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16013$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016014if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016015 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016016else
Matthias Kloseb9621712010-04-24 17:59:49 +000016017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016018/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016019
16020 #define NCURSES_OPAQUE 0
16021 #include <curses.h>
16022
Martin v. Löwis11437992002-04-12 09:54:03 +000016023int
16024main ()
16025{
Jack Jansen666b1e72001-10-31 12:11:48 +000016026
16027 WINDOW *w;
16028 w->_flags = 0;
16029
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 ;
16031 return 0;
16032}
16033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016034if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016035 ac_cv_window_has_flags=yes
16036else
Matthias Kloseb9621712010-04-24 17:59:49 +000016037 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16040fi
16041
Matthias Kloseb9621712010-04-24 17:59:49 +000016042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16043$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016044
Jack Jansen666b1e72001-10-31 12:11:48 +000016045
16046if test "$ac_cv_window_has_flags" = yes
16047then
Martin v. Löwis11437992002-04-12 09:54:03 +000016048
Matthias Kloseb9621712010-04-24 17:59:49 +000016049$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016050
16051fi
16052
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16054$as_echo_n "checking for is_pad... " >&6; }
16055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16056/* end confdefs.h. */
16057#include <curses.h>
16058int
16059main ()
16060{
16061
16062#ifndef is_pad
16063void *x=is_pad
16064#endif
16065
16066 ;
16067 return 0;
16068}
16069_ACEOF
16070if ac_fn_c_try_compile "$LINENO"; then :
16071
16072$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16073
16074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16075$as_echo "yes" >&6; }
16076else
16077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16078$as_echo "no" >&6; }
16079
16080fi
16081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16082
Matthias Kloseb9621712010-04-24 17:59:49 +000016083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16084$as_echo_n "checking for is_term_resized... " >&6; }
16085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016086/* end confdefs.h. */
16087#include <curses.h>
16088int
16089main ()
16090{
16091void *x=is_term_resized
16092 ;
16093 return 0;
16094}
16095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016096if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016097
Matthias Kloseb9621712010-04-24 17:59:49 +000016098$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016099
Matthias Kloseb159a552010-04-25 21:00:44 +000016100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016101$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016102else
Matthias Kloseb9621712010-04-24 17:59:49 +000016103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16104$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016105
16106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16108
Matthias Kloseb9621712010-04-24 17:59:49 +000016109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16110$as_echo_n "checking for resize_term... " >&6; }
16111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016112/* end confdefs.h. */
16113#include <curses.h>
16114int
16115main ()
16116{
16117void *x=resize_term
16118 ;
16119 return 0;
16120}
16121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016122if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016123
Matthias Kloseb9621712010-04-24 17:59:49 +000016124$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016125
Matthias Kloseb159a552010-04-25 21:00:44 +000016126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016127$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016128else
Matthias Kloseb9621712010-04-24 17:59:49 +000016129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16130$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016131
16132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16134
Matthias Kloseb9621712010-04-24 17:59:49 +000016135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16136$as_echo_n "checking for resizeterm... " >&6; }
16137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016138/* end confdefs.h. */
16139#include <curses.h>
16140int
16141main ()
16142{
16143void *x=resizeterm
16144 ;
16145 return 0;
16146}
16147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016148if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016149
Matthias Kloseb9621712010-04-24 17:59:49 +000016150$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016151
Matthias Kloseb159a552010-04-25 21:00:44 +000016152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016153$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016154else
Matthias Kloseb9621712010-04-24 17:59:49 +000016155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16156$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016157
16158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016160
16161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16162$as_echo_n "checking for immedok... " >&6; }
16163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16164/* end confdefs.h. */
16165#include <curses.h>
16166int
16167main ()
16168{
16169
16170#ifndef immedok
16171void *x=immedok
16172#endif
16173
16174 ;
16175 return 0;
16176}
16177_ACEOF
16178if ac_fn_c_try_compile "$LINENO"; then :
16179
16180$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16181
16182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16183$as_echo "yes" >&6; }
16184else
16185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16186$as_echo "no" >&6; }
16187
16188fi
16189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16190
16191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16192$as_echo_n "checking for syncok... " >&6; }
16193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16194/* end confdefs.h. */
16195#include <curses.h>
16196int
16197main ()
16198{
16199
16200#ifndef syncok
16201void *x=syncok
16202#endif
16203
16204 ;
16205 return 0;
16206}
16207_ACEOF
16208if ac_fn_c_try_compile "$LINENO"; then :
16209
16210$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16211
16212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16213$as_echo "yes" >&6; }
16214else
16215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16216$as_echo "no" >&6; }
16217
16218fi
16219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16220
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16222$as_echo_n "checking for wchgat... " >&6; }
16223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16224/* end confdefs.h. */
16225#include <curses.h>
16226int
16227main ()
16228{
16229
16230#ifndef wchgat
16231void *x=wchgat
16232#endif
16233
16234 ;
16235 return 0;
16236}
16237_ACEOF
16238if ac_fn_c_try_compile "$LINENO"; then :
16239
16240$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16241
16242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16243$as_echo "yes" >&6; }
16244else
16245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16246$as_echo "no" >&6; }
16247
16248fi
16249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16250
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16252$as_echo_n "checking for filter... " >&6; }
16253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16254/* end confdefs.h. */
16255#include <curses.h>
16256int
16257main ()
16258{
16259
16260#ifndef filter
16261void *x=filter
16262#endif
16263
16264 ;
16265 return 0;
16266}
16267_ACEOF
16268if ac_fn_c_try_compile "$LINENO"; then :
16269
16270$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16271
16272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16273$as_echo "yes" >&6; }
16274else
16275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16276$as_echo "no" >&6; }
16277
16278fi
16279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16280
16281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16282$as_echo_n "checking for has_key... " >&6; }
16283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16284/* end confdefs.h. */
16285#include <curses.h>
16286int
16287main ()
16288{
16289
16290#ifndef has_key
16291void *x=has_key
16292#endif
16293
16294 ;
16295 return 0;
16296}
16297_ACEOF
16298if ac_fn_c_try_compile "$LINENO"; then :
16299
16300$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16301
16302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16303$as_echo "yes" >&6; }
16304else
16305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16306$as_echo "no" >&6; }
16307
16308fi
16309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16310
16311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16312$as_echo_n "checking for typeahead... " >&6; }
16313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16314/* end confdefs.h. */
16315#include <curses.h>
16316int
16317main ()
16318{
16319
16320#ifndef typeahead
16321void *x=typeahead
16322#endif
16323
16324 ;
16325 return 0;
16326}
16327_ACEOF
16328if ac_fn_c_try_compile "$LINENO"; then :
16329
16330$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16331
16332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16333$as_echo "yes" >&6; }
16334else
16335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16336$as_echo "no" >&6; }
16337
16338fi
16339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16340
16341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16342$as_echo_n "checking for use_env... " >&6; }
16343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16344/* end confdefs.h. */
16345#include <curses.h>
16346int
16347main ()
16348{
16349
16350#ifndef use_env
16351void *x=use_env
16352#endif
16353
16354 ;
16355 return 0;
16356}
16357_ACEOF
16358if ac_fn_c_try_compile "$LINENO"; then :
16359
16360$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16361
16362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16363$as_echo "yes" >&6; }
16364else
16365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16366$as_echo "no" >&6; }
16367
16368fi
16369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016370# last curses configure check
16371CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016372
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16374$as_echo "$as_me: checking for device files" >&6;}
16375
16376if test "x$cross_compiling" = xyes; then
16377 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16379$as_echo_n "checking for /dev/ptmx... " >&6; }
16380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16381$as_echo "not set" >&6; }
16382 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16383 fi
16384 if test "${ac_cv_file__dev_ptc+set}" != set; then
16385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16386$as_echo_n "checking for /dev/ptc... " >&6; }
16387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16388$as_echo "not set" >&6; }
16389 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16390 fi
16391fi
16392
Matthias Kloseb9621712010-04-24 17:59:49 +000016393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16394$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016395if ${ac_cv_file__dev_ptmx+:} false; then :
16396 $as_echo_n "(cached) " >&6
16397else
16398 test "$cross_compiling" = yes &&
16399 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16400if test -r "/dev/ptmx"; then
16401 ac_cv_file__dev_ptmx=yes
16402else
16403 ac_cv_file__dev_ptmx=no
16404fi
16405fi
16406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16407$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16408if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016409
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016410fi
16411
16412if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016413
Matthias Kloseb9621712010-04-24 17:59:49 +000016414$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016415
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16418$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016419if ${ac_cv_file__dev_ptc+:} false; then :
16420 $as_echo_n "(cached) " >&6
16421else
16422 test "$cross_compiling" = yes &&
16423 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16424if test -r "/dev/ptc"; then
16425 ac_cv_file__dev_ptc=yes
16426else
16427 ac_cv_file__dev_ptc=no
16428fi
16429fi
16430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16431$as_echo "$ac_cv_file__dev_ptc" >&6; }
16432if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016433
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016434fi
16435
16436if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016437
Matthias Kloseb9621712010-04-24 17:59:49 +000016438$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016439
Neal Norwitz865400f2003-03-21 01:42:58 +000016440fi
16441
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016442if test $ac_sys_system = Darwin
16443then
16444 LIBS="$LIBS -framework CoreFoundation"
16445fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016446
Matthias Kloseb9621712010-04-24 17:59:49 +000016447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16448$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016449if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016450 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016451else
Matthias Kloseb9621712010-04-24 17:59:49 +000016452 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016453 ac_cv_have_size_t_format="cross -- assuming yes"
16454
Thomas Wouters477c8d52006-05-27 19:21:47 +000016455else
Matthias Kloseb9621712010-04-24 17:59:49 +000016456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016457/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016458
Thomas Wouters477c8d52006-05-27 19:21:47 +000016459#include <stdio.h>
16460#include <stddef.h>
16461#include <string.h>
16462
Christian Heimes2c181612007-12-17 20:04:13 +000016463#ifdef HAVE_SYS_TYPES_H
16464#include <sys/types.h>
16465#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016466
16467#ifdef HAVE_SSIZE_T
16468typedef ssize_t Py_ssize_t;
16469#elif SIZEOF_VOID_P == SIZEOF_LONG
16470typedef long Py_ssize_t;
16471#else
16472typedef int Py_ssize_t;
16473#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016474
Christian Heimes2c181612007-12-17 20:04:13 +000016475int main()
16476{
16477 char buffer[256];
16478
Thomas Wouters477c8d52006-05-27 19:21:47 +000016479 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16480 return 1;
16481
Thomas Wouters89f507f2006-12-13 04:49:30 +000016482 if (strcmp(buffer, "123"))
16483 return 1;
16484
16485 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16486 return 1;
16487
16488 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016489 return 1;
16490
16491 return 0;
16492}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016493
Thomas Wouters477c8d52006-05-27 19:21:47 +000016494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016495if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016496 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016497else
Matthias Kloseb9621712010-04-24 17:59:49 +000016498 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16501 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016502fi
16503
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16506$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016507if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016508
Matthias Kloseb9621712010-04-24 17:59:49 +000016509$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016510
16511fi
16512
Matthias Kloseb9621712010-04-24 17:59:49 +000016513ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016514#ifdef HAVE_SYS_TYPES_H
16515#include <sys/types.h>
16516#endif
16517#ifdef HAVE_SYS_SOCKET_H
16518#include <sys/socket.h>
16519#endif
16520
Matthias Kloseb9621712010-04-24 17:59:49 +000016521"
Victor Stinnere0be4232011-10-25 13:06:09 +020016522if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016523
Martin v. Löwis11437992002-04-12 09:54:03 +000016524else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016525
Matthias Kloseb9621712010-04-24 17:59:49 +000016526$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016527
16528fi
16529
Michael W. Hudson54241132001-12-07 15:38:26 +000016530
Matthias Kloseb9621712010-04-24 17:59:49 +000016531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16532$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016533if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016534 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016535else
Matthias Kloseb9621712010-04-24 17:59:49 +000016536 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016537 ac_cv_broken_mbstowcs=no
16538else
Matthias Kloseb9621712010-04-24 17:59:49 +000016539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016540/* end confdefs.h. */
16541
Stefan Krah19c21392012-11-22 23:47:32 +010016542#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016543#include<stdlib.h>
16544int main() {
16545 size_t len = -1;
16546 const char *str = "text";
16547 len = mbstowcs(NULL, str, 0);
16548 return (len != 4);
16549}
16550
16551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016552if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016553 ac_cv_broken_mbstowcs=no
16554else
Matthias Kloseb9621712010-04-24 17:59:49 +000016555 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16558 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016559fi
16560
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016561fi
16562
Matthias Kloseb9621712010-04-24 17:59:49 +000016563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16564$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016565if test "$ac_cv_broken_mbstowcs" = yes
16566then
16567
Matthias Kloseb9621712010-04-24 17:59:49 +000016568$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016569
16570fi
16571
Antoine Pitroub52ec782009-01-25 16:34:23 +000016572# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16574$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016575
16576# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016577if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016578 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016579if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016580then
16581
Matthias Kloseb9621712010-04-24 17:59:49 +000016582$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016583
Matthias Kloseb9621712010-04-24 17:59:49 +000016584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16585$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016586fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016587if test "$withval" = no
16588then
16589
16590$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16591
Matthias Kloseb9621712010-04-24 17:59:49 +000016592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16593$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016594fi
16595
Antoine Pitrou042b1282010-08-13 21:15:58 +000016596else
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16598$as_echo "no value specified" >&6; }
16599fi
16600
Antoine Pitroub52ec782009-01-25 16:34:23 +000016601
Matthias Kloseb17289e2012-03-15 19:51:34 +010016602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16603$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16604if ${ac_cv_computed_gotos+:} false; then :
16605 $as_echo_n "(cached) " >&6
16606else
16607 if test "$cross_compiling" = yes; then :
16608 if test "${with_computed_gotos+set}" = set; then
16609 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16610 else
16611 ac_cv_computed_gotos=no
16612 fi
16613else
16614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16615/* end confdefs.h. */
16616
16617int main(int argc, char **argv)
16618{
16619 static void *targets[1] = { &&LABEL1 };
16620 goto LABEL2;
16621LABEL1:
16622 return 0;
16623LABEL2:
16624 goto *targets[0];
16625 return 1;
16626}
16627
16628_ACEOF
16629if ac_fn_c_try_run "$LINENO"; then :
16630 ac_cv_computed_gotos=yes
16631else
16632 ac_cv_computed_gotos=no
16633fi
16634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16635 conftest.$ac_objext conftest.beam conftest.$ac_ext
16636fi
16637
16638fi
16639
16640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16641$as_echo "$ac_cv_computed_gotos" >&6; }
16642case "$ac_cv_computed_gotos" in yes*)
16643
16644$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16645
16646esac
16647
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016648case $ac_sys_system in
16649AIX*)
16650
16651$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16652 ;;
16653esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016654
Michael W. Hudson54241132001-12-07 15:38:26 +000016655
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016656
16657
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016658for h in `(cd $srcdir;echo Python/thread_*.h)`
16659do
16660 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16661done
16662
Michael W. Hudson54241132001-12-07 15:38:26 +000016663
Victor Stinner21a74a92019-04-11 22:28:12 +020016664SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16666$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016667for dir in $SRCDIRS; do
16668 if test ! -d $dir; then
16669 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016670 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016671done
Matthias Kloseb9621712010-04-24 17:59:49 +000016672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16673$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016674
Stefan Krah1919b7e2012-03-21 18:25:23 +010016675# Availability of -O2:
16676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16677$as_echo_n "checking for -O2... " >&6; }
16678saved_cflags="$CFLAGS"
16679CFLAGS="-O2"
16680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16681/* end confdefs.h. */
16682
16683int
16684main ()
16685{
16686
16687
16688 ;
16689 return 0;
16690}
16691_ACEOF
16692if ac_fn_c_try_compile "$LINENO"; then :
16693 have_O2=yes
16694else
16695 have_O2=no
16696fi
16697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16699$as_echo "$have_O2" >&6; }
16700CFLAGS="$saved_cflags"
16701
16702# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16703# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16705$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16706saved_cflags="$CFLAGS"
16707CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16708if test "$have_O2" = no; then
16709 CFLAGS=""
16710fi
16711if test "$cross_compiling" = yes; then :
16712 have_glibc_memmove_bug=undefined
16713else
16714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16715/* end confdefs.h. */
16716
16717#include <stdio.h>
16718#include <stdlib.h>
16719#include <string.h>
16720void foo(void *p, void *q) { memmove(p, q, 19); }
16721int main() {
16722 char a[32] = "123456789000000000";
16723 foo(&a[9], a);
16724 if (strcmp(a, "123456789123456789000000000") != 0)
16725 return 1;
16726 foo(a, &a[9]);
16727 if (strcmp(a, "123456789000000000") != 0)
16728 return 1;
16729 return 0;
16730}
16731
16732_ACEOF
16733if ac_fn_c_try_run "$LINENO"; then :
16734 have_glibc_memmove_bug=no
16735else
16736 have_glibc_memmove_bug=yes
16737fi
16738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16739 conftest.$ac_objext conftest.beam conftest.$ac_ext
16740fi
16741
16742CFLAGS="$saved_cflags"
16743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16744$as_echo "$have_glibc_memmove_bug" >&6; }
16745if test "$have_glibc_memmove_bug" = yes; then
16746
16747$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16748
16749fi
16750
16751if test "$have_gcc_asm_for_x87" = yes; then
16752 # Some versions of gcc miscompile inline asm:
16753 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16754 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16755 case $CC in
16756 *gcc*)
16757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16758$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16759 saved_cflags="$CFLAGS"
16760 CFLAGS="-O2"
16761 if test "$cross_compiling" = yes; then :
16762 have_ipa_pure_const_bug=undefined
16763else
16764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16765/* end confdefs.h. */
16766
16767 __attribute__((noinline)) int
16768 foo(int *p) {
16769 int r;
16770 asm ( "movl \$6, (%1)\n\t"
16771 "xorl %0, %0\n\t"
16772 : "=r" (r) : "r" (p) : "memory"
16773 );
16774 return r;
16775 }
16776 int main() {
16777 int p = 8;
16778 if ((foo(&p) ? : p) != 6)
16779 return 1;
16780 return 0;
16781 }
16782
16783_ACEOF
16784if ac_fn_c_try_run "$LINENO"; then :
16785 have_ipa_pure_const_bug=no
16786else
16787 have_ipa_pure_const_bug=yes
16788fi
16789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16790 conftest.$ac_objext conftest.beam conftest.$ac_ext
16791fi
16792
16793 CFLAGS="$saved_cflags"
16794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16795$as_echo "$have_ipa_pure_const_bug" >&6; }
16796 if test "$have_ipa_pure_const_bug" = yes; then
16797
16798$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16799
16800 fi
16801 ;;
16802 esac
16803fi
16804
Victor Stinner4f5366e2015-01-09 02:13:19 +010016805# Check for stdatomic.h
16806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16807$as_echo_n "checking for stdatomic.h... " >&6; }
16808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16809/* end confdefs.h. */
16810
16811
16812 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016813 atomic_int int_var;
16814 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016815 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016816 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16817 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16818 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016819 return 0;
16820 }
16821
16822
16823_ACEOF
16824if ac_fn_c_try_link "$LINENO"; then :
16825 have_stdatomic_h=yes
16826else
16827 have_stdatomic_h=no
16828fi
16829rm -f core conftest.err conftest.$ac_objext \
16830 conftest$ac_exeext conftest.$ac_ext
16831
16832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16833$as_echo "$have_stdatomic_h" >&6; }
16834
16835if test "$have_stdatomic_h" = yes; then
16836
16837$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16838
16839fi
16840
16841# Check for GCC >= 4.7 __atomic builtins
16842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16843$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16845/* end confdefs.h. */
16846
16847
16848 volatile int val = 1;
16849 int main() {
16850 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16851 return 0;
16852 }
16853
16854
16855_ACEOF
16856if ac_fn_c_try_link "$LINENO"; then :
16857 have_builtin_atomic=yes
16858else
16859 have_builtin_atomic=no
16860fi
16861rm -f core conftest.err conftest.$ac_objext \
16862 conftest$ac_exeext conftest.$ac_ext
16863
16864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16865$as_echo "$have_builtin_atomic" >&6; }
16866
16867if test "$have_builtin_atomic" = yes; then
16868
16869$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16870
16871fi
16872
Ned Deily322f5ba2013-11-21 23:01:59 -080016873# ensurepip option
16874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16875$as_echo_n "checking for ensurepip... " >&6; }
16876
16877# Check whether --with-ensurepip was given.
16878if test "${with_ensurepip+set}" = set; then :
16879 withval=$with_ensurepip;
16880else
16881 with_ensurepip=upgrade
16882fi
16883
16884case $with_ensurepip in #(
16885 yes|upgrade) :
16886 ENSUREPIP=upgrade ;; #(
16887 install) :
16888 ENSUREPIP=install ;; #(
16889 no) :
16890 ENSUREPIP=no ;; #(
16891 *) :
16892 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16893esac
16894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16895$as_echo "$ENSUREPIP" >&6; }
16896
16897
Victor Stinner35a97c02015-03-08 02:59:09 +010016898# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16900$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16902/* end confdefs.h. */
16903
16904
16905 #include <dirent.h>
16906
16907 int main() {
16908 struct dirent entry;
16909 return entry.d_type == DT_UNKNOWN;
16910 }
16911
16912
16913_ACEOF
16914if ac_fn_c_try_link "$LINENO"; then :
16915 have_dirent_d_type=yes
16916else
16917 have_dirent_d_type=no
16918fi
16919rm -f core conftest.err conftest.$ac_objext \
16920 conftest$ac_exeext conftest.$ac_ext
16921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16922$as_echo "$have_dirent_d_type" >&6; }
16923
16924if test "$have_dirent_d_type" = yes; then
16925
16926$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16927
16928fi
16929
Victor Stinner9eb57c52015-03-19 22:21:49 +010016930# check if the Linux getrandom() syscall is available
16931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16932$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16934/* end confdefs.h. */
16935
16936
Victor Stinner1b80b242016-04-12 22:34:58 +020016937 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016938 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016939 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016940
16941 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016942 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016943 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016944 const int flags = GRND_NONBLOCK;
16945 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016946 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016947 return 0;
16948 }
16949
16950
16951_ACEOF
16952if ac_fn_c_try_link "$LINENO"; then :
16953 have_getrandom_syscall=yes
16954else
16955 have_getrandom_syscall=no
16956fi
16957rm -f core conftest.err conftest.$ac_objext \
16958 conftest$ac_exeext conftest.$ac_ext
16959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16960$as_echo "$have_getrandom_syscall" >&6; }
16961
16962if test "$have_getrandom_syscall" = yes; then
16963
16964$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16965
16966fi
16967
Victor Stinner3abf44e2015-09-18 15:38:37 +020016968# check if the getrandom() function is available
16969# the test was written for the Solaris function of <sys/random.h>
16970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16971$as_echo_n "checking for the getrandom() function... " >&6; }
16972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16973/* end confdefs.h. */
16974
16975
16976 #include <sys/random.h>
16977
16978 int main() {
16979 char buffer[1];
16980 const size_t buflen = sizeof(buffer);
16981 const int flags = 0;
16982 /* ignore the result, Python checks for ENOSYS at runtime */
16983 (void)getrandom(buffer, buflen, flags);
16984 return 0;
16985 }
16986
16987
16988_ACEOF
16989if ac_fn_c_try_link "$LINENO"; then :
16990 have_getrandom=yes
16991else
16992 have_getrandom=no
16993fi
16994rm -f core conftest.err conftest.$ac_objext \
16995 conftest$ac_exeext conftest.$ac_ext
16996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16997$as_echo "$have_getrandom" >&6; }
16998
16999if test "$have_getrandom" = yes; then
17000
17001$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17002
17003fi
17004
Neil Schemenauer5741c452019-02-08 10:48:46 -080017005# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17006# shm_* may only be available if linking against librt
17007save_LIBS="$LIBS"
17008save_includes_default="$ac_includes_default"
17009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17010$as_echo_n "checking for library containing shm_open... " >&6; }
17011if ${ac_cv_search_shm_open+:} false; then :
17012 $as_echo_n "(cached) " >&6
17013else
17014 ac_func_search_save_LIBS=$LIBS
17015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17016/* end confdefs.h. */
17017
17018/* Override any GCC internal prototype to avoid an error.
17019 Use char because int might match the return type of a GCC
17020 builtin and then its argument prototype would still apply. */
17021#ifdef __cplusplus
17022extern "C"
17023#endif
17024char shm_open ();
17025int
17026main ()
17027{
17028return shm_open ();
17029 ;
17030 return 0;
17031}
17032_ACEOF
17033for ac_lib in '' rt; do
17034 if test -z "$ac_lib"; then
17035 ac_res="none required"
17036 else
17037 ac_res=-l$ac_lib
17038 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17039 fi
17040 if ac_fn_c_try_link "$LINENO"; then :
17041 ac_cv_search_shm_open=$ac_res
17042fi
17043rm -f core conftest.err conftest.$ac_objext \
17044 conftest$ac_exeext
17045 if ${ac_cv_search_shm_open+:} false; then :
17046 break
17047fi
17048done
17049if ${ac_cv_search_shm_open+:} false; then :
17050
17051else
17052 ac_cv_search_shm_open=no
17053fi
17054rm conftest.$ac_ext
17055LIBS=$ac_func_search_save_LIBS
17056fi
17057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17058$as_echo "$ac_cv_search_shm_open" >&6; }
17059ac_res=$ac_cv_search_shm_open
17060if test "$ac_res" != no; then :
17061 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17062
17063fi
17064
17065if test "$ac_cv_search_shm_open" = "-lrt"; then
17066
17067$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17068
17069fi
17070for ac_header in sys/mman.h
17071do :
17072 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17073if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17074 cat >>confdefs.h <<_ACEOF
17075#define HAVE_SYS_MMAN_H 1
17076_ACEOF
17077
17078fi
17079
17080done
17081
17082# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17083ac_includes_default="\
17084${ac_includes_default}
17085#ifndef __cplusplus
17086# ifdef HAVE_SYS_MMAN_H
17087# include <sys/mman.h>
17088# endif
17089#endif
17090"
17091for ac_func in shm_open shm_unlink
17092do :
17093 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17094ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17095if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17096 cat >>confdefs.h <<_ACEOF
17097#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17098_ACEOF
17099
17100fi
17101done
17102
17103# we don't want to link with librt always, restore LIBS
17104LIBS="$save_LIBS"
17105ac_includes_default="$save_includes_default"
17106
Christian Heimesff5be6e2018-01-20 13:19:21 +010017107# Check for usable OpenSSL
17108
17109 found=false
17110
17111# Check whether --with-openssl was given.
17112if test "${with_openssl+set}" = set; then :
17113 withval=$with_openssl;
17114 case "$withval" in
17115 "" | y | ye | yes | n | no)
17116 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17117 ;;
17118 *) ssldirs="$withval"
17119 ;;
17120 esac
17121
17122else
17123
17124 # if pkg-config is installed and openssl has installed a .pc file,
17125 # then use that information and don't search ssldirs
17126 if test -n "$ac_tool_prefix"; then
17127 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17128set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17130$as_echo_n "checking for $ac_word... " >&6; }
17131if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17132 $as_echo_n "(cached) " >&6
17133else
17134 if test -n "$PKG_CONFIG"; then
17135 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17136else
17137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17138for as_dir in $PATH
17139do
17140 IFS=$as_save_IFS
17141 test -z "$as_dir" && as_dir=.
17142 for ac_exec_ext in '' $ac_executable_extensions; do
17143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17144 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17146 break 2
17147 fi
17148done
17149 done
17150IFS=$as_save_IFS
17151
17152fi
17153fi
17154PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17155if test -n "$PKG_CONFIG"; then
17156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17157$as_echo "$PKG_CONFIG" >&6; }
17158else
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17160$as_echo "no" >&6; }
17161fi
17162
17163
17164fi
17165if test -z "$ac_cv_prog_PKG_CONFIG"; then
17166 ac_ct_PKG_CONFIG=$PKG_CONFIG
17167 # Extract the first word of "pkg-config", so it can be a program name with args.
17168set dummy pkg-config; ac_word=$2
17169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17170$as_echo_n "checking for $ac_word... " >&6; }
17171if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17172 $as_echo_n "(cached) " >&6
17173else
17174 if test -n "$ac_ct_PKG_CONFIG"; then
17175 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17176else
17177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17178for as_dir in $PATH
17179do
17180 IFS=$as_save_IFS
17181 test -z "$as_dir" && as_dir=.
17182 for ac_exec_ext in '' $ac_executable_extensions; do
17183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17184 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17186 break 2
17187 fi
17188done
17189 done
17190IFS=$as_save_IFS
17191
17192fi
17193fi
17194ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17195if test -n "$ac_ct_PKG_CONFIG"; then
17196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17197$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17198else
17199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17200$as_echo "no" >&6; }
17201fi
17202
17203 if test "x$ac_ct_PKG_CONFIG" = x; then
17204 PKG_CONFIG=""
17205 else
17206 case $cross_compiling:$ac_tool_warned in
17207yes:)
17208{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17209$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17210ac_tool_warned=yes ;;
17211esac
17212 PKG_CONFIG=$ac_ct_PKG_CONFIG
17213 fi
17214else
17215 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17216fi
17217
17218 if test x"$PKG_CONFIG" != x""; then
17219 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17220 if test $? = 0; then
17221 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17222 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17223 found=true
17224 fi
17225 fi
17226
17227 # no such luck; use some default ssldirs
17228 if ! $found; then
17229 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17230 fi
17231
17232
17233fi
17234
17235
17236
17237 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17238 # an 'openssl' subdirectory
17239
17240 if ! $found; then
17241 OPENSSL_INCLUDES=
17242 for ssldir in $ssldirs; do
17243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17244$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17245 if test -f "$ssldir/include/openssl/ssl.h"; then
17246 OPENSSL_INCLUDES="-I$ssldir/include"
17247 OPENSSL_LDFLAGS="-L$ssldir/lib"
17248 OPENSSL_LIBS="-lssl -lcrypto"
17249 found=true
17250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17251$as_echo "yes" >&6; }
17252 break
17253 else
17254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17255$as_echo "no" >&6; }
17256 fi
17257 done
17258
17259 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17260 # it will just work!
17261 fi
17262
17263 # try the preprocessor and linker with our new flags,
17264 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17265
17266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17267$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17268 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17269 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17270
17271 save_LIBS="$LIBS"
17272 save_LDFLAGS="$LDFLAGS"
17273 save_CPPFLAGS="$CPPFLAGS"
17274 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17275 LIBS="$OPENSSL_LIBS $LIBS"
17276 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17278/* end confdefs.h. */
17279#include <openssl/ssl.h>
17280int
17281main ()
17282{
17283SSL_new(NULL)
17284 ;
17285 return 0;
17286}
17287_ACEOF
17288if ac_fn_c_try_link "$LINENO"; then :
17289
17290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17291$as_echo "yes" >&6; }
17292 have_openssl=yes
17293
17294else
17295
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17297$as_echo "no" >&6; }
17298 have_openssl=no
17299
17300fi
17301rm -f core conftest.err conftest.$ac_objext \
17302 conftest$ac_exeext conftest.$ac_ext
17303 CPPFLAGS="$save_CPPFLAGS"
17304 LDFLAGS="$save_LDFLAGS"
17305 LIBS="$save_LIBS"
17306
17307
17308
17309
17310
17311
17312if test "$have_openssl" = yes; then
17313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17314$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17315
17316 save_LIBS="$LIBS"
17317 save_LDFLAGS="$LDFLAGS"
17318 save_CPPFLAGS="$CPPFLAGS"
17319 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17320 LIBS="$OPENSSL_LIBS $LIBS"
17321 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17322
17323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17324/* end confdefs.h. */
17325
17326 #include <openssl/x509_vfy.h>
17327
17328int
17329main ()
17330{
17331
17332 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17333 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17334 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17335 X509_VERIFY_PARAM_set_hostflags(p, 0);
17336
17337 ;
17338 return 0;
17339}
17340
17341_ACEOF
17342if ac_fn_c_try_link "$LINENO"; then :
17343
17344 ac_cv_has_x509_verify_param_set1_host=yes
17345
17346else
17347
17348 ac_cv_has_x509_verify_param_set1_host=no
17349
17350fi
17351rm -f core conftest.err conftest.$ac_objext \
17352 conftest$ac_exeext conftest.$ac_ext
17353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17354$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17355 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17356
17357$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17358
17359 fi
17360
17361 CPPFLAGS="$save_CPPFLAGS"
17362 LDFLAGS="$save_LDFLAGS"
17363 LIBS="$save_LIBS"
17364fi
17365
Christian Heimes892d66e2018-01-29 14:10:18 +010017366# ssl module default cipher suite string
17367
17368
17369
17370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17371$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17372
17373# Check whether --with-ssl-default-suites was given.
17374if test "${with_ssl_default_suites+set}" = set; then :
17375 withval=$with_ssl_default_suites;
17376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17377$as_echo "$withval" >&6; }
17378case "$withval" in
17379 python)
17380 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17381
17382 ;;
17383 openssl)
17384 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17385
17386 ;;
17387 *)
17388 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17389
17390 cat >>confdefs.h <<_ACEOF
17391#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17392_ACEOF
17393
17394 ;;
17395esac
17396
17397else
17398
17399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17400$as_echo "python" >&6; }
17401$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17402
17403
17404fi
17405
17406
17407
Guido van Rossum627b2d71993-12-24 10:39:16 +000017408# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017409ac_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 +000017410
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017411ac_config_files="$ac_config_files Modules/ld_so_aix"
17412
Martin v. Löwis11437992002-04-12 09:54:03 +000017413cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017414# This file is a shell script that caches the results of configure
17415# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017416# scripts and configure runs, see configure's option --config-cache.
17417# It is not useful on other systems. If it contains results you don't
17418# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017419#
Martin v. Löwis11437992002-04-12 09:54:03 +000017420# config.status only pays attention to the cache file if you give it
17421# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017422#
Skip Montanaro6dead952003-09-25 14:50:04 +000017423# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017424# loading this file, other *unset* `ac_cv_foo' will be assigned the
17425# following values.
17426
17427_ACEOF
17428
Guido van Rossumf78abae1997-01-21 22:02:36 +000017429# The following way of writing the cache mishandles newlines in values,
17430# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017432# Ultrix sh set writes to stderr and can't be redirected directly,
17433# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434(
17435 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17436 eval ac_val=\$$ac_var
17437 case $ac_val in #(
17438 *${as_nl}*)
17439 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017440 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17441$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442 esac
17443 case $ac_var in #(
17444 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017445 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17446 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017447 esac ;;
17448 esac
17449 done
17450
Martin v. Löwis11437992002-04-12 09:54:03 +000017451 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17453 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017454 # `set' does not quote correctly, so add quotes: double-quote
17455 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017456 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017457 "s/'/'\\\\''/g;
17458 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017459 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017460 *)
17461 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017463 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017464 esac |
17465 sort
17466) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017467 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017468 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017469 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017471 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17472 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017473 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17474 :end' >>confcache
17475if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17476 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017477 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017478 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17479$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017480 if test ! -f "$cache_file" || test -h "$cache_file"; then
17481 cat confcache >"$cache_file"
17482 else
17483 case $cache_file in #(
17484 */* | ?:*)
17485 mv -f confcache "$cache_file"$$ &&
17486 mv -f "$cache_file"$$ "$cache_file" ;; #(
17487 *)
17488 mv -f confcache "$cache_file" ;;
17489 esac
17490 fi
17491 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017492 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017493 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17494$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017495 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017496fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017497rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017498
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017499test "x$prefix" = xNONE && prefix=$ac_default_prefix
17500# Let make expand exec_prefix.
17501test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017502
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017503DEFS=-DHAVE_CONFIG_H
17504
Skip Montanaro6dead952003-09-25 14:50:04 +000017505ac_libobjs=
17506ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017507U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017508for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17509 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017511 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017512 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17513 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017514 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17515 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017516done
17517LIBOBJS=$ac_libobjs
17518
17519LTLIBOBJS=$ac_ltlibobjs
17520
17521
Martin v. Löwis11437992002-04-12 09:54:03 +000017522
Matthias Kloseb9621712010-04-24 17:59:49 +000017523
Victor Stinnere0be4232011-10-25 13:06:09 +020017524: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017525ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017526ac_clean_files_save=$ac_clean_files
17527ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017528{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17529$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17530as_write_fail=0
17531cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017532#! $SHELL
17533# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017534# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017535# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017536# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017537
Martin v. Löwis11437992002-04-12 09:54:03 +000017538debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017539ac_cs_recheck=false
17540ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017541
Matthias Kloseb9621712010-04-24 17:59:49 +000017542SHELL=\${CONFIG_SHELL-$SHELL}
17543export SHELL
17544_ASEOF
17545cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17546## -------------------- ##
17547## M4sh Initialization. ##
17548## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017550# Be more Bourne compatible
17551DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017552if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017553 emulate sh
17554 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017555 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017556 # is contrary to our usage. Disable this feature.
17557 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017559else
Matthias Kloseb9621712010-04-24 17:59:49 +000017560 case `(set -o) 2>/dev/null` in #(
17561 *posix*) :
17562 set -o posix ;; #(
17563 *) :
17564 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017566fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017567
17568
Matthias Kloseb9621712010-04-24 17:59:49 +000017569as_nl='
17570'
17571export as_nl
17572# Printing a long string crashes Solaris 7 /usr/bin/printf.
17573as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17574as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17575as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17576# Prefer a ksh shell builtin over an external printf program on Solaris,
17577# but without wasting forks for bash or zsh.
17578if test -z "$BASH_VERSION$ZSH_VERSION" \
17579 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17580 as_echo='print -r --'
17581 as_echo_n='print -rn --'
17582elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17583 as_echo='printf %s\n'
17584 as_echo_n='printf %s'
17585else
17586 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17587 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17588 as_echo_n='/usr/ucb/echo -n'
17589 else
17590 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17591 as_echo_n_body='eval
17592 arg=$1;
17593 case $arg in #(
17594 *"$as_nl"*)
17595 expr "X$arg" : "X\\(.*\\)$as_nl";
17596 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17597 esac;
17598 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17599 '
17600 export as_echo_n_body
17601 as_echo_n='sh -c $as_echo_n_body as_echo'
17602 fi
17603 export as_echo_body
17604 as_echo='sh -c $as_echo_body as_echo'
17605fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017606
17607# The user is always right.
17608if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017609 PATH_SEPARATOR=:
17610 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17611 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17612 PATH_SEPARATOR=';'
17613 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017616
17617# IFS
17618# We need space, tab and new line, in precisely that order. Quoting is
17619# there to prevent editors from complaining about space-tab.
17620# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17621# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622IFS=" "" $as_nl"
17623
17624# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017625as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017626case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017627 *[\\/]* ) as_myself=$0 ;;
17628 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017629for as_dir in $PATH
17630do
17631 IFS=$as_save_IFS
17632 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017633 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17634 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017637 ;;
17638esac
17639# We did not find ourselves, most probably we were run as `sh COMMAND'
17640# in which case we are not to be found in the path.
17641if test "x$as_myself" = x; then
17642 as_myself=$0
17643fi
17644if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017645 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17646 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647fi
17648
Matthias Kloseb9621712010-04-24 17:59:49 +000017649# Unset variables that we do not need and which cause bugs (e.g. in
17650# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17651# suppresses any "Segmentation fault" message there. '((' could
17652# trigger a bug in pdksh 5.2.14.
17653for as_var in BASH_ENV ENV MAIL MAILPATH
17654do eval test x\${$as_var+set} = xset \
17655 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017656done
17657PS1='$ '
17658PS2='> '
17659PS4='+ '
17660
17661# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017662LC_ALL=C
17663export LC_ALL
17664LANGUAGE=C
17665export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666
Matthias Kloseb9621712010-04-24 17:59:49 +000017667# CDPATH.
17668(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17669
17670
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017671# as_fn_error STATUS ERROR [LINENO LOG_FD]
17672# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017673# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17674# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017675# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017676as_fn_error ()
17677{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017678 as_status=$1; test $as_status -eq 0 && as_status=1
17679 if test "$4"; then
17680 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17681 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017682 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017683 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017684 as_fn_exit $as_status
17685} # as_fn_error
17686
17687
17688# as_fn_set_status STATUS
17689# -----------------------
17690# Set $? to STATUS, without forking.
17691as_fn_set_status ()
17692{
17693 return $1
17694} # as_fn_set_status
17695
17696# as_fn_exit STATUS
17697# -----------------
17698# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17699as_fn_exit ()
17700{
17701 set +e
17702 as_fn_set_status $1
17703 exit $1
17704} # as_fn_exit
17705
17706# as_fn_unset VAR
17707# ---------------
17708# Portably unset VAR.
17709as_fn_unset ()
17710{
17711 { eval $1=; unset $1;}
17712}
17713as_unset=as_fn_unset
17714# as_fn_append VAR VALUE
17715# ----------------------
17716# Append the text in VALUE to the end of the definition contained in VAR. Take
17717# advantage of any shell optimizations that allow amortized linear growth over
17718# repeated appends, instead of the typical quadratic growth present in naive
17719# implementations.
17720if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17721 eval 'as_fn_append ()
17722 {
17723 eval $1+=\$2
17724 }'
17725else
17726 as_fn_append ()
17727 {
17728 eval $1=\$$1\$2
17729 }
17730fi # as_fn_append
17731
17732# as_fn_arith ARG...
17733# ------------------
17734# Perform arithmetic evaluation on the ARGs, and store the result in the
17735# global $as_val. Take advantage of shells that can avoid forks. The arguments
17736# must be portable across $(()) and expr.
17737if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17738 eval 'as_fn_arith ()
17739 {
17740 as_val=$(( $* ))
17741 }'
17742else
17743 as_fn_arith ()
17744 {
17745 as_val=`expr "$@" || test $? -eq 1`
17746 }
17747fi # as_fn_arith
17748
17749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750if expr a : '\(a\)' >/dev/null 2>&1 &&
17751 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17752 as_expr=expr
17753else
17754 as_expr=false
17755fi
17756
17757if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17758 as_basename=basename
17759else
17760 as_basename=false
17761fi
17762
Matthias Kloseb9621712010-04-24 17:59:49 +000017763if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17764 as_dirname=dirname
17765else
17766 as_dirname=false
17767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769as_me=`$as_basename -- "$0" ||
17770$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17771 X"$0" : 'X\(//\)$' \| \
17772 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017773$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774 sed '/^.*\/\([^/][^/]*\)\/*$/{
17775 s//\1/
17776 q
17777 }
17778 /^X\/\(\/\/\)$/{
17779 s//\1/
17780 q
17781 }
17782 /^X\/\(\/\).*/{
17783 s//\1/
17784 q
17785 }
17786 s/.*/./; q'`
17787
Matthias Kloseb9621712010-04-24 17:59:49 +000017788# Avoid depending upon Character Ranges.
17789as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17790as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17791as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17792as_cr_digits='0123456789'
17793as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794
17795ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017796case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017798 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017800 xy) ECHO_C='\c';;
17801 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17802 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803 esac;;
17804*)
17805 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017806esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017807
Martin v. Löwis11437992002-04-12 09:54:03 +000017808rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809if test -d conf$$.dir; then
17810 rm -f conf$$.dir/conf$$.file
17811else
17812 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017813 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017815if (echo >conf$$.file) 2>/dev/null; then
17816 if ln -s conf$$.file conf$$ 2>/dev/null; then
17817 as_ln_s='ln -s'
17818 # ... but there are two gotchas:
17819 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17820 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017821 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017822 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017823 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017824 elif ln conf$$.file conf$$ 2>/dev/null; then
17825 as_ln_s=ln
17826 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017827 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017828 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017829else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017830 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17833rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017834
Matthias Kloseb9621712010-04-24 17:59:49 +000017835
17836# as_fn_mkdir_p
17837# -------------
17838# Create "$as_dir" as a directory, including parents if necessary.
17839as_fn_mkdir_p ()
17840{
17841
17842 case $as_dir in #(
17843 -*) as_dir=./$as_dir;;
17844 esac
17845 test -d "$as_dir" || eval $as_mkdir_p || {
17846 as_dirs=
17847 while :; do
17848 case $as_dir in #(
17849 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17850 *) as_qdir=$as_dir;;
17851 esac
17852 as_dirs="'$as_qdir' $as_dirs"
17853 as_dir=`$as_dirname -- "$as_dir" ||
17854$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17855 X"$as_dir" : 'X\(//\)[^/]' \| \
17856 X"$as_dir" : 'X\(//\)$' \| \
17857 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17858$as_echo X"$as_dir" |
17859 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17860 s//\1/
17861 q
17862 }
17863 /^X\(\/\/\)[^/].*/{
17864 s//\1/
17865 q
17866 }
17867 /^X\(\/\/\)$/{
17868 s//\1/
17869 q
17870 }
17871 /^X\(\/\).*/{
17872 s//\1/
17873 q
17874 }
17875 s/.*/./; q'`
17876 test -d "$as_dir" && break
17877 done
17878 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017879 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017880
17881
17882} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017883if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017884 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017885else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017886 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017887 as_mkdir_p=false
17888fi
17889
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017890
17891# as_fn_executable_p FILE
17892# -----------------------
17893# Test if FILE is an executable regular file.
17894as_fn_executable_p ()
17895{
17896 test -f "$1" && test -x "$1"
17897} # as_fn_executable_p
17898as_test_x='test -x'
17899as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017900
17901# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017902as_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 +000017903
17904# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017905as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017906
17907
Martin v. Löwis11437992002-04-12 09:54:03 +000017908exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017909## ----------------------------------- ##
17910## Main body of $CONFIG_STATUS script. ##
17911## ----------------------------------- ##
17912_ASEOF
17913test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017914
Matthias Kloseb9621712010-04-24 17:59:49 +000017915cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17916# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017917# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017918# values after options handling.
17919ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017920This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017921generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017922
17923 CONFIG_FILES = $CONFIG_FILES
17924 CONFIG_HEADERS = $CONFIG_HEADERS
17925 CONFIG_LINKS = $CONFIG_LINKS
17926 CONFIG_COMMANDS = $CONFIG_COMMANDS
17927 $ $0 $@
17928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017929on `(hostname || uname -n) 2>/dev/null | sed 1q`
17930"
17931
Martin v. Löwis11437992002-04-12 09:54:03 +000017932_ACEOF
17933
Matthias Kloseb9621712010-04-24 17:59:49 +000017934case $ac_config_files in *"
17935"*) set x $ac_config_files; shift; ac_config_files=$*;;
17936esac
17937
17938case $ac_config_headers in *"
17939"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17940esac
17941
17942
17943cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017944# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017945config_files="$ac_config_files"
17946config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017948_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017949
Matthias Kloseb9621712010-04-24 17:59:49 +000017950cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017951ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017952\`$as_me' instantiates files and other configuration actions
17953from templates according to the current configuration. Unless the files
17954and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017955
Matthias Kloseb9621712010-04-24 17:59:49 +000017956Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017957
17958 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017959 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017960 --config print configuration, then exit
17961 -q, --quiet, --silent
17962 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017963 -d, --debug don't remove temporary files
17964 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017965 --file=FILE[:TEMPLATE]
17966 instantiate the configuration file FILE
17967 --header=FILE[:TEMPLATE]
17968 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017969
17970Configuration files:
17971$config_files
17972
17973Configuration headers:
17974$config_headers
17975
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017976Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017979cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17980ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017981ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017982python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017983configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017984 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017985
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017986Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017987This config.status script is free software; the Free Software Foundation
17988gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017989
17990ac_pwd='$ac_pwd'
17991srcdir='$srcdir'
17992INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017993MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017994test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017995_ACEOF
17996
Matthias Kloseb9621712010-04-24 17:59:49 +000017997cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17998# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017999ac_need_defaults=:
18000while test $# != 0
18001do
18002 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018003 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018004 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18005 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018006 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018008 --*=)
18009 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18010 ac_optarg=
18011 ac_shift=:
18012 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018013 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018014 ac_option=$1
18015 ac_optarg=$2
18016 ac_shift=shift
18017 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018018 esac
18019
Skip Montanaro6dead952003-09-25 14:50:04 +000018020 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018021 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018022 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18023 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018024 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018025 $as_echo "$ac_cs_version"; exit ;;
18026 --config | --confi | --conf | --con | --co | --c )
18027 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018028 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018029 debug=: ;;
18030 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018031 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018032 case $ac_optarg in
18033 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018034 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018035 esac
18036 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018037 ac_need_defaults=false;;
18038 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018039 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018040 case $ac_optarg in
18041 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18042 esac
18043 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018044 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045 --he | --h)
18046 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018047 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018048Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018050 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018051 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18052 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18053 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018054
18055 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018056 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018057Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018058
Matthias Kloseb9621712010-04-24 17:59:49 +000018059 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018061
18062 esac
18063 shift
18064done
18065
Skip Montanaro6dead952003-09-25 14:50:04 +000018066ac_configure_extra_args=
18067
18068if $ac_cs_silent; then
18069 exec 6>/dev/null
18070 ac_configure_extra_args="$ac_configure_extra_args --silent"
18071fi
18072
18073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018075if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018076 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018077 shift
18078 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18079 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018080 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018081 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018082fi
18083
Martin v. Löwis11437992002-04-12 09:54:03 +000018084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018085cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018086exec 5>>config.log
18087{
18088 echo
18089 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18090## Running $as_me. ##
18091_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018092 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018096cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018097_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018098
Matthias Kloseb9621712010-04-24 17:59:49 +000018099cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100
18101# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018102for ac_config_target in $ac_config_targets
18103do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104 case $ac_config_target in
18105 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18106 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18107 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018108 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18109 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018110 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018111 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018112 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018113 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018114 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115
Victor Stinnere0be4232011-10-25 13:06:09 +020018116 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018117 esac
18118done
18119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120
Martin v. Löwis11437992002-04-12 09:54:03 +000018121# If the user did not use the arguments to specify the items to instantiate,
18122# then the envvar interface is used. Set only those that are not.
18123# We use the long form for the default assignment because of an extremely
18124# bizarre bug on SunOS 4.1.3.
18125if $ac_need_defaults; then
18126 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18127 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18128fi
18129
Skip Montanaro6dead952003-09-25 14:50:04 +000018130# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018132# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018133# Hook for its removal unless debugging.
18134# Note that there is a small window in which the directory will not be cleaned:
18135# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018136$debug ||
18137{
Victor Stinnere0be4232011-10-25 13:06:09 +020018138 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018139 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018140 : "${ac_tmp:=$tmp}"
18141 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018142' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018143 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018144}
Martin v. Löwis11437992002-04-12 09:54:03 +000018145# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018146
Martin v. Löwis11437992002-04-12 09:54:03 +000018147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018149 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018150} ||
18151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152 tmp=./conf$$-$RANDOM
18153 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018154} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018155ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018156
Matthias Kloseb9621712010-04-24 17:59:49 +000018157# Set up the scripts for CONFIG_FILES section.
18158# No need to generate them if there are no CONFIG_FILES.
18159# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018161
Matthias Kloseb9621712010-04-24 17:59:49 +000018162
18163ac_cr=`echo X | tr X '\015'`
18164# On cygwin, bash can eat \r inside `` if the user requested igncr.
18165# But we know of no other shell where ac_cr would be empty at this
18166# point, so we can use a bashism as a fallback.
18167if test "x$ac_cr" = x; then
18168 eval ac_cr=\$\'\\r\'
18169fi
18170ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18171if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018172 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018173else
18174 ac_cs_awk_cr=$ac_cr
18175fi
18176
Victor Stinnere0be4232011-10-25 13:06:09 +020018177echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018178_ACEOF
18179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018180
Matthias Kloseb9621712010-04-24 17:59:49 +000018181{
18182 echo "cat >conf$$subs.awk <<_ACEOF" &&
18183 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18184 echo "_ACEOF"
18185} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018186 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18187ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018188ac_delim='%!_!# '
18189for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018190 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018191 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018192
Matthias Kloseb9621712010-04-24 17:59:49 +000018193 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18194 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195 break
18196 elif $ac_last_try; then
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 else
18199 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018200 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201done
Matthias Kloseb9621712010-04-24 17:59:49 +000018202rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018203
Matthias Kloseb9621712010-04-24 17:59:49 +000018204cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018205cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018207sed -n '
18208h
18209s/^/S["/; s/!.*/"]=/
18210p
18211g
18212s/^[^!]*!//
18213:repl
18214t repl
18215s/'"$ac_delim"'$//
18216t delim
18217:nl
18218h
18219s/\(.\{148\}\)..*/\1/
18220t more1
18221s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18222p
18223n
18224b repl
18225:more1
18226s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18227p
18228g
18229s/.\{148\}//
18230t nl
18231:delim
18232h
18233s/\(.\{148\}\)..*/\1/
18234t more2
18235s/["\\]/\\&/g; s/^/"/; s/$/"/
18236p
18237b
18238:more2
18239s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18240p
18241g
18242s/.\{148\}//
18243t delim
18244' <conf$$subs.awk | sed '
18245/^[^""]/{
18246 N
18247 s/\n//
18248}
18249' >>$CONFIG_STATUS || ac_write_fail=1
18250rm -f conf$$subs.awk
18251cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18252_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018253cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018254 for (key in S) S_is_set[key] = 1
18255 FS = ""
18256
18257}
18258{
18259 line = $ 0
18260 nfields = split(line, field, "@")
18261 substed = 0
18262 len = length(field[1])
18263 for (i = 2; i < nfields; i++) {
18264 key = field[i]
18265 keylen = length(key)
18266 if (S_is_set[key]) {
18267 value = S[key]
18268 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18269 len += length(value) + length(field[++i])
18270 substed = 1
18271 } else
18272 len += 1 + keylen
18273 }
18274
18275 print line
18276}
18277
18278_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018280cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18281if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18282 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18283else
18284 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018285fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018286 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018287_ACEOF
18288
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018289# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18290# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018291# trailing colons and then remove the whole line if VPATH becomes empty
18292# (actually we leave an empty line to preserve line numbers).
18293if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018294 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18295h
18296s///
18297s/^/:/
18298s/[ ]*$/:/
18299s/:\$(srcdir):/:/g
18300s/:\${srcdir}:/:/g
18301s/:@srcdir@:/:/g
18302s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018303s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018304x
18305s/\(=[ ]*\).*/\1/
18306G
18307s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018308s/^[^=]*=[ ]*$//
18309}'
18310fi
18311
Matthias Kloseb9621712010-04-24 17:59:49 +000018312cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018313fi # test -n "$CONFIG_FILES"
18314
Matthias Kloseb9621712010-04-24 17:59:49 +000018315# Set up the scripts for CONFIG_HEADERS section.
18316# No need to generate them if there are no CONFIG_HEADERS.
18317# This happens for instance with `./config.status Makefile'.
18318if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018319cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018320BEGIN {
18321_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018322
Matthias Kloseb9621712010-04-24 17:59:49 +000018323# Transform confdefs.h into an awk script `defines.awk', embedded as
18324# here-document in config.status, that substitutes the proper values into
18325# config.h.in to produce config.h.
18326
18327# Create a delimiter string that does not exist in confdefs.h, to ease
18328# handling of long lines.
18329ac_delim='%!_!# '
18330for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018331 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18332 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018333 break
18334 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018335 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018336 else
18337 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18338 fi
18339done
18340
18341# For the awk script, D is an array of macro values keyed by name,
18342# likewise P contains macro parameters if any. Preserve backslash
18343# newline sequences.
18344
18345ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18346sed -n '
18347s/.\{148\}/&'"$ac_delim"'/g
18348t rset
18349:rset
18350s/^[ ]*#[ ]*define[ ][ ]*/ /
18351t def
18352d
18353:def
18354s/\\$//
18355t bsnl
18356s/["\\]/\\&/g
18357s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18358D["\1"]=" \3"/p
18359s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18360d
18361:bsnl
18362s/["\\]/\\&/g
18363s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18364D["\1"]=" \3\\\\\\n"\\/p
18365t cont
18366s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18367t cont
18368d
18369:cont
18370n
18371s/.\{148\}/&'"$ac_delim"'/g
18372t clear
18373:clear
18374s/\\$//
18375t bsnlc
18376s/["\\]/\\&/g; s/^/"/; s/$/"/p
18377d
18378:bsnlc
18379s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18380b cont
18381' <confdefs.h | sed '
18382s/'"$ac_delim"'/"\\\
18383"/g' >>$CONFIG_STATUS || ac_write_fail=1
18384
18385cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18386 for (key in D) D_is_set[key] = 1
18387 FS = ""
18388}
18389/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18390 line = \$ 0
18391 split(line, arg, " ")
18392 if (arg[1] == "#") {
18393 defundef = arg[2]
18394 mac1 = arg[3]
18395 } else {
18396 defundef = substr(arg[1], 2)
18397 mac1 = arg[2]
18398 }
18399 split(mac1, mac2, "(") #)
18400 macro = mac2[1]
18401 prefix = substr(line, 1, index(line, defundef) - 1)
18402 if (D_is_set[macro]) {
18403 # Preserve the white space surrounding the "#".
18404 print prefix "define", macro P[macro] D[macro]
18405 next
18406 } else {
18407 # Replace #undef with comments. This is necessary, for example,
18408 # in the case of _POSIX_SOURCE, which is predefined and required
18409 # on some systems where configure will not decide to define it.
18410 if (defundef == "undef") {
18411 print "/*", prefix defundef, macro, "*/"
18412 next
18413 }
18414 }
18415}
18416{ print }
18417_ACAWK
18418_ACEOF
18419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018420 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018421fi # test -n "$CONFIG_HEADERS"
18422
18423
18424eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18425shift
18426for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018427do
18428 case $ac_tag in
18429 :[FHLC]) ac_mode=$ac_tag; continue;;
18430 esac
18431 case $ac_mode$ac_tag in
18432 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018433 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018434 :[FH]-) ac_tag=-:-;;
18435 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18436 esac
18437 ac_save_IFS=$IFS
18438 IFS=:
18439 set x $ac_tag
18440 IFS=$ac_save_IFS
18441 shift
18442 ac_file=$1
18443 shift
18444
18445 case $ac_mode in
18446 :L) ac_source=$1;;
18447 :[FH])
18448 ac_file_inputs=
18449 for ac_f
18450 do
18451 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018452 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018453 *) # Look for the file first in the build tree, then in the source tree
18454 # (if the path is not absolute). The absolute path cannot be DOS-style,
18455 # because $ac_f cannot contain `:'.
18456 test -f "$ac_f" ||
18457 case $ac_f in
18458 [\\/$]*) false;;
18459 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18460 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018461 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018462 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018463 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18464 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018465 done
18466
18467 # Let's still pretend it is `configure' which instantiates (i.e., don't
18468 # use $as_me), people would be surprised to read:
18469 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018470 configure_input='Generated from '`
18471 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18472 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018473 if test x"$ac_file" != x-; then
18474 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018475 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18476$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018478 # Neutralize special characters interpreted by sed in replacement strings.
18479 case $configure_input in #(
18480 *\&* | *\|* | *\\* )
18481 ac_sed_conf_input=`$as_echo "$configure_input" |
18482 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18483 *) ac_sed_conf_input=$configure_input;;
18484 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485
18486 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018487 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18488 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018489 esac
18490 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018491 esac
18492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018493 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018494$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018495 X"$ac_file" : 'X\(//\)[^/]' \| \
18496 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018498$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018499 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18500 s//\1/
18501 q
18502 }
18503 /^X\(\/\/\)[^/].*/{
18504 s//\1/
18505 q
18506 }
18507 /^X\(\/\/\)$/{
18508 s//\1/
18509 q
18510 }
18511 /^X\(\/\).*/{
18512 s//\1/
18513 q
18514 }
18515 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018516 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018517 ac_builddir=.
18518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018519case "$ac_dir" in
18520.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18521*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018522 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018524 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525 case $ac_top_builddir_sub in
18526 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18527 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18528 esac ;;
18529esac
18530ac_abs_top_builddir=$ac_pwd
18531ac_abs_builddir=$ac_pwd$ac_dir_suffix
18532# for backward compatibility:
18533ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018534
18535case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018536 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018537 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018538 ac_top_srcdir=$ac_top_builddir_sub
18539 ac_abs_top_srcdir=$ac_pwd ;;
18540 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018541 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018542 ac_top_srcdir=$srcdir
18543 ac_abs_top_srcdir=$srcdir ;;
18544 *) # Relative name.
18545 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18546 ac_top_srcdir=$ac_top_build_prefix$srcdir
18547 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018548esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018549ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018550
Martin v. Löwis11437992002-04-12 09:54:03 +000018551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018552 case $ac_mode in
18553 :F)
18554 #
18555 # CONFIG_FILE
18556 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018557
18558 case $INSTALL in
18559 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018560 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018561 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018562 ac_MKDIR_P=$MKDIR_P
18563 case $MKDIR_P in
18564 [\\/$]* | ?:[\\/]* ) ;;
18565 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18566 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018568
Matthias Kloseb9621712010-04-24 17:59:49 +000018569cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018570# If the template does not know about datarootdir, expand it.
18571# FIXME: This hack should be removed a few years after 2.60.
18572ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018573ac_sed_dataroot='
18574/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575 p
18576 q
18577}
18578/@datadir@/p
18579/@docdir@/p
18580/@infodir@/p
18581/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018582/@mandir@/p'
18583case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584*datarootdir*) ac_datarootdir_seen=yes;;
18585*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018586 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18587$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018589cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018590 ac_datarootdir_hack='
18591 s&@datadir@&$datadir&g
18592 s&@docdir@&$docdir&g
18593 s&@infodir@&$infodir&g
18594 s&@localedir@&$localedir&g
18595 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018596 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018597esac
18598_ACEOF
18599
18600# Neutralize VPATH when `$srcdir' = `.'.
18601# Shell code in configure.ac might set extrasub.
18602# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018603cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18604ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018605$extrasub
18606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018607cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018608:t
18609/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018610s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018612s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018613s&@srcdir@&$ac_srcdir&;t t
18614s&@abs_srcdir@&$ac_abs_srcdir&;t t
18615s&@top_srcdir@&$ac_top_srcdir&;t t
18616s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18617s&@builddir@&$ac_builddir&;t t
18618s&@abs_builddir@&$ac_abs_builddir&;t t
18619s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18620s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018621s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018622$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018623"
Victor Stinnere0be4232011-10-25 13:06:09 +020018624eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18625 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018627test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018628 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18629 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18630 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018631 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018632which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018633$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018634which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018635
Victor Stinnere0be4232011-10-25 13:06:09 +020018636 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018637 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018638 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18639 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018640 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018641 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018642 ;;
18643 :H)
18644 #
18645 # CONFIG_HEADER
18646 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018647 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018648 {
18649 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018650 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18651 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018652 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018653 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018654 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18655$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018656 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018657 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018658 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018659 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018660 fi
18661 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018662 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018663 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018664 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018665 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018666 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018668
18669 esac
18670
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018671
18672 case $ac_file$ac_mode in
18673 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18674
18675 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018676done # for ac_tag
18677
Guido van Rossum627b2d71993-12-24 10:39:16 +000018678
Matthias Kloseb9621712010-04-24 17:59:49 +000018679as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018680_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018681ac_clean_files=$ac_clean_files_save
18682
Matthias Kloseb9621712010-04-24 17:59:49 +000018683test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018684 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018685
Martin v. Löwis11437992002-04-12 09:54:03 +000018686
18687# configure is writing to config.log, and then calls config.status.
18688# config.status does its own redirection, appending to config.log.
18689# Unfortunately, on DOS this fails, as config.log is still kept open
18690# by configure, so config.status won't be able to write to it; its
18691# output is simply discarded. So we exec the FD to /dev/null,
18692# effectively closing config.log, so it can be properly (re)opened and
18693# appended to by config.status. When coming back to configure, we
18694# need to make the FD available again.
18695if test "$no_create" != yes; then
18696 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018697 ac_config_status_args=
18698 test "$silent" = yes &&
18699 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018700 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018701 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018702 exec 5>>config.log
18703 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18704 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018705 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018706fi
18707if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18708 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18709$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018710fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018711
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018712
Christian Heimes75ed8902013-11-20 01:11:18 +010018713echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018714if test ! -f Modules/Setup.local
18715then
18716 echo "# Edit this file for local setup changes" >Modules/Setup.local
18717fi
18718
Christian Heimes75ed8902013-11-20 01:11:18 +010018719echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018720$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018721 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018722 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018723mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018724
18725if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18726 echo "" >&6
18727 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018728 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 +000018729 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018730 echo "" >&6
18731 echo "" >&6
18732fi
18733