blob: d1ec709e4f006f0e614cf1a8cecd28e70c514987 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
Victor Stinner8510f432020-03-10 09:53:09 +0100634PLATLIBDIR
xdegaye254b3092019-04-29 09:27:40 +0200635LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700636EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200637ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000638SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000639LIBC
640LIBM
641HAVE_GETHOSTBYNAME
642HAVE_GETHOSTBYNAME_R
643HAVE_GETHOSTBYNAME_R_3_ARG
644HAVE_GETHOSTBYNAME_R_5_ARG
645HAVE_GETHOSTBYNAME_R_6_ARG
646LIBOBJS
647TRUE
648MACHDEP_OBJS
649DYNLOADFILE
650DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700651DTRACE_OBJS
652DTRACE_HEADERS
653DFLAGS
654DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700655TCLTK_LIBS
656TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000657LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800658PKG_CONFIG_LIBDIR
659PKG_CONFIG_PATH
660PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000661SHLIBS
662CFLAGSFORSHARED
663LINKFORSHARED
664CCSHARED
665BLDSHARED
666LDCXXSHARED
667LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700668SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000669LIBTOOL_CRUFT
670OTHER_LIBTOOL_OPT
671UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100672LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700673CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000674BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200675CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000676OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700677LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200684LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200685LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700686PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700687DEF_MAKE_RULE
688DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000689ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000690LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100691MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000692INSTALL_DATA
693INSTALL_SCRIPT
694INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200695ac_ct_READELF
696READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000697ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200698ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000700GNULD
701LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000702LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000703RUNSHARED
704INSTSONAME
705LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000706PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000707BLDLIBRARY
708DLLLIBRARY
709LDLIBRARY
710LIBRARY
711BUILDEXEEXT
712EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200713NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200714MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200715PLATFORM_TRIPLET
716MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200717ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000718MAINCC
719CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700720SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200721GREP
722CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000723OBJEXT
724EXEEXT
725ac_ct_CC
726CPPFLAGS
727LDFLAGS
728CFLAGS
729CC
730EXPORT_MACOSX_DEPLOYMENT_TARGET
731CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200817with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100829with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000830enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700831with_tcltk_includes
832with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000837with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_libm
841with_libc
842enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100843with_platlibdir
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100846with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100847with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000848'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 ac_precious_vars='build_alias
850host_alias
851target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100852MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853CC
854CFLAGS
855LDFLAGS
856LIBS
857CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800858CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700859PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800860PKG_CONFIG
861PKG_CONFIG_PATH
862PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863
Guido van Rossum627b2d71993-12-24 10:39:16 +0000864
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000866ac_init_help=
867ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000868ac_unrecognized_opts=
869ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870# The variables have the same names as the options, with
871# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000872cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875no_recursion=
876prefix=NONE
877program_prefix=NONE
878program_suffix=NONE
879program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884x_includes=NONE
885x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000886
887# Installation directory options.
888# These are left unexpanded so users can "make install exec_prefix=/foo"
889# and all the variables that are supposed to be based on exec_prefix
890# by default will actually change.
891# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893bindir='${exec_prefix}/bin'
894sbindir='${exec_prefix}/sbin'
895libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896datarootdir='${prefix}/share'
897datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898sysconfdir='${prefix}/etc'
899sharedstatedir='${prefix}/com'
900localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901includedir='${prefix}/include'
902oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
904infodir='${datarootdir}/info'
905htmldir='${docdir}'
906dvidir='${docdir}'
907pdfdir='${docdir}'
908psdir='${docdir}'
909libdir='${exec_prefix}/lib'
910localedir='${datarootdir}/locale'
911mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 # If the previous option needs an argument, assign it.
918 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 ac_prev=
921 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000922 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200925 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
926 *=) ac_optarg= ;;
927 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Accept the important Cygnus configure options, so we can diagnose typos.
931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 case $ac_dashdash$ac_option in
933 --)
934 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -bindir | --bindir | --bindi | --bind | --bin | --bi)
937 ac_prev=bindir ;;
938 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940
941 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000946 -cache-file | --cache-file | --cache-fil | --cache-fi \
947 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
948 ac_prev=cache_file ;;
949 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
950 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 cache_file=$ac_optarg ;;
952
953 --config-cache | -C)
954 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
962 | --dataroo | --dataro | --datar)
963 ac_prev=datarootdir ;;
964 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
965 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
966 datarootdir=$ac_optarg ;;
967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200972 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt_orig=$ac_useropt
974 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975 case $ac_user_opts in
976 *"
977"enable_$ac_useropt"
978"*) ;;
979 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
980 ac_unrecognized_sep=', ';;
981 esac
982 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983
984 -docdir | --docdir | --docdi | --doc | --do)
985 ac_prev=docdir ;;
986 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
987 docdir=$ac_optarg ;;
988
989 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
990 ac_prev=dvidir ;;
991 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
992 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200998 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000999 ac_useropt_orig=$ac_useropt
1000 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1001 case $ac_user_opts in
1002 *"
1003"enable_$ac_useropt"
1004"*) ;;
1005 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1006 ac_unrecognized_sep=', ';;
1007 esac
1008 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1011 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1012 | --exec | --exe | --ex)
1013 ac_prev=exec_prefix ;;
1014 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1015 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1016 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020 # Obsolete; use --with-gas.
1021 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 -help | --help | --hel | --he | -h)
1024 ac_init_help=long ;;
1025 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1026 ac_init_help=recursive ;;
1027 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1028 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1036 ac_prev=htmldir ;;
1037 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1038 | --ht=*)
1039 htmldir=$ac_optarg ;;
1040
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 -includedir | --includedir | --includedi | --included | --include \
1042 | --includ | --inclu | --incl | --inc)
1043 ac_prev=includedir ;;
1044 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1045 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -infodir | --infodir | --infodi | --infod | --info | --inf)
1049 ac_prev=infodir ;;
1050 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -libdir | --libdir | --libdi | --libd)
1054 ac_prev=libdir ;;
1055 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
1058 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1059 | --libexe | --libex | --libe)
1060 ac_prev=libexecdir ;;
1061 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1062 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 -localedir | --localedir | --localedi | --localed | --locale)
1066 ac_prev=localedir ;;
1067 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1068 localedir=$ac_optarg ;;
1069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 ac_prev=localstatedir ;;
1073 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001074 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
1077 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1078 ac_prev=mandir ;;
1079 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 # Obsolete; use --without-fp.
1084 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 no_create=yes ;;
1089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1091 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1092 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1095 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1096 | --oldin | --oldi | --old | --ol | --o)
1097 ac_prev=oldincludedir ;;
1098 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1099 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1100 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1104 ac_prev=prefix ;;
1105 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1109 | --program-pre | --program-pr | --program-p)
1110 ac_prev=program_prefix ;;
1111 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1112 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1116 | --program-suf | --program-su | --program-s)
1117 ac_prev=program_suffix ;;
1118 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1119 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -program-transform-name | --program-transform-name \
1123 | --program-transform-nam | --program-transform-na \
1124 | --program-transform-n | --program-transform- \
1125 | --program-transform | --program-transfor \
1126 | --program-transfo | --program-transf \
1127 | --program-trans | --program-tran \
1128 | --progr-tra | --program-tr | --program-t)
1129 ac_prev=program_transform_name ;;
1130 -program-transform-name=* | --program-transform-name=* \
1131 | --program-transform-nam=* | --program-transform-na=* \
1132 | --program-transform-n=* | --program-transform-=* \
1133 | --program-transform=* | --program-transfor=* \
1134 | --program-transfo=* | --program-transf=* \
1135 | --program-trans=* | --program-tran=* \
1136 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001139 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1140 ac_prev=pdfdir ;;
1141 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1142 pdfdir=$ac_optarg ;;
1143
1144 -psdir | --psdir | --psdi | --psd | --ps)
1145 ac_prev=psdir ;;
1146 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1147 psdir=$ac_optarg ;;
1148
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1150 | -silent | --silent | --silen | --sile | --sil)
1151 silent=yes ;;
1152
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001153 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1154 ac_prev=sbindir ;;
1155 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1156 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158
1159 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1160 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1161 | --sharedst | --shareds | --shared | --share | --shar \
1162 | --sha | --sh)
1163 ac_prev=sharedstatedir ;;
1164 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1165 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1166 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1167 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170 -site | --site | --sit)
1171 ac_prev=site ;;
1172 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1176 ac_prev=srcdir ;;
1177 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1181 | --syscon | --sysco | --sysc | --sys | --sy)
1182 ac_prev=sysconfdir ;;
1183 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1184 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1193 verbose=yes ;;
1194
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 -version | --version | --versio | --versi | --vers | -V)
1196 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001202 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt_orig=$ac_useropt
1204 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205 case $ac_user_opts in
1206 *"
1207"with_$ac_useropt"
1208"*) ;;
1209 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1210 ac_unrecognized_sep=', ';;
1211 esac
1212 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213
1214 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001218 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 ac_useropt_orig=$ac_useropt
1220 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1221 case $ac_user_opts in
1222 *"
1223"with_$ac_useropt"
1224"*) ;;
1225 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1226 ac_unrecognized_sep=', ';;
1227 esac
1228 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230 --x)
1231 # Obsolete; use --with-x.
1232 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233
1234 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1235 | --x-incl | --x-inc | --x-in | --x-i)
1236 ac_prev=x_includes ;;
1237 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1238 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1242 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1243 ac_prev=x_libraries ;;
1244 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1245 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001248 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1249Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250 ;;
1251
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 *=*)
1253 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1254 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 case $ac_envvar in #(
1256 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001257 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 export $ac_envvar ;;
1261
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001262 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001267 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 ;;
1269
1270 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271done
1272
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276fi
1277
Matthias Kloseb9621712010-04-24 17:59:49 +00001278if test -n "$ac_unrecognized_opts"; then
1279 case $enable_option_checking in
1280 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001282 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1283 esac
1284fi
1285
1286# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1288 datadir sysconfdir sharedstatedir localstatedir includedir \
1289 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001290 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001293 # Remove trailing slashes.
1294 case $ac_val in
1295 */ )
1296 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1297 eval $ac_var=\$ac_val;;
1298 esac
1299 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001300 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 [\\/$]* | ?:[\\/]* ) continue;;
1302 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001304 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001305done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307# There might be people who depend on the old broken behavior: `$host'
1308# used to hold the argument of --host etc.
1309# FIXME: To remove some day.
1310build=$build_alias
1311host=$host_alias
1312target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# FIXME: To remove some day.
1315if test "x$host_alias" != x; then
1316 if test "x$build_alias" = x; then
1317 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001318 elif test "x$build_alias" != "x$host_alias"; then
1319 cross_compiling=yes
1320 fi
1321fi
1322
1323ac_tool_prefix=
1324test -n "$host_alias" && ac_tool_prefix=$host_alias-
1325
1326test "$silent" = yes && exec 6>/dev/null
1327
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329ac_pwd=`pwd` && test -n "$ac_pwd" &&
1330ac_ls_di=`ls -di .` &&
1331ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335
1336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337# Find the source files, if location was not specified.
1338if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001339 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001341 ac_confdir=`$as_dirname -- "$as_myself" ||
1342$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1343 X"$as_myself" : 'X\(//\)[^/]' \| \
1344 X"$as_myself" : 'X\(//\)$' \| \
1345 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1346$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)[^/].*/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\/\)$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\).*/{
1360 s//\1/
1361 q
1362 }
1363 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001364 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366 srcdir=..
1367 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368else
1369 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371if test ! -r "$srcdir/$ac_unique_file"; then
1372 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1376ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001377 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378 pwd)`
1379# When building in place, set srcdir=.
1380if test "$ac_abs_confdir" = "$ac_pwd"; then
1381 srcdir=.
1382fi
1383# Remove unnecessary trailing slashes from srcdir.
1384# Double slashes in file names in object file debugging info
1385# mess up M-x gdb in Emacs.
1386case $srcdir in
1387*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1388esac
1389for ac_var in $ac_precious_vars; do
1390 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_env_${ac_var}_value=\$${ac_var}
1392 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1393 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1394done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395
Martin v. Löwis11437992002-04-12 09:54:03 +00001396#
1397# Report the --help message.
1398#
1399if test "$ac_init_help" = "long"; then
1400 # Omit some internal or obsolete options to make the list less imposing.
1401 # This message is too long to be a string in the A/UX 3.1 sh.
1402 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001403\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
1405Usage: $0 [OPTION]... [VAR=VALUE]...
1406
1407To assign environment variables (e.g., CC, CFLAGS...), specify them as
1408VAR=VALUE. See below for descriptions of some of the useful variables.
1409
1410Defaults for the options are specified in brackets.
1411
1412Configuration:
1413 -h, --help display this help and exit
1414 --help=short display options specific to this package
1415 --help=recursive display the short help of all the included packages
1416 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001417 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 --cache-file=FILE cache test results in FILE [disabled]
1419 -C, --config-cache alias for \`--cache-file=config.cache'
1420 -n, --no-create do not create output files
1421 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1422
Martin v. Löwis11437992002-04-12 09:54:03 +00001423Installation directories:
1424 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428
1429By default, \`make install' will install all the files in
1430\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1431an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1432for instance \`--prefix=\$HOME'.
1433
1434For better control, use the options below.
1435
1436Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 --bindir=DIR user executables [EPREFIX/bin]
1438 --sbindir=DIR system admin executables [EPREFIX/sbin]
1439 --libexecdir=DIR program executables [EPREFIX/libexec]
1440 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1441 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1442 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1443 --libdir=DIR object code libraries [EPREFIX/lib]
1444 --includedir=DIR C header files [PREFIX/include]
1445 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1446 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1447 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1448 --infodir=DIR info documentation [DATAROOTDIR/info]
1449 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1450 --mandir=DIR man documentation [DATAROOTDIR/man]
1451 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1452 --htmldir=DIR html documentation [DOCDIR]
1453 --dvidir=DIR dvi documentation [DOCDIR]
1454 --pdfdir=DIR pdf documentation [DOCDIR]
1455 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001456_ACEOF
1457
1458 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001459
1460System types:
1461 --build=BUILD configure for building on BUILD [guessed]
1462 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464fi
1465
1466if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001468 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 cat <<\_ACEOF
1471
1472Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1475 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001476 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001477 create a universal binary build. SDKDIR specifies
1478 which macOS SDK should be used to perform the build,
1479 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001481 create a Python.framework rather than a traditional
1482 Unix install. optional INSTALLDIR specifies the
1483 installation path. see Mac/README.rst (default is
1484 no)
1485 --enable-shared enable building a shared Python library (default is
1486 no)
1487 --enable-profiling enable C-level code profiling with gprof (default is
1488 no)
1489 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1490 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001491 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001492 support loadable extensions in _sqlite module, see
1493 Doc/library/sqlite3.rst (default is no)
1494 --enable-ipv6 enable ipv6 (with ipv4) support, see
1495 Doc/library/socket.rst (default is yes if supported)
1496 --enable-big-digits[=15|30]
1497 use big digits (30 or 15 bits) for Python longs
1498 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Optional Packages:
1501 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1502 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001503 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001504 specify the kind of universal binary that should be
1505 created. this option is only valid when
1506 --enable-universalsdk is set; options are:
1507 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1508 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001509 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001510 specify the name for the python framework on macOS
1511 only valid when --enable-framework is set. see
1512 Mac/README.rst (default is 'Python')
1513 --with-cxx-main[=COMPILER]
1514 compile main() and link Python executable with C++
1515 compiler specified in COMPILER (default is $CXX)
1516 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1517 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001518 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001519 (default is no)
1520 --with-assertions build with C assertions enabled (default is no)
1521 --with-lto enable Link-Time-Optimization in any build (default
1522 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001523 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001524 select hash algorithm for use in Python/pyhash.c
1525 (default is SipHash24)
Charles-François Natalid30b0222014-05-08 23:08:51 +01001526 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001527 enable AddressSanitizer memory error detector,
1528 'asan' (default is no)
1529 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1530 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001531 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001532 enable UndefinedBehaviorSanitizer undefined
1533 behaviour detector, 'ubsan' (default is no)
1534 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001535 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001536 library, see Doc/library/pyexpat.rst (default is no)
1537 --with-system-ffi build _ctypes module using an installed ffi library,
1538 see Doc/library/ctypes.rst (default is
1539 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001540 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001541 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001542 --with-decimal-contextvar
1543 build _decimal module using a coroutine-local rather
1544 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001545 --with-tcltk-includes='-I...'
1546 override search for Tcl and Tk include files
1547 --with-tcltk-libs='-L...'
1548 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001549 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001550 override order to check db backends for dbm; a valid
1551 value is a colon separated string with the backend
1552 names `ndbm', `gdbm' and `bdb'.
1553 --with-doc-strings enable documentation strings (default is yes)
1554 --with-pymalloc enable specialized mallocs (default is yes)
1555 --with-c-locale-coercion
1556 enable C locale coercion to a UTF-8 based locale
1557 (default is yes)
1558 --with-valgrind enable Valgrind support (default is no)
1559 --with-dtrace enable DTrace support (default is no)
1560 --with-libm=STRING override libm math library to STRING (default is
1561 system-dependent)
1562 --with-libc=STRING override libc C library to STRING (default is
1563 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001564 --with-platlibdir=DIRNAME
1565 Python library directory name (default is "lib")
Anthony Shaw2de064e2020-01-14 17:40:10 +11001566 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001567 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001568 --with-ensurepip[=install|upgrade|no]
1569 "install" or "upgrade" using bundled pip (default is
1570 upgrade)
1571 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001572 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001573 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001574 Python's preferred selection (default), openssl:
1575 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001576 custom string, PROTOCOL_SSLv2 ignores the setting,
1577 see Doc/library/ssl.rst
Martin v. Löwis11437992002-04-12 09:54:03 +00001578
1579Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001580 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 CC C compiler command
1582 CFLAGS C compiler flags
1583 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1584 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001589 PROFILE_TASK
1590 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001591 PKG_CONFIG path to pkg-config utility
1592 PKG_CONFIG_PATH
1593 directories to add to pkg-config's search path
1594 PKG_CONFIG_LIBDIR
1595 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001596
1597Use these variables to override the choices made by `configure' or to help
1598it to find libraries and programs with nonstandard names/locations.
1599
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001600Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001603fi
1604
1605if test "$ac_init_help" = "recursive"; then
1606 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 test -d "$ac_dir" ||
1609 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1610 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 ac_builddir=.
1612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613case "$ac_dir" in
1614.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1615*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001616 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001618 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 case $ac_top_builddir_sub in
1620 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1621 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1622 esac ;;
1623esac
1624ac_abs_top_builddir=$ac_pwd
1625ac_abs_builddir=$ac_pwd$ac_dir_suffix
1626# for backward compatibility:
1627ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001628
1629case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632 ac_top_srcdir=$ac_top_builddir_sub
1633 ac_abs_top_srcdir=$ac_pwd ;;
1634 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 ac_top_srcdir=$srcdir
1637 ac_abs_top_srcdir=$srcdir ;;
1638 *) # Relative name.
1639 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1640 ac_top_srcdir=$ac_top_build_prefix$srcdir
1641 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001642esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001643ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001645 cd "$ac_dir" || { ac_status=$?; continue; }
1646 # Check for guested configure.
1647 if test -f "$ac_srcdir/configure.gnu"; then
1648 echo &&
1649 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1650 elif test -f "$ac_srcdir/configure"; then
1651 echo &&
1652 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001654 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655 fi || ac_status=$?
1656 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 done
1658fi
1659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001660test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001661if $ac_init_version; then
1662 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001663python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001664generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001666Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001667This configure script is free software; the Free Software Foundation
1668gives unlimited permission to copy, distribute and modify it.
1669_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001670 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001672
1673## ------------------------ ##
1674## Autoconf initialization. ##
1675## ------------------------ ##
1676
1677# ac_fn_c_try_compile LINENO
1678# --------------------------
1679# Try to compile conftest.$ac_ext, and return whether this succeeded.
1680ac_fn_c_try_compile ()
1681{
1682 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1683 rm -f conftest.$ac_objext
1684 if { { ac_try="$ac_compile"
1685case "(($ac_try" in
1686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1687 *) ac_try_echo=$ac_try;;
1688esac
1689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1690$as_echo "$ac_try_echo"; } >&5
1691 (eval "$ac_compile") 2>conftest.err
1692 ac_status=$?
1693 if test -s conftest.err; then
1694 grep -v '^ *+' conftest.err >conftest.er1
1695 cat conftest.er1 >&5
1696 mv -f conftest.er1 conftest.err
1697 fi
1698 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1699 test $ac_status = 0; } && {
1700 test -z "$ac_c_werror_flag" ||
1701 test ! -s conftest.err
1702 } && test -s conftest.$ac_objext; then :
1703 ac_retval=0
1704else
1705 $as_echo "$as_me: failed program was:" >&5
1706sed 's/^/| /' conftest.$ac_ext >&5
1707
1708 ac_retval=1
1709fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001710 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001711 as_fn_set_status $ac_retval
1712
1713} # ac_fn_c_try_compile
1714
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001715# ac_fn_c_try_cpp LINENO
1716# ----------------------
1717# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1718ac_fn_c_try_cpp ()
1719{
1720 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1721 if { { ac_try="$ac_cpp conftest.$ac_ext"
1722case "(($ac_try" in
1723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1724 *) ac_try_echo=$ac_try;;
1725esac
1726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1727$as_echo "$ac_try_echo"; } >&5
1728 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1729 ac_status=$?
1730 if test -s conftest.err; then
1731 grep -v '^ *+' conftest.err >conftest.er1
1732 cat conftest.er1 >&5
1733 mv -f conftest.er1 conftest.err
1734 fi
1735 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1736 test $ac_status = 0; } > conftest.i && {
1737 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1738 test ! -s conftest.err
1739 }; then :
1740 ac_retval=0
1741else
1742 $as_echo "$as_me: failed program was:" >&5
1743sed 's/^/| /' conftest.$ac_ext >&5
1744
1745 ac_retval=1
1746fi
1747 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1748 as_fn_set_status $ac_retval
1749
1750} # ac_fn_c_try_cpp
1751
Matthias Kloseb9621712010-04-24 17:59:49 +00001752# ac_fn_c_try_link LINENO
1753# -----------------------
1754# Try to link conftest.$ac_ext, and return whether this succeeded.
1755ac_fn_c_try_link ()
1756{
1757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758 rm -f conftest.$ac_objext conftest$ac_exeext
1759 if { { ac_try="$ac_link"
1760case "(($ac_try" in
1761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1762 *) ac_try_echo=$ac_try;;
1763esac
1764eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1765$as_echo "$ac_try_echo"; } >&5
1766 (eval "$ac_link") 2>conftest.err
1767 ac_status=$?
1768 if test -s conftest.err; then
1769 grep -v '^ *+' conftest.err >conftest.er1
1770 cat conftest.er1 >&5
1771 mv -f conftest.er1 conftest.err
1772 fi
1773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1774 test $ac_status = 0; } && {
1775 test -z "$ac_c_werror_flag" ||
1776 test ! -s conftest.err
1777 } && test -s conftest$ac_exeext && {
1778 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001779 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 }; then :
1781 ac_retval=0
1782else
1783 $as_echo "$as_me: failed program was:" >&5
1784sed 's/^/| /' conftest.$ac_ext >&5
1785
1786 ac_retval=1
1787fi
1788 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1789 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1790 # interfere with the next link command; also delete a directory that is
1791 # left behind by Apple's compiler. We do this before executing the actions.
1792 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001793 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001794 as_fn_set_status $ac_retval
1795
1796} # ac_fn_c_try_link
1797
Matthias Kloseb9621712010-04-24 17:59:49 +00001798# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1799# -------------------------------------------------------
1800# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1801# the include files in INCLUDES and setting the cache variable VAR
1802# accordingly.
1803ac_fn_c_check_header_mongrel ()
1804{
1805 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001806 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1808$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001809if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001810 $as_echo_n "(cached) " >&6
1811fi
1812eval ac_res=\$$3
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814$as_echo "$ac_res" >&6; }
1815else
1816 # Is the header compilable?
1817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1818$as_echo_n "checking $2 usability... " >&6; }
1819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821$4
1822#include <$2>
1823_ACEOF
1824if ac_fn_c_try_compile "$LINENO"; then :
1825 ac_header_compiler=yes
1826else
1827 ac_header_compiler=no
1828fi
1829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1831$as_echo "$ac_header_compiler" >&6; }
1832
1833# Is the header present?
1834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1835$as_echo_n "checking $2 presence... " >&6; }
1836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837/* end confdefs.h. */
1838#include <$2>
1839_ACEOF
1840if ac_fn_c_try_cpp "$LINENO"; then :
1841 ac_header_preproc=yes
1842else
1843 ac_header_preproc=no
1844fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001845rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1847$as_echo "$ac_header_preproc" >&6; }
1848
1849# So? What about this header?
1850case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1851 yes:no: )
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1853$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1855$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1856 ;;
1857 no:yes:* )
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1859$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1861$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1863$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1865$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001868( $as_echo "## --------------------------------------- ##
1869## Report this to https://bugs.python.org/ ##
1870## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001871 ) | sed "s/^/$as_me: WARNING: /" >&2
1872 ;;
1873esac
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001876if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 $as_echo_n "(cached) " >&6
1878else
1879 eval "$3=\$ac_header_compiler"
1880fi
1881eval ac_res=\$$3
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1883$as_echo "$ac_res" >&6; }
1884fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001885 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001886
1887} # ac_fn_c_check_header_mongrel
1888
1889# ac_fn_c_try_run LINENO
1890# ----------------------
1891# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1892# that executables *can* be run.
1893ac_fn_c_try_run ()
1894{
1895 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1896 if { { ac_try="$ac_link"
1897case "(($ac_try" in
1898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1899 *) ac_try_echo=$ac_try;;
1900esac
1901eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1902$as_echo "$ac_try_echo"; } >&5
1903 (eval "$ac_link") 2>&5
1904 ac_status=$?
1905 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1906 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1907 { { case "(($ac_try" in
1908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1909 *) ac_try_echo=$ac_try;;
1910esac
1911eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1912$as_echo "$ac_try_echo"; } >&5
1913 (eval "$ac_try") 2>&5
1914 ac_status=$?
1915 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1916 test $ac_status = 0; }; }; then :
1917 ac_retval=0
1918else
1919 $as_echo "$as_me: program exited with status $ac_status" >&5
1920 $as_echo "$as_me: failed program was:" >&5
1921sed 's/^/| /' conftest.$ac_ext >&5
1922
1923 ac_retval=$ac_status
1924fi
1925 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001926 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001927 as_fn_set_status $ac_retval
1928
1929} # ac_fn_c_try_run
1930
1931# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1932# -------------------------------------------------------
1933# Tests whether HEADER exists and can be compiled using the include files in
1934# INCLUDES, setting the cache variable VAR accordingly.
1935ac_fn_c_check_header_compile ()
1936{
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1939$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001940if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001941 $as_echo_n "(cached) " >&6
1942else
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$4
1946#include <$2>
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 eval "$3=yes"
1950else
1951 eval "$3=no"
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1954fi
1955eval ac_res=\$$3
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1957$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001958 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001959
1960} # ac_fn_c_check_header_compile
1961
Matthias Kloseb9621712010-04-24 17:59:49 +00001962# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1963# -------------------------------------------
1964# Tests whether TYPE exists after having included INCLUDES, setting cache
1965# variable VAR accordingly.
1966ac_fn_c_check_type ()
1967{
1968 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1970$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001971if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001972 $as_echo_n "(cached) " >&6
1973else
1974 eval "$3=no"
1975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1976/* end confdefs.h. */
1977$4
1978int
1979main ()
1980{
1981if (sizeof ($2))
1982 return 0;
1983 ;
1984 return 0;
1985}
1986_ACEOF
1987if ac_fn_c_try_compile "$LINENO"; then :
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989/* end confdefs.h. */
1990$4
1991int
1992main ()
1993{
1994if (sizeof (($2)))
1995 return 0;
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001
2002else
2003 eval "$3=yes"
2004fi
2005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2006fi
2007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2008fi
2009eval ac_res=\$$3
2010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2011$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002012 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014} # ac_fn_c_check_type
2015
Matthias Kloseb9621712010-04-24 17:59:49 +00002016# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2017# --------------------------------------------
2018# Tries to find the compile-time value of EXPR in a program that includes
2019# INCLUDES, setting VAR accordingly. Returns whether the value could be
2020# computed
2021ac_fn_c_compute_int ()
2022{
2023 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2024 if test "$cross_compiling" = yes; then
2025 # Depending upon the size, compute the lo and hi bounds.
2026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027/* end confdefs.h. */
2028$4
2029int
2030main ()
2031{
2032static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002033test_array [0] = 0;
2034return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041 ac_lo=0 ac_mid=0
2042 while :; do
2043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2044/* end confdefs.h. */
2045$4
2046int
2047main ()
2048{
2049static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002050test_array [0] = 0;
2051return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002052
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057if ac_fn_c_try_compile "$LINENO"; then :
2058 ac_hi=$ac_mid; break
2059else
2060 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2061 if test $ac_lo -le $ac_mid; then
2062 ac_lo= ac_hi=
2063 break
2064 fi
2065 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2066fi
2067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2068 done
2069else
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002077test_array [0] = 0;
2078return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002079
2080 ;
2081 return 0;
2082}
2083_ACEOF
2084if ac_fn_c_try_compile "$LINENO"; then :
2085 ac_hi=-1 ac_mid=-1
2086 while :; do
2087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088/* end confdefs.h. */
2089$4
2090int
2091main ()
2092{
2093static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002094test_array [0] = 0;
2095return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002096
2097 ;
2098 return 0;
2099}
2100_ACEOF
2101if ac_fn_c_try_compile "$LINENO"; then :
2102 ac_lo=$ac_mid; break
2103else
2104 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2105 if test $ac_mid -le $ac_hi; then
2106 ac_lo= ac_hi=
2107 break
2108 fi
2109 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112 done
2113else
2114 ac_lo= ac_hi=
2115fi
2116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119# Binary search between lo and hi bounds.
2120while test "x$ac_lo" != "x$ac_hi"; do
2121 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
2126main ()
2127{
2128static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002129test_array [0] = 0;
2130return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002131
2132 ;
2133 return 0;
2134}
2135_ACEOF
2136if ac_fn_c_try_compile "$LINENO"; then :
2137 ac_hi=$ac_mid
2138else
2139 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2140fi
2141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2142done
2143case $ac_lo in #((
2144?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2145'') ac_retval=1 ;;
2146esac
2147 else
2148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2149/* end confdefs.h. */
2150$4
2151static long int longval () { return $2; }
2152static unsigned long int ulongval () { return $2; }
2153#include <stdio.h>
2154#include <stdlib.h>
2155int
2156main ()
2157{
2158
2159 FILE *f = fopen ("conftest.val", "w");
2160 if (! f)
2161 return 1;
2162 if (($2) < 0)
2163 {
2164 long int i = longval ();
2165 if (i != ($2))
2166 return 1;
2167 fprintf (f, "%ld", i);
2168 }
2169 else
2170 {
2171 unsigned long int i = ulongval ();
2172 if (i != ($2))
2173 return 1;
2174 fprintf (f, "%lu", i);
2175 }
2176 /* Do not output a trailing newline, as this causes \r\n confusion
2177 on some platforms. */
2178 return ferror (f) || fclose (f) != 0;
2179
2180 ;
2181 return 0;
2182}
2183_ACEOF
2184if ac_fn_c_try_run "$LINENO"; then :
2185 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2186else
2187 ac_retval=1
2188fi
2189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2190 conftest.$ac_objext conftest.beam conftest.$ac_ext
2191rm -f conftest.val
2192
2193 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002194 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002195 as_fn_set_status $ac_retval
2196
2197} # ac_fn_c_compute_int
2198
2199# ac_fn_c_check_func LINENO FUNC VAR
2200# ----------------------------------
2201# Tests whether FUNC exists, setting the cache variable VAR accordingly
2202ac_fn_c_check_func ()
2203{
2204 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2206$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002207if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002208 $as_echo_n "(cached) " >&6
2209else
2210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h. */
2212/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2213 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2214#define $2 innocuous_$2
2215
2216/* System header to define __stub macros and hopefully few prototypes,
2217 which can conflict with char $2 (); below.
2218 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2219 <limits.h> exists even on freestanding compilers. */
2220
2221#ifdef __STDC__
2222# include <limits.h>
2223#else
2224# include <assert.h>
2225#endif
2226
2227#undef $2
2228
2229/* Override any GCC internal prototype to avoid an error.
2230 Use char because int might match the return type of a GCC
2231 builtin and then its argument prototype would still apply. */
2232#ifdef __cplusplus
2233extern "C"
2234#endif
2235char $2 ();
2236/* The GNU C library defines this for functions which it implements
2237 to always fail with ENOSYS. Some functions are actually named
2238 something starting with __ and the normal name is an alias. */
2239#if defined __stub_$2 || defined __stub___$2
2240choke me
2241#endif
2242
2243int
2244main ()
2245{
2246return $2 ();
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251if ac_fn_c_try_link "$LINENO"; then :
2252 eval "$3=yes"
2253else
2254 eval "$3=no"
2255fi
2256rm -f core conftest.err conftest.$ac_objext \
2257 conftest$ac_exeext conftest.$ac_ext
2258fi
2259eval ac_res=\$$3
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2261$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002262 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002263
2264} # ac_fn_c_check_func
2265
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002266# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2267# ---------------------------------------------
2268# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2269# accordingly.
2270ac_fn_c_check_decl ()
2271{
2272 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273 as_decl_name=`echo $2|sed 's/ *(.*//'`
2274 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2276$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2277if eval \${$3+:} false; then :
2278 $as_echo_n "(cached) " >&6
2279else
2280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281/* end confdefs.h. */
2282$4
2283int
2284main ()
2285{
2286#ifndef $as_decl_name
2287#ifdef __cplusplus
2288 (void) $as_decl_use;
2289#else
2290 (void) $as_decl_name;
2291#endif
2292#endif
2293
2294 ;
2295 return 0;
2296}
2297_ACEOF
2298if ac_fn_c_try_compile "$LINENO"; then :
2299 eval "$3=yes"
2300else
2301 eval "$3=no"
2302fi
2303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304fi
2305eval ac_res=\$$3
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2307$as_echo "$ac_res" >&6; }
2308 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2309
2310} # ac_fn_c_check_decl
2311
Matthias Kloseb9621712010-04-24 17:59:49 +00002312# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2313# ----------------------------------------------------
2314# Tries to find if the field MEMBER exists in type AGGR, after including
2315# INCLUDES, setting cache variable VAR accordingly.
2316ac_fn_c_check_member ()
2317{
2318 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2320$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002321if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002322 $as_echo_n "(cached) " >&6
2323else
2324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2325/* end confdefs.h. */
2326$5
2327int
2328main ()
2329{
2330static $2 ac_aggr;
2331if (ac_aggr.$3)
2332return 0;
2333 ;
2334 return 0;
2335}
2336_ACEOF
2337if ac_fn_c_try_compile "$LINENO"; then :
2338 eval "$4=yes"
2339else
2340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341/* end confdefs.h. */
2342$5
2343int
2344main ()
2345{
2346static $2 ac_aggr;
2347if (sizeof ac_aggr.$3)
2348return 0;
2349 ;
2350 return 0;
2351}
2352_ACEOF
2353if ac_fn_c_try_compile "$LINENO"; then :
2354 eval "$4=yes"
2355else
2356 eval "$4=no"
2357fi
2358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361fi
2362eval ac_res=\$$4
2363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2364$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002365 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002366
2367} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002369This file contains any messages produced by compilers while
2370running configure, to aid debugging if configure makes a mistake.
2371
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002372It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002373generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002374
2375 $ $0 $@
2376
2377_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002379{
2380cat <<_ASUNAME
2381## --------- ##
2382## Platform. ##
2383## --------- ##
2384
2385hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2386uname -m = `(uname -m) 2>/dev/null || echo unknown`
2387uname -r = `(uname -r) 2>/dev/null || echo unknown`
2388uname -s = `(uname -s) 2>/dev/null || echo unknown`
2389uname -v = `(uname -v) 2>/dev/null || echo unknown`
2390
2391/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2392/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2393
2394/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2395/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2396/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002397/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002398/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2399/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2400/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2401
2402_ASUNAME
2403
2404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2405for as_dir in $PATH
2406do
2407 IFS=$as_save_IFS
2408 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 $as_echo "PATH: $as_dir"
2410 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002412
2413} >&5
2414
2415cat >&5 <<_ACEOF
2416
2417
2418## ----------- ##
2419## Core tests. ##
2420## ----------- ##
2421
2422_ACEOF
2423
2424
2425# Keep a trace of the command line.
2426# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002427# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002428# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002429# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002430ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002431ac_configure_args0=
2432ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002433ac_must_keep_next=false
2434for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002435do
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 for ac_arg
2437 do
2438 case $ac_arg in
2439 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2440 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2441 | -silent | --silent | --silen | --sile | --sil)
2442 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002444 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 esac
2446 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002447 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002449 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002450 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002451 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002453 case $ac_arg in
2454 *=* | --config-cache | -C | -disable-* | --disable-* \
2455 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2456 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2457 | -with-* | --with-* | -without-* | --without-* | --x)
2458 case "$ac_configure_args0 " in
2459 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2460 esac
2461 ;;
2462 -* ) ac_must_keep_next=true ;;
2463 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002466 ;;
2467 esac
2468 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002469done
Matthias Kloseb9621712010-04-24 17:59:49 +00002470{ ac_configure_args0=; unset ac_configure_args0;}
2471{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002472
2473# When interrupted or exit'd, cleanup temporary files, and complete
2474# config.log. We remove comments because anyway the quotes in there
2475# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476# WARNING: Use '\'' to represent an apostrophe within the trap.
2477# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002478trap 'exit_status=$?
2479 # Save into config.log some information that might help in debugging.
2480 {
2481 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002482
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002483 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002484## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 echo
2487 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488(
2489 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2490 eval ac_val=\$$ac_var
2491 case $ac_val in #(
2492 *${as_nl}*)
2493 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2495$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac
2497 case $ac_var in #(
2498 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2500 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 esac ;;
2502 esac
2503 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2506 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 "s/'\''/'\''\\\\'\'''\''/g;
2509 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2510 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002511 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002513 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac |
2515 sort
2516)
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002518
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002519 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002520## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002522 echo
2523 for ac_var in $ac_subst_vars
2524 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 eval ac_val=\$$ac_var
2526 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 done | sort
2531 echo
2532
2533 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002534 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002536## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002537 echo
2538 for ac_var in $ac_subst_files
2539 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 eval ac_val=\$$ac_var
2541 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 done | sort
2546 echo
2547 fi
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002551## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 echo
2556 fi
2557 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 $as_echo "$as_me: caught signal $ac_signal"
2559 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 rm -f core *.core core.conftest.* &&
2562 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002565for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002566 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002567done
2568ac_signal=0
2569
2570# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
Matthias Kloseb9621712010-04-24 17:59:49 +00002573$as_echo "/* confdefs.h */" > confdefs.h
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575# Predefined preprocessor variables.
2576
2577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_NAME "$PACKAGE_NAME"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581cat >>confdefs.h <<_ACEOF
2582#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2583_ACEOF
2584
Martin v. Löwis11437992002-04-12 09:54:03 +00002585cat >>confdefs.h <<_ACEOF
2586#define PACKAGE_VERSION "$PACKAGE_VERSION"
2587_ACEOF
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589cat >>confdefs.h <<_ACEOF
2590#define PACKAGE_STRING "$PACKAGE_STRING"
2591_ACEOF
2592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593cat >>confdefs.h <<_ACEOF
2594#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2595_ACEOF
2596
Matthias Kloseb9621712010-04-24 17:59:49 +00002597cat >>confdefs.h <<_ACEOF
2598#define PACKAGE_URL "$PACKAGE_URL"
2599_ACEOF
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601
2602# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002603# Prefer an explicitly selected file to automatically selected ones.
2604ac_site_file1=NONE
2605ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002607 # We do not want a PATH search for config.site.
2608 case $CONFIG_SITE in #((
2609 -*) ac_site_file1=./$CONFIG_SITE;;
2610 */*) ac_site_file1=$CONFIG_SITE;;
2611 *) ac_site_file1=./$CONFIG_SITE;;
2612 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 ac_site_file1=$prefix/share/config.site
2615 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616else
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 ac_site_file1=$ac_default_prefix/share/config.site
2618 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002620for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621do
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 test "x$ac_site_file" = xNONE && continue
2623 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2625$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002627 . "$ac_site_file" \
2628 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2629$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2630as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002631See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632 fi
2633done
2634
2635if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 # Some versions of bash will fail to source /dev/null (special files
2637 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2638 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2640$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2643 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 esac
2645 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002646else
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2648$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 >$cache_file
2650fi
2651
2652# Check that the precious variables saved in the cache have kept the same
2653# value.
2654ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2657 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2659 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 case $ac_old_set,$ac_new_set in
2661 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2663$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 ac_cache_corrupted=: ;;
2665 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2667$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 ac_cache_corrupted=: ;;
2669 ,);;
2670 *)
2671 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 # differences in whitespace do not lead to failure.
2673 ac_old_val_w=`echo x $ac_old_val`
2674 ac_new_val_w=`echo x $ac_new_val`
2675 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2677$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2678 ac_cache_corrupted=:
2679 else
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2681$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2682 eval $ac_var=\$ac_old_val
2683 fi
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2685$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2687$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 fi;;
2689 esac
2690 # Pass precious variables to config.status.
2691 if test "$ac_new_set" = set; then
2692 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 *) ac_arg=$ac_var=$ac_new_val ;;
2695 esac
2696 case " $ac_configure_args " in
2697 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002698 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002699 esac
2700 fi
2701done
2702if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002703 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2706$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002707 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002709## -------------------- ##
2710## Main body of script. ##
2711## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712
Guido van Rossum7f43da71994-08-01 12:15:30 +00002713ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002714ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002715ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2716ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2717ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002718
Guido van Rossum627b2d71993-12-24 10:39:16 +00002719
Michael W. Hudson54241132001-12-07 15:38:26 +00002720
Trent Nelson4d4ec652012-10-16 08:51:24 -04002721
Christian Heimesff5be6e2018-01-20 13:19:21 +01002722
2723
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002724if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002725 # If we're building out-of-tree, we need to make sure the following
2726 # resources get picked up before their $srcdir counterparts.
2727 # Objects/ -> typeslots.inc
2728 # Include/ -> Python-ast.h, graminit.h
2729 # Python/ -> importlib.h
2730 # (A side effect of this is that these resources will automatically be
2731 # regenerated when building out-of-tree, regardless of whether or not
2732 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2733 # off.)
2734 BASECPPFLAGS="-IObjects -IInclude -IPython"
2735else
2736 BASECPPFLAGS=""
2737fi
2738
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002739
2740
2741
2742
Victor Stinner9ed34a82017-05-02 22:35:58 +02002743if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002744then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002745# Extract the first word of "git", so it can be a program name with args.
2746set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2748$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002749if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002750 $as_echo_n "(cached) " >&6
2751else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752 if test -n "$HAS_GIT"; then
2753 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754else
2755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2756for as_dir in $PATH
2757do
2758 IFS=$as_save_IFS
2759 test -z "$as_dir" && as_dir=.
2760 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2764 break 2
2765 fi
2766done
2767 done
2768IFS=$as_save_IFS
2769
Ned Deily5c4b0d02017-03-04 00:19:55 -05002770 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771fi
2772fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002773HAS_GIT=$ac_cv_prog_HAS_GIT
2774if test -n "$HAS_GIT"; then
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2776$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777else
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2779$as_echo "no" >&6; }
2780fi
2781
2782
2783else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002784HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002785fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002786if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002787then
Xiang Zhang4c855572018-08-20 22:36:19 +08002788 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2789 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2790 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002792 GITVERSION=""
2793 GITTAG=""
2794 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002795fi
2796
2797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002798ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002799
2800
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002801ac_aux_dir=
2802for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2803 if test -f "$ac_dir/install-sh"; then
2804 ac_aux_dir=$ac_dir
2805 ac_install_sh="$ac_aux_dir/install-sh -c"
2806 break
2807 elif test -f "$ac_dir/install.sh"; then
2808 ac_aux_dir=$ac_dir
2809 ac_install_sh="$ac_aux_dir/install.sh -c"
2810 break
2811 elif test -f "$ac_dir/shtool"; then
2812 ac_aux_dir=$ac_dir
2813 ac_install_sh="$ac_aux_dir/shtool install -c"
2814 break
2815 fi
2816done
2817if test -z "$ac_aux_dir"; then
2818 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2819fi
2820
2821# These three variables are undocumented and unsupported,
2822# and are intended to be withdrawn in a future Autoconf release.
2823# They can cause serious problems if a builder's source tree is in a directory
2824# whose full name contains unusual characters.
2825ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2826ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2827ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2828
2829
2830# Make sure we can run config.sub.
2831$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2832 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2833
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2835$as_echo_n "checking build system type... " >&6; }
2836if ${ac_cv_build+:} false; then :
2837 $as_echo_n "(cached) " >&6
2838else
2839 ac_build_alias=$build_alias
2840test "x$ac_build_alias" = x &&
2841 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2842test "x$ac_build_alias" = x &&
2843 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2844ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2845 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2846
2847fi
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2849$as_echo "$ac_cv_build" >&6; }
2850case $ac_cv_build in
2851*-*-*) ;;
2852*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2853esac
2854build=$ac_cv_build
2855ac_save_IFS=$IFS; IFS='-'
2856set x $ac_cv_build
2857shift
2858build_cpu=$1
2859build_vendor=$2
2860shift; shift
2861# Remember, the first character of IFS is used to create $*,
2862# except with old shells:
2863build_os=$*
2864IFS=$ac_save_IFS
2865case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2866
2867
2868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2869$as_echo_n "checking host system type... " >&6; }
2870if ${ac_cv_host+:} false; then :
2871 $as_echo_n "(cached) " >&6
2872else
2873 if test "x$host_alias" = x; then
2874 ac_cv_host=$ac_cv_build
2875else
2876 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2877 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2878fi
2879
2880fi
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2882$as_echo "$ac_cv_host" >&6; }
2883case $ac_cv_host in
2884*-*-*) ;;
2885*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2886esac
2887host=$ac_cv_host
2888ac_save_IFS=$IFS; IFS='-'
2889set x $ac_cv_host
2890shift
2891host_cpu=$1
2892host_vendor=$2
2893shift; shift
2894# Remember, the first character of IFS is used to create $*,
2895# except with old shells:
2896host_os=$*
2897IFS=$ac_save_IFS
2898case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2899
2900
2901
doko@python.orga10e4a92013-01-25 18:45:12 +01002902
2903
Ned Deilyfcbc2462014-08-22 13:32:49 -07002904# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2905rm -f pybuilddir.txt
2906
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002907for ac_prog in python$PACKAGE_VERSION python3 python
2908do
2909 # Extract the first word of "$ac_prog", so it can be a program name with args.
2910set dummy $ac_prog; ac_word=$2
2911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2912$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002913if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002914 $as_echo_n "(cached) " >&6
2915else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002916 if test -n "$PYTHON_FOR_REGEN"; then
2917 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918else
2919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2920for as_dir in $PATH
2921do
2922 IFS=$as_save_IFS
2923 test -z "$as_dir" && as_dir=.
2924 for ac_exec_ext in '' $ac_executable_extensions; do
2925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002926 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2928 break 2
2929 fi
2930done
2931 done
2932IFS=$as_save_IFS
2933
2934fi
2935fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002936PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2937if test -n "$PYTHON_FOR_REGEN"; then
2938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2939$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002940else
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2942$as_echo "no" >&6; }
2943fi
2944
2945
Victor Stinnera5c62a82017-05-03 18:21:48 +02002946 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002947done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002948test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002949
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002950
2951
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002952if test "$cross_compiling" = yes; then
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2954$as_echo_n "checking for python interpreter for cross build... " >&6; }
2955 if test -z "$PYTHON_FOR_BUILD"; then
2956 for interp in python$PACKAGE_VERSION python3 python; do
2957 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002958 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002959 break
2960 fi
2961 interp=
2962 done
2963 if test x$interp = x; then
2964 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2965 fi
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2967$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002968 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002969 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002970elif test "$cross_compiling" = maybe; then
2971 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002972else
2973 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2974fi
2975
2976
Martin v. Löwis11437992002-04-12 09:54:03 +00002977
Benjamin Petersond23f8222009-04-05 19:13:16 +00002978if test "$prefix" != "/"; then
2979 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2980fi
2981
2982
Martin v. Löwis11437992002-04-12 09:54:03 +00002983
2984
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002985# We don't use PACKAGE_ variables, and they cause conflicts
2986# with other autoconf-based packages that include Python.h
2987grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2988rm confdefs.h
2989mv confdefs.h.new confdefs.h
2990
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002991
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002992VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002993
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002994# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002995
2996SOVERSION=1.0
2997
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002998# The later defininition of _XOPEN_SOURCE disables certain features
2999# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002
3003
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003004# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3005# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3006# them.
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003009
3010
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003011# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3012# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3013# them.
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003016
3017
Martin v. Löwisd6320502004-08-12 13:45:08 +00003018# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003019# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3020# them.
3021
Matthias Kloseb9621712010-04-24 17:59:49 +00003022$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003023
3024
3025
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003026define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003027
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003028# Arguments passed to configure.
3029
3030CONFIG_ARGS="$ac_configure_args"
3031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3033$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003035if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003036 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037 case $enableval in
3038 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003039 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003040 # information
3041 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003042 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003044 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3045 if test ! -d "${enableval}"
3046 then
3047 enableval=/
3048 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050 ;;
3051 esac
3052 case $enableval in
3053 no)
3054 UNIVERSALSDK=
3055 enable_universalsdk=
3056 ;;
3057 *)
3058 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059 if test ! -d "${UNIVERSALSDK}"
3060 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003061 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003063 ;;
3064 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003065
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066
Thomas Wouters477c8d52006-05-27 19:21:47 +00003067else
3068
3069 UNIVERSALSDK=
3070 enable_universalsdk=
3071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003072fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003073
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003074if test -n "${UNIVERSALSDK}"
3075then
Matthias Kloseb9621712010-04-24 17:59:49 +00003076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3077$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003078else
Matthias Kloseb9621712010-04-24 17:59:49 +00003079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3080$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003081fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003083
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003084
Ned Deily87adb6e2013-10-18 21:09:56 -07003085ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003086
Ned Deilycbfb9a52012-06-23 16:02:19 -07003087# For backward compatibility reasons we prefer to select '32-bit' if available,
3088# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003090if test "`uname -s`" = "Darwin"
3091then
3092 if test -n "${UNIVERSALSDK}"
3093 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003094 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003095 then
3096 UNIVERSAL_ARCHS="intel"
3097 fi
3098 fi
3099fi
3100
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003101
Matthias Kloseb9621712010-04-24 17:59:49 +00003102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3103$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003104
3105# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003106if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003107 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003108 UNIVERSAL_ARCHS="$withval"
3109
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003110fi
3111
Ned Deily87adb6e2013-10-18 21:09:56 -07003112if test -n "${UNIVERSALSDK}"
3113then
3114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3115$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3116else
3117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3118$as_echo "no" >&6; }
3119fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003121
3122# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003123if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003124 withval=$with_framework_name;
3125 PYTHONFRAMEWORK=${withval}
3126 PYTHONFRAMEWORKDIR=${withval}.framework
3127 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3128
3129else
3130
3131 PYTHONFRAMEWORK=Python
3132 PYTHONFRAMEWORKDIR=Python.framework
3133 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3134
3135fi
3136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003138if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003139 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003140 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003141 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003142 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 esac
3144 case $enableval in
3145 no)
3146 PYTHONFRAMEWORK=
3147 PYTHONFRAMEWORKDIR=no-framework
3148 PYTHONFRAMEWORKPREFIX=
3149 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003150 FRAMEWORKINSTALLFIRST=
3151 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003152 FRAMEWORKALTINSTALLFIRST=
3153 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003154 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003155 if test "x${prefix}" = "xNONE"; then
3156 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3157 else
3158 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3159 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003160 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003161 ;;
3162 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003163 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003164 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003165 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003166 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003167 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3168 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003169 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003170 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003171
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003172 if test "x${prefix}" = "xNONE" ; then
3173 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003174
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003175 else
3176 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3177 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003178
3179 case "${enableval}" in
3180 /System*)
3181 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3182 if test "${prefix}" = "NONE" ; then
3183 # See below
3184 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3185 fi
3186 ;;
3187
3188 /Library*)
3189 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3190 ;;
3191
3192 */Library/Frameworks)
3193 MDIR="`dirname "${enableval}"`"
3194 MDIR="`dirname "${MDIR}"`"
3195 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3196
3197 if test "${prefix}" = "NONE"; then
3198 # User hasn't specified the
3199 # --prefix option, but wants to install
3200 # the framework in a non-default location,
3201 # ensure that the compatibility links get
3202 # installed relative to that prefix as well
3203 # instead of in /usr/local.
3204 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3205 fi
3206 ;;
3207
3208 *)
3209 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3210 ;;
3211 esac
3212
Jack Jansen127e56e2001-09-11 14:41:54 +00003213 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003215 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003221 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3222
3223 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3224
Jack Jansene578a632001-08-15 01:27:14 +00003225 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003226
Guido van Rossum563e7081996-09-10 18:20:48 +00003227else
Martin v. Löwis11437992002-04-12 09:54:03 +00003228
Jack Jansene578a632001-08-15 01:27:14 +00003229 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003230 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003231 PYTHONFRAMEWORKPREFIX=
3232 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233 FRAMEWORKINSTALLFIRST=
3234 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003235 FRAMEWORKALTINSTALLFIRST=
3236 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003237 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003238 if test "x${prefix}" = "xNONE" ; then
3239 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3240 else
3241 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3242 fi
Jack Jansene578a632001-08-15 01:27:14 +00003243 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003246fi
3247
Thomas Wouters477c8d52006-05-27 19:21:47 +00003248
3249
Michael W. Hudson54241132001-12-07 15:38:26 +00003250
3251
3252
3253
Jack Jansene578a632001-08-15 01:27:14 +00003254
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003255
3256
3257
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003258
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003259
Ned Deilyb8f944f2013-11-21 22:42:25 -08003260
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003261
3262cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003263#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003264_ACEOF
3265
3266
Jack Jansene578a632001-08-15 01:27:14 +00003267##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003268## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003269## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003270##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271# Set name for machine-dependent library files
3272
Matthias Kloseb9621712010-04-24 17:59:49 +00003273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3274$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275if test -z "$MACHDEP"
3276then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 # avoid using uname for cross builds
3278 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003279 # ac_sys_system and ac_sys_release are used for setting
3280 # a lot of different things including 'define_xopen_source'
3281 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003283 *-*-linux-android*)
3284 ac_sys_system=Linux-android
3285 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 *-*-linux*)
3287 ac_sys_system=Linux
3288 ;;
3289 *-*-cygwin*)
3290 ac_sys_system=Cygwin
3291 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003292 *-*-vxworks*)
3293 ac_sys_system=VxWorks
3294 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003295 *)
3296 # for now, limit cross builds to known configurations
3297 MACHDEP="unknown"
3298 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3299 esac
3300 ac_sys_release=
3301 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003302 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003303 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003304 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003305 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003306 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003307 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003308 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003309 fi
3310 ac_md_system=`echo $ac_sys_system |
3311 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3312 ac_md_release=`echo $ac_sys_release |
3313 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3314 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003315
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003316 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003317 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003318 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003319 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003320 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003321 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003322 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003323fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3325$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003326
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003327
3328if test "$cross_compiling" = yes; then
3329 case "$host" in
3330 *-*-linux*)
3331 case "$host_cpu" in
3332 arm*)
3333 _host_cpu=arm
3334 ;;
3335 *)
3336 _host_cpu=$host_cpu
3337 esac
3338 ;;
3339 *-*-cygwin*)
3340 _host_cpu=
3341 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003342 *-*-vxworks*)
3343 _host_cpu=$host_cpu
3344 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003345 *)
3346 # for now, limit cross builds to known configurations
3347 MACHDEP="unknown"
3348 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3349 esac
3350 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3351fi
3352
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003353# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3354# disable features if it is defined, without any means to access these
3355# features as extensions. For these systems, we skip the definition of
3356# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3357# some feature, make sure there is no alternative way to access this
3358# feature. Also, when using wildcards, make sure you have verified the
3359# need for not defining _XOPEN_SOURCE on all systems matching the
3360# wildcard, and that the wildcard does not include future systems
3361# (which may remove their limitations).
3362case $ac_sys_system/$ac_sys_release in
3363 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3364 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003365 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003366 # In addition, Stefan Krah confirms that issue #1244610 exists through
3367 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003368 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003369 define_xopen_source=no
3370 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3371 # also defined. This can be overridden by defining _BSD_SOURCE
3372 # As this has a different meaning on Linux, only define it on OpenBSD
3373
Matthias Kloseb9621712010-04-24 17:59:49 +00003374$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003375
3376 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003377 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003378 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3379 # also defined. This can be overridden by defining _BSD_SOURCE
3380 # As this has a different meaning on Linux, only define it on OpenBSD
3381
Matthias Kloseb9621712010-04-24 17:59:49 +00003382$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003383
3384 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003385 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3386 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3387 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003388 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003389 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003390 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3391 # request to enable features supported by the standard as a request
3392 # to disable features not supported by the standard. The best way
3393 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3394 # entirely and define __EXTENSIONS__ instead.
3395 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003396 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003397 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3398 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003399 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003400 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003401 define_xopen_source=no;;
3402 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003403 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003404 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003405 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003406 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3407 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3408 # identifies itself as Darwin/7.*
3409 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3410 # disables platform specific features beyond repair.
3411 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3412 # has no effect, don't bother defining them
3413 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003414 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003415 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003416 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003417 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3418 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3419 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003420 AIX/4)
3421 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003422 AIX/5)
3423 if test `uname -r` -eq 1; then
3424 define_xopen_source=no
3425 fi
3426 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003427 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3428 # defining NI_NUMERICHOST.
3429 QNX/6.3.2)
3430 define_xopen_source=no
3431 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003432 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3433 # in network headers still using system V types.
3434 VxWorks/*)
3435 define_xopen_source=no
3436 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003437
Ian Nortona9edf442020-02-14 03:09:11 +00003438 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3439 # chroot() and other functions
3440 hp*|HP*)
3441 define_xopen_source=no
3442 ;;
3443
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003444esac
3445
3446if test $define_xopen_source = yes
3447then
Victor Stinner14d098d2011-09-07 22:29:43 +02003448 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
Victor Stinner14d098d2011-09-07 22:29:43 +02003450$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003451
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003452
3453 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3454 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3455 # several APIs are not declared. Since this is also needed in some
3456 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003457
Matthias Kloseb9621712010-04-24 17:59:49 +00003458$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
3460
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003461
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003462$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003463
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003464fi
3465
Christian Heimes647cd872013-12-07 23:39:33 +01003466# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3467case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003468 hp*|HP*)
3469 define_stdc_a1=yes;;
3470 *)
3471 define_stdc_a1=no;;
3472esac
3473
3474if test $define_stdc_a1 = yes
3475then
Christian Heimes647cd872013-12-07 23:39:33 +01003476
3477$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3478
Christian Heimesb02bcae2013-12-08 15:21:08 +01003479fi
Christian Heimes647cd872013-12-07 23:39:33 +01003480
Jack Jansen6b08a402004-06-03 12:41:45 +00003481# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3482# it may influence the way we can build extensions, so distutils
3483# needs to check it
3484
Thomas Wouters477c8d52006-05-27 19:21:47 +00003485
Jack Jansen6b08a402004-06-03 12:41:45 +00003486CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003487EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003488
Guido van Rossum627b2d71993-12-24 10:39:16 +00003489# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003490
3491# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3492# for debug/optimization stuff. BASECFLAGS is for flags that are required
3493# just to get things to compile and link. Users are free to override OPT
3494# when running configure or make. The build should not break if they do.
3495# BASECFLAGS should generally not be messed with, however.
3496
Guido van Rossum8b131c51995-03-09 14:10:13 +00003497# If the user switches compilers, we can't believe the cache
3498if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3499then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003500 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003501(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003502fi
3503
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003504# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3505# when the compiler supports them, but we don't always want -O2, and
3506# we set -g later.
3507if test -z "$CFLAGS"; then
3508 CFLAGS=
3509fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003510
3511if test "$ac_sys_system" = "Darwin"
3512then
3513 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003514 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003515 # information
3516 if test -z "${CC}"
3517 then
3518 found_gcc=
3519 found_clang=
3520 as_save_IFS=$IFS; IFS=:
3521 for as_dir in $PATH
3522 do
3523 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003524 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003525 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003526 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003527 fi
3528 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003529 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003531 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003532 fi
3533 fi
3534 done
3535 IFS=$as_save_IFS
3536
3537 if test -n "$found_gcc" -a -n "$found_clang"
3538 then
3539 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3540 then
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3542$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3543 CC="$found_clang"
3544 CXX="$found_clang++"
3545 fi
3546
3547
3548 elif test -z "$found_gcc" -a -n "$found_clang"
3549 then
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3551$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3552 CC="$found_clang"
3553 CXX="$found_clang++"
3554
3555 elif test -z "$found_gcc" -a -z "$found_clang"
3556 then
3557 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3558 if test -n "${found_clang}"
3559 then
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3561$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3562 CC="${found_clang}"
3563 CXX="`/usr/bin/xcrun -find clang++`"
3564
3565 # else: use default behaviour
3566 fi
3567 fi
3568 fi
3569fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003570ac_ext=c
3571ac_cpp='$CPP $CPPFLAGS'
3572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3574ac_compiler_gnu=$ac_cv_c_compiler_gnu
3575if test -n "$ac_tool_prefix"; then
3576 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3577set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3579$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003580if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003581 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003582else
3583 if test -n "$CC"; then
3584 ac_cv_prog_CC="$CC" # Let the user override the test.
3585else
Martin v. Löwis11437992002-04-12 09:54:03 +00003586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3587for as_dir in $PATH
3588do
3589 IFS=$as_save_IFS
3590 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 break 2
3596 fi
3597done
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003600
Jack Jansendd19cf82001-12-06 22:36:17 +00003601fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003604if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3606$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003607else
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3609$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003610fi
3611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612
Martin v. Löwis11437992002-04-12 09:54:03 +00003613fi
3614if test -z "$ac_cv_prog_CC"; then
3615 ac_ct_CC=$CC
3616 # Extract the first word of "gcc", so it can be a program name with args.
3617set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3619$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003620if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003622else
3623 if test -n "$ac_ct_CC"; then
3624 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3625else
3626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3627for as_dir in $PATH
3628do
3629 IFS=$as_save_IFS
3630 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 break 2
3636 fi
3637done
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003640
3641fi
3642fi
3643ac_ct_CC=$ac_cv_prog_ac_ct_CC
3644if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3646$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003647else
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3649$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650fi
3651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652 if test "x$ac_ct_CC" = x; then
3653 CC=""
3654 else
3655 case $cross_compiling:$ac_tool_warned in
3656yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003657{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3658$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659ac_tool_warned=yes ;;
3660esac
3661 CC=$ac_ct_CC
3662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003663else
3664 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003665fi
3666
Jack Jansendd19cf82001-12-06 22:36:17 +00003667if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668 if test -n "$ac_tool_prefix"; then
3669 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003670set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3672$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003673if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003675else
3676 if test -n "$CC"; then
3677 ac_cv_prog_CC="$CC" # Let the user override the test.
3678else
Martin v. Löwis11437992002-04-12 09:54:03 +00003679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3680for as_dir in $PATH
3681do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 break 2
3689 fi
3690done
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003693
3694fi
3695fi
3696CC=$ac_cv_prog_CC
3697if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3699$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003700else
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3702$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003703fi
3704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003707fi
3708if test -z "$CC"; then
3709 # Extract the first word of "cc", so it can be a program name with args.
3710set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003713if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003715else
3716 if test -n "$CC"; then
3717 ac_cv_prog_CC="$CC" # Let the user override the test.
3718else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003719 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3721for as_dir in $PATH
3722do
3723 IFS=$as_save_IFS
3724 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3728 ac_prog_rejected=yes
3729 continue
3730 fi
3731 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 break 2
3734 fi
3735done
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003738
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003739if test $ac_prog_rejected = yes; then
3740 # We found a bogon in the path, so make sure we never use it.
3741 set dummy $ac_cv_prog_CC
3742 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744 # We chose a different compiler from the bogus one.
3745 # However, it has the same basename, so the bogon will be chosen
3746 # first if we set CC to just the basename; use the full file name.
3747 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003748 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749 fi
3750fi
3751fi
3752fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003753CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760fi
3761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763fi
3764if test -z "$CC"; then
3765 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 do
3768 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3769set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003772if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003774else
3775 if test -n "$CC"; then
3776 ac_cv_prog_CC="$CC" # Let the user override the test.
3777else
Martin v. Löwis11437992002-04-12 09:54:03 +00003778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779for as_dir in $PATH
3780do
3781 IFS=$as_save_IFS
3782 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003788 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003789done
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003792
3793fi
3794fi
3795CC=$ac_cv_prog_CC
3796if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3798$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003802fi
3803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 test -n "$CC" && break
3806 done
3807fi
3808if test -z "$CC"; then
3809 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003811do
3812 # Extract the first word of "$ac_prog", so it can be a program name with args.
3813set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3815$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003816if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003818else
3819 if test -n "$ac_ct_CC"; then
3820 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3821else
3822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3823for as_dir in $PATH
3824do
3825 IFS=$as_save_IFS
3826 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003829 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003831 break 2
3832 fi
3833done
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003836
Martin v. Löwis11437992002-04-12 09:54:03 +00003837fi
3838fi
3839ac_ct_CC=$ac_cv_prog_ac_ct_CC
3840if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3842$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003843else
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3845$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003846fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 test -n "$ac_ct_CC" && break
3850done
Michael W. Hudson54241132001-12-07 15:38:26 +00003851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852 if test "x$ac_ct_CC" = x; then
3853 CC=""
3854 else
3855 case $cross_compiling:$ac_tool_warned in
3856yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859ac_tool_warned=yes ;;
3860esac
3861 CC=$ac_ct_CC
3862 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003863fi
3864
3865fi
3866
3867
Matthias Kloseb9621712010-04-24 17:59:49 +00003868test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003870as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003871See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003872
3873# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003874$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3875set X $ac_compile
3876ac_compiler=$2
3877for ac_option in --version -v -V -qversion; do
3878 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879case "(($ac_try" in
3880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3881 *) ac_try_echo=$ac_try;;
3882esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3884$as_echo "$ac_try_echo"; } >&5
3885 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003887 if test -s conftest.err; then
3888 sed '10a\
3889... rest of stderr output deleted ...
3890 10q' conftest.err >conftest.er1
3891 cat conftest.er1 >&5
3892 fi
3893 rm -f conftest.er1 conftest.err
3894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3895 test $ac_status = 0; }
3896done
Martin v. Löwis11437992002-04-12 09:54:03 +00003897
Matthias Kloseb9621712010-04-24 17:59:49 +00003898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003899/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003900
Martin v. Löwis11437992002-04-12 09:54:03 +00003901int
3902main ()
3903{
3904
3905 ;
3906 return 0;
3907}
3908_ACEOF
3909ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003910ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003911# Try to create an executable without -o first, disregard a.out.
3912# It will help us diagnose broken compilers, and finding out an intuition
3913# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3915$as_echo_n "checking whether the C compiler works... " >&6; }
3916ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3917
3918# The possible output files:
3919ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921ac_rmfiles=
3922for ac_file in $ac_files
3923do
3924 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3927 esac
3928done
3929rm -f $ac_rmfiles
3930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932case "(($ac_try" in
3933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3934 *) ac_try_echo=$ac_try;;
3935esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003936eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3937$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3941 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3943# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3944# in a Makefile. We should not override ac_cv_exeext if it was cached,
3945# so that the user can short-circuit this test for compilers unknown to
3946# Autoconf.
3947for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003948do
3949 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003952 ;;
3953 [ab].out )
3954 # We found the default executable, but exeext='' is most
3955 # certainly right.
3956 break;;
3957 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 then :; else
3960 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3961 fi
3962 # We set ac_cv_exeext here because the later test for it is not
3963 # safe: cross compilers may not add the suffix if given an `-o'
3964 # argument, so we may need to know it at that point already.
3965 # Even if this section looks crufty: it has the advantage of
3966 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003967 break;;
3968 * )
3969 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 esac
3971done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972test "$ac_cv_exeext" = no && ac_cv_exeext=
3973
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003974else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 ac_file=''
3976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003977if test -z "$ac_file"; then :
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979$as_echo "no" >&6; }
3980$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003981sed 's/^/| /' conftest.$ac_ext >&5
3982
Matthias Kloseb9621712010-04-24 17:59:49 +00003983{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3984$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003985as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003986See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003987else
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3989$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3992$as_echo_n "checking for C compiler default output file name... " >&6; }
3993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3994$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003995ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996
Matthias Kloseb9621712010-04-24 17:59:49 +00003997rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4000$as_echo_n "checking for suffix of executables... " >&6; }
4001if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002case "(($ac_try" in
4003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004 *) ac_try_echo=$ac_try;;
4005esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4007$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004009 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004010 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4011 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4013# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4014# work properly (i.e., refer to `conftest.exe'), while it won't with
4015# `rm'.
4016for ac_file in conftest.exe conftest conftest.*; do
4017 test -f "$ac_file" || continue
4018 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4021 break;;
4022 * ) break;;
4023 esac
4024done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004025else
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004028as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004029See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004031rm -f conftest conftest$ac_cv_exeext
4032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4033$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034
4035rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004036EXEEXT=$ac_cv_exeext
4037ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4039/* end confdefs.h. */
4040#include <stdio.h>
4041int
4042main ()
4043{
4044FILE *f = fopen ("conftest.out", "w");
4045 return ferror (f) || fclose (f) != 0;
4046
4047 ;
4048 return 0;
4049}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004051ac_clean_files="$ac_clean_files conftest.out"
4052# Check that the compiler produces executables we can run. If not, either
4053# the compiler is broken, or we cross compile.
4054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4055$as_echo_n "checking whether we are cross compiling... " >&6; }
4056if test "$cross_compiling" != yes; then
4057 { { ac_try="$ac_link"
4058case "(($ac_try" in
4059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4060 *) ac_try_echo=$ac_try;;
4061esac
4062eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4063$as_echo "$ac_try_echo"; } >&5
4064 (eval "$ac_link") 2>&5
4065 ac_status=$?
4066 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4067 test $ac_status = 0; }
4068 if { ac_try='./conftest$ac_cv_exeext'
4069 { { case "(($ac_try" in
4070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4071 *) ac_try_echo=$ac_try;;
4072esac
4073eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4074$as_echo "$ac_try_echo"; } >&5
4075 (eval "$ac_try") 2>&5
4076 ac_status=$?
4077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4078 test $ac_status = 0; }; }; then
4079 cross_compiling=no
4080 else
4081 if test "$cross_compiling" = maybe; then
4082 cross_compiling=yes
4083 else
4084 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004086as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004087If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004088See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 fi
4090 fi
4091fi
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4093$as_echo "$cross_compiling" >&6; }
4094
4095rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4096ac_clean_files=$ac_clean_files_save
4097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4098$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004099if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 $as_echo_n "(cached) " >&6
4101else
4102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004103/* end confdefs.h. */
4104
4105int
4106main ()
4107{
4108
4109 ;
4110 return 0;
4111}
4112_ACEOF
4113rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004114if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115case "(($ac_try" in
4116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4117 *) ac_try_echo=$ac_try;;
4118esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4120$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004121 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004122 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4124 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 for ac_file in conftest.o conftest.obj conftest.*; do
4126 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4130 break;;
4131 esac
4132done
4133else
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004135sed 's/^/| /' conftest.$ac_ext >&5
4136
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004139as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004140See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004141fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004142rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4145$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004146OBJEXT=$ac_cv_objext
4147ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4149$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004150if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004152else
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
Martin v. Löwis11437992002-04-12 09:54:03 +00004156int
4157main ()
4158{
4159#ifndef __GNUC__
4160 choke me
4161#endif
4162
4163 ;
4164 return 0;
4165}
4166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004167if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004168 ac_compiler_gnu=yes
4169else
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004173ac_cv_c_compiler_gnu=$ac_compiler_gnu
4174
4175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4177$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4178if test $ac_compiler_gnu = yes; then
4179 GCC=yes
4180else
4181 GCC=
4182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004183ac_test_CFLAGS=${CFLAGS+set}
4184ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4186$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004187if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004189else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004190 ac_save_c_werror_flag=$ac_c_werror_flag
4191 ac_c_werror_flag=yes
4192 ac_cv_prog_cc_g=no
4193 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004196
Martin v. Löwis11437992002-04-12 09:54:03 +00004197int
4198main ()
4199{
4200
4201 ;
4202 return 0;
4203}
4204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004205if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004206 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207else
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 CFLAGS=""
4209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210/* end confdefs.h. */
4211
4212int
4213main ()
4214{
4215
4216 ;
4217 return 0;
4218}
4219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004220if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221
Matthias Kloseb9621712010-04-24 17:59:49 +00004222else
4223 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226/* end confdefs.h. */
4227
4228int
4229main ()
4230{
4231
4232 ;
4233 return 0;
4234}
4235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004236if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4244 ac_c_werror_flag=$ac_save_c_werror_flag
4245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4247$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004248if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004250elif test $ac_cv_prog_cc_g = yes; then
4251 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004252 CFLAGS="-g -O2"
4253 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004254 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255 fi
4256else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004257 if test "$GCC" = yes; then
4258 CFLAGS="-O2"
4259 else
4260 CFLAGS=
4261 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4264$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004265if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004266 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004267else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004269ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004271/* end confdefs.h. */
4272#include <stdarg.h>
4273#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004274struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4276struct buf { int x; };
4277FILE * (*rcsopen) (struct buf *, struct stat *, int);
4278static char *e (p, i)
4279 char **p;
4280 int i;
4281{
4282 return p[i];
4283}
4284static char *f (char * (*g) (char **, int), char **p, ...)
4285{
4286 char *s;
4287 va_list v;
4288 va_start (v,p);
4289 s = g (p, va_arg (v,int));
4290 va_end (v);
4291 return s;
4292}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004293
4294/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4295 function prototypes and stuff, but not '\xHH' hex character constants.
4296 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004298 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4299 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4302
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4304 inside strings and character constants. */
4305#define FOO(x) 'x'
4306int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4307
Skip Montanaro6dead952003-09-25 14:50:04 +00004308int test (int i, double x);
4309struct s1 {int (*f) (int a);};
4310struct s2 {int (*f) (double a);};
4311int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4312int argc;
4313char **argv;
4314int
4315main ()
4316{
4317return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4318 ;
4319 return 0;
4320}
4321_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4323 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004324do
4325 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329rm -f core conftest.err conftest.$ac_objext
4330 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004331done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004333CC=$ac_save_CC
4334
4335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336# AC_CACHE_VAL
4337case "x$ac_cv_prog_cc_c89" in
4338 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4340$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4343$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004344 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4347$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004348esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004349if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004350
Matthias Kloseb9621712010-04-24 17:59:49 +00004351fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004352
Martin v. Löwis11437992002-04-12 09:54:03 +00004353ac_ext=c
4354ac_cpp='$CPP $CPPFLAGS'
4355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4357ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004358
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004359ac_ext=c
4360ac_cpp='$CPP $CPPFLAGS'
4361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4363ac_compiler_gnu=$ac_cv_c_compiler_gnu
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4365$as_echo_n "checking how to run the C preprocessor... " >&6; }
4366# On Suns, sometimes $CPP names a directory.
4367if test -n "$CPP" && test -d "$CPP"; then
4368 CPP=
4369fi
4370if test -z "$CPP"; then
4371 if ${ac_cv_prog_CPP+:} false; then :
4372 $as_echo_n "(cached) " >&6
4373else
4374 # Double quotes because CPP needs to be expanded
4375 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4376 do
4377 ac_preproc_ok=false
4378for ac_c_preproc_warn_flag in '' yes
4379do
4380 # Use a header file that comes with gcc, so configuring glibc
4381 # with a fresh cross-compiler works.
4382 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4383 # <limits.h> exists even on freestanding compilers.
4384 # On the NeXT, cc -E runs the code through the compiler's parser,
4385 # not just through cpp. "Syntax error" is here to catch this case.
4386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4387/* end confdefs.h. */
4388#ifdef __STDC__
4389# include <limits.h>
4390#else
4391# include <assert.h>
4392#endif
4393 Syntax error
4394_ACEOF
4395if ac_fn_c_try_cpp "$LINENO"; then :
4396
4397else
4398 # Broken: fails on valid input.
4399continue
4400fi
4401rm -f conftest.err conftest.i conftest.$ac_ext
4402
4403 # OK, works on sane cases. Now check whether nonexistent headers
4404 # can be detected and how.
4405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4406/* end confdefs.h. */
4407#include <ac_nonexistent.h>
4408_ACEOF
4409if ac_fn_c_try_cpp "$LINENO"; then :
4410 # Broken: success on invalid input.
4411continue
4412else
4413 # Passes both tests.
4414ac_preproc_ok=:
4415break
4416fi
4417rm -f conftest.err conftest.i conftest.$ac_ext
4418
4419done
4420# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4421rm -f conftest.i conftest.err conftest.$ac_ext
4422if $ac_preproc_ok; then :
4423 break
4424fi
4425
4426 done
4427 ac_cv_prog_CPP=$CPP
4428
4429fi
4430 CPP=$ac_cv_prog_CPP
4431else
4432 ac_cv_prog_CPP=$CPP
4433fi
4434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4435$as_echo "$CPP" >&6; }
4436ac_preproc_ok=false
4437for ac_c_preproc_warn_flag in '' yes
4438do
4439 # Use a header file that comes with gcc, so configuring glibc
4440 # with a fresh cross-compiler works.
4441 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4442 # <limits.h> exists even on freestanding compilers.
4443 # On the NeXT, cc -E runs the code through the compiler's parser,
4444 # not just through cpp. "Syntax error" is here to catch this case.
4445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4446/* end confdefs.h. */
4447#ifdef __STDC__
4448# include <limits.h>
4449#else
4450# include <assert.h>
4451#endif
4452 Syntax error
4453_ACEOF
4454if ac_fn_c_try_cpp "$LINENO"; then :
4455
4456else
4457 # Broken: fails on valid input.
4458continue
4459fi
4460rm -f conftest.err conftest.i conftest.$ac_ext
4461
4462 # OK, works on sane cases. Now check whether nonexistent headers
4463 # can be detected and how.
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465/* end confdefs.h. */
4466#include <ac_nonexistent.h>
4467_ACEOF
4468if ac_fn_c_try_cpp "$LINENO"; then :
4469 # Broken: success on invalid input.
4470continue
4471else
4472 # Passes both tests.
4473ac_preproc_ok=:
4474break
4475fi
4476rm -f conftest.err conftest.i conftest.$ac_ext
4477
4478done
4479# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4480rm -f conftest.i conftest.err conftest.$ac_ext
4481if $ac_preproc_ok; then :
4482
4483else
4484 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4485$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4486as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4487See \`config.log' for more details" "$LINENO" 5; }
4488fi
4489
4490ac_ext=c
4491ac_cpp='$CPP $CPPFLAGS'
4492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4494ac_compiler_gnu=$ac_cv_c_compiler_gnu
4495
4496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4497$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4498if ${ac_cv_path_GREP+:} false; then :
4499 $as_echo_n "(cached) " >&6
4500else
4501 if test -z "$GREP"; then
4502 ac_path_GREP_found=false
4503 # Loop through the user's path and test for each of PROGNAME-LIST
4504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4505for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4506do
4507 IFS=$as_save_IFS
4508 test -z "$as_dir" && as_dir=.
4509 for ac_prog in grep ggrep; do
4510 for ac_exec_ext in '' $ac_executable_extensions; do
4511 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4512 as_fn_executable_p "$ac_path_GREP" || continue
4513# Check for GNU ac_path_GREP and select it if it is found.
4514 # Check for GNU $ac_path_GREP
4515case `"$ac_path_GREP" --version 2>&1` in
4516*GNU*)
4517 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4518*)
4519 ac_count=0
4520 $as_echo_n 0123456789 >"conftest.in"
4521 while :
4522 do
4523 cat "conftest.in" "conftest.in" >"conftest.tmp"
4524 mv "conftest.tmp" "conftest.in"
4525 cp "conftest.in" "conftest.nl"
4526 $as_echo 'GREP' >> "conftest.nl"
4527 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4528 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4529 as_fn_arith $ac_count + 1 && ac_count=$as_val
4530 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4531 # Best one so far, save it but keep looking for a better one
4532 ac_cv_path_GREP="$ac_path_GREP"
4533 ac_path_GREP_max=$ac_count
4534 fi
4535 # 10*(2^10) chars as input seems more than enough
4536 test $ac_count -gt 10 && break
4537 done
4538 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4539esac
4540
4541 $ac_path_GREP_found && break 3
4542 done
4543 done
4544 done
4545IFS=$as_save_IFS
4546 if test -z "$ac_cv_path_GREP"; then
4547 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4548 fi
4549else
4550 ac_cv_path_GREP=$GREP
4551fi
4552
4553fi
4554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4555$as_echo "$ac_cv_path_GREP" >&6; }
4556 GREP="$ac_cv_path_GREP"
4557
4558
Łukasz Langaa785c872016-09-09 17:37:37 -07004559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4560$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4561if ${ac_cv_path_SED+:} false; then :
4562 $as_echo_n "(cached) " >&6
4563else
4564 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4565 for ac_i in 1 2 3 4 5 6 7; do
4566 ac_script="$ac_script$as_nl$ac_script"
4567 done
4568 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4569 { ac_script=; unset ac_script;}
4570 if test -z "$SED"; then
4571 ac_path_SED_found=false
4572 # Loop through the user's path and test for each of PROGNAME-LIST
4573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4574for as_dir in $PATH
4575do
4576 IFS=$as_save_IFS
4577 test -z "$as_dir" && as_dir=.
4578 for ac_prog in sed gsed; do
4579 for ac_exec_ext in '' $ac_executable_extensions; do
4580 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4581 as_fn_executable_p "$ac_path_SED" || continue
4582# Check for GNU ac_path_SED and select it if it is found.
4583 # Check for GNU $ac_path_SED
4584case `"$ac_path_SED" --version 2>&1` in
4585*GNU*)
4586 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4587*)
4588 ac_count=0
4589 $as_echo_n 0123456789 >"conftest.in"
4590 while :
4591 do
4592 cat "conftest.in" "conftest.in" >"conftest.tmp"
4593 mv "conftest.tmp" "conftest.in"
4594 cp "conftest.in" "conftest.nl"
4595 $as_echo '' >> "conftest.nl"
4596 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4597 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4598 as_fn_arith $ac_count + 1 && ac_count=$as_val
4599 if test $ac_count -gt ${ac_path_SED_max-0}; then
4600 # Best one so far, save it but keep looking for a better one
4601 ac_cv_path_SED="$ac_path_SED"
4602 ac_path_SED_max=$ac_count
4603 fi
4604 # 10*(2^10) chars as input seems more than enough
4605 test $ac_count -gt 10 && break
4606 done
4607 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4608esac
4609
4610 $ac_path_SED_found && break 3
4611 done
4612 done
4613 done
4614IFS=$as_save_IFS
4615 if test -z "$ac_cv_path_SED"; then
4616 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4617 fi
4618else
4619 ac_cv_path_SED=$SED
4620fi
4621
4622fi
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4624$as_echo "$ac_cv_path_SED" >&6; }
4625 SED="$ac_cv_path_SED"
4626 rm -f conftest.sed
4627
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004628
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004629
4630
Matthias Kloseb9621712010-04-24 17:59:49 +00004631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4632$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004634# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004635if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004636 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004637
4638 case $withval in
4639 no) with_cxx_main=no
4640 MAINCC='$(CC)';;
4641 yes) with_cxx_main=yes
4642 MAINCC='$(CXX)';;
4643 *) with_cxx_main=yes
4644 MAINCC=$withval
4645 if test -z "$CXX"
4646 then
4647 CXX=$withval
4648 fi;;
4649 esac
4650else
4651
4652 with_cxx_main=no
4653 MAINCC='$(CC)'
4654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004655fi
4656
Matthias Kloseb9621712010-04-24 17:59:49 +00004657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4658$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659
4660preset_cxx="$CXX"
4661if test -z "$CXX"
4662then
4663 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664 gcc) if test -n "$ac_tool_prefix"; then
4665 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4666set dummy ${ac_tool_prefix}g++; ac_word=$2
4667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4668$as_echo_n "checking for $ac_word... " >&6; }
4669if ${ac_cv_path_CXX+:} false; then :
4670 $as_echo_n "(cached) " >&6
4671else
4672 case $CXX in
4673 [\\/]* | ?:[\\/]*)
4674 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4675 ;;
4676 *)
4677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4678for as_dir in notfound
4679do
4680 IFS=$as_save_IFS
4681 test -z "$as_dir" && as_dir=.
4682 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004684 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4686 break 2
4687 fi
4688done
4689 done
4690IFS=$as_save_IFS
4691
4692 ;;
4693esac
4694fi
4695CXX=$ac_cv_path_CXX
4696if test -n "$CXX"; then
4697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4698$as_echo "$CXX" >&6; }
4699else
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701$as_echo "no" >&6; }
4702fi
4703
4704
4705fi
4706if test -z "$ac_cv_path_CXX"; then
4707 ac_pt_CXX=$CXX
4708 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004709set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4711$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004712if ${ac_cv_path_ac_pt_CXX+:} false; then :
4713 $as_echo_n "(cached) " >&6
4714else
4715 case $ac_pt_CXX in
4716 [\\/]* | ?:[\\/]*)
4717 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4718 ;;
4719 *)
4720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4721for as_dir in notfound
4722do
4723 IFS=$as_save_IFS
4724 test -z "$as_dir" && as_dir=.
4725 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004727 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4728 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4729 break 2
4730 fi
4731done
4732 done
4733IFS=$as_save_IFS
4734
4735 ;;
4736esac
4737fi
4738ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4739if test -n "$ac_pt_CXX"; then
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4741$as_echo "$ac_pt_CXX" >&6; }
4742else
4743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4744$as_echo "no" >&6; }
4745fi
4746
4747 if test "x$ac_pt_CXX" = x; then
4748 CXX="g++"
4749 else
4750 case $cross_compiling:$ac_tool_warned in
4751yes:)
4752{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4753$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4754ac_tool_warned=yes ;;
4755esac
4756 CXX=$ac_pt_CXX
4757 fi
4758else
4759 CXX="$ac_cv_path_CXX"
4760fi
4761 ;;
4762 cc) if test -n "$ac_tool_prefix"; then
4763 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4764set dummy ${ac_tool_prefix}c++; ac_word=$2
4765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4766$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004767if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004768 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004769else
4770 case $CXX in
4771 [\\/]* | ?:[\\/]*)
4772 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4773 ;;
4774 *)
4775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776for as_dir in notfound
4777do
4778 IFS=$as_save_IFS
4779 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004780 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004781 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784 break 2
4785 fi
4786done
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004788IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 ;;
4791esac
4792fi
4793CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004794if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4796$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004797else
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004801
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004802
4803fi
4804if test -z "$ac_cv_path_CXX"; then
4805 ac_pt_CXX=$CXX
4806 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4809$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004810if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004814 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004815 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816 ;;
4817 *)
4818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819for as_dir in notfound
4820do
4821 IFS=$as_save_IFS
4822 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004823 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004827 break 2
4828 fi
4829done
Matthias Kloseb9621712010-04-24 17:59:49 +00004830 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004831IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004832
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833 ;;
4834esac
4835fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4837if test -n "$ac_pt_CXX"; then
4838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4839$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004840else
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4842$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004844
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004845 if test "x$ac_pt_CXX" = x; then
4846 CXX="c++"
4847 else
4848 case $cross_compiling:$ac_tool_warned in
4849yes:)
4850{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4851$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4852ac_tool_warned=yes ;;
4853esac
4854 CXX=$ac_pt_CXX
4855 fi
4856else
4857 CXX="$ac_cv_path_CXX"
4858fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004859 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004860 clang|*/clang) if test -n "$ac_tool_prefix"; then
4861 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4862set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4864$as_echo_n "checking for $ac_word... " >&6; }
4865if ${ac_cv_path_CXX+:} false; then :
4866 $as_echo_n "(cached) " >&6
4867else
4868 case $CXX in
4869 [\\/]* | ?:[\\/]*)
4870 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4871 ;;
4872 *)
4873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874for as_dir in notfound
4875do
4876 IFS=$as_save_IFS
4877 test -z "$as_dir" && as_dir=.
4878 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004879 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004880 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4882 break 2
4883 fi
4884done
4885 done
4886IFS=$as_save_IFS
4887
Ned Deilycbfb9a52012-06-23 16:02:19 -07004888 ;;
4889esac
4890fi
4891CXX=$ac_cv_path_CXX
4892if test -n "$CXX"; then
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4894$as_echo "$CXX" >&6; }
4895else
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4897$as_echo "no" >&6; }
4898fi
4899
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004900
4901fi
4902if test -z "$ac_cv_path_CXX"; then
4903 ac_pt_CXX=$CXX
4904 # Extract the first word of "clang++", so it can be a program name with args.
4905set dummy clang++; ac_word=$2
4906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4907$as_echo_n "checking for $ac_word... " >&6; }
4908if ${ac_cv_path_ac_pt_CXX+:} false; then :
4909 $as_echo_n "(cached) " >&6
4910else
4911 case $ac_pt_CXX in
4912 [\\/]* | ?:[\\/]*)
4913 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4914 ;;
4915 *)
4916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4917for as_dir in notfound
4918do
4919 IFS=$as_save_IFS
4920 test -z "$as_dir" && as_dir=.
4921 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004922 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004923 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4924 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4925 break 2
4926 fi
4927done
4928 done
4929IFS=$as_save_IFS
4930
4931 ;;
4932esac
4933fi
4934ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4935if test -n "$ac_pt_CXX"; then
4936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4937$as_echo "$ac_pt_CXX" >&6; }
4938else
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4940$as_echo "no" >&6; }
4941fi
4942
4943 if test "x$ac_pt_CXX" = x; then
4944 CXX="clang++"
4945 else
4946 case $cross_compiling:$ac_tool_warned in
4947yes:)
4948{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4949$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4950ac_tool_warned=yes ;;
4951esac
4952 CXX=$ac_pt_CXX
4953 fi
4954else
4955 CXX="$ac_cv_path_CXX"
4956fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004957 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004958 icc|*/icc) if test -n "$ac_tool_prefix"; then
4959 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4960set dummy ${ac_tool_prefix}icpc; ac_word=$2
4961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962$as_echo_n "checking for $ac_word... " >&6; }
4963if ${ac_cv_path_CXX+:} false; then :
4964 $as_echo_n "(cached) " >&6
4965else
4966 case $CXX in
4967 [\\/]* | ?:[\\/]*)
4968 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4969 ;;
4970 *)
4971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972for as_dir in notfound
4973do
4974 IFS=$as_save_IFS
4975 test -z "$as_dir" && as_dir=.
4976 for ac_exec_ext in '' $ac_executable_extensions; do
4977 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4978 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4979 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4980 break 2
4981 fi
4982done
4983 done
4984IFS=$as_save_IFS
4985
4986 ;;
4987esac
4988fi
4989CXX=$ac_cv_path_CXX
4990if test -n "$CXX"; then
4991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4992$as_echo "$CXX" >&6; }
4993else
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
4996fi
4997
4998
4999fi
5000if test -z "$ac_cv_path_CXX"; then
5001 ac_pt_CXX=$CXX
5002 # Extract the first word of "icpc", so it can be a program name with args.
5003set dummy icpc; ac_word=$2
5004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005$as_echo_n "checking for $ac_word... " >&6; }
5006if ${ac_cv_path_ac_pt_CXX+:} false; then :
5007 $as_echo_n "(cached) " >&6
5008else
5009 case $ac_pt_CXX in
5010 [\\/]* | ?:[\\/]*)
5011 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5012 ;;
5013 *)
5014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5015for as_dir in notfound
5016do
5017 IFS=$as_save_IFS
5018 test -z "$as_dir" && as_dir=.
5019 for ac_exec_ext in '' $ac_executable_extensions; do
5020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5021 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5023 break 2
5024 fi
5025done
5026 done
5027IFS=$as_save_IFS
5028
5029 ;;
5030esac
5031fi
5032ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5033if test -n "$ac_pt_CXX"; then
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5035$as_echo "$ac_pt_CXX" >&6; }
5036else
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038$as_echo "no" >&6; }
5039fi
5040
5041 if test "x$ac_pt_CXX" = x; then
5042 CXX="icpc"
5043 else
5044 case $cross_compiling:$ac_tool_warned in
5045yes:)
5046{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5047$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5048ac_tool_warned=yes ;;
5049esac
5050 CXX=$ac_pt_CXX
5051 fi
5052else
5053 CXX="$ac_cv_path_CXX"
5054fi
5055 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005056 esac
5057 if test "$CXX" = "notfound"
5058 then
5059 CXX=""
5060 fi
5061fi
5062if test -z "$CXX"
5063then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005064 if test -n "$ac_tool_prefix"; then
5065 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5066 do
5067 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5068set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005071if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005073else
5074 if test -n "$CXX"; then
5075 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005086 break 2
5087 fi
5088done
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005090IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005091
5092fi
5093fi
5094CXX=$ac_cv_prog_CXX
5095if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5097$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005098else
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005101fi
5102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005103
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005104 test -n "$CXX" && break
5105 done
5106fi
5107if test -z "$CXX"; then
5108 ac_ct_CXX=$CXX
5109 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5110do
5111 # Extract the first word of "$ac_prog", so it can be a program name with args.
5112set dummy $ac_prog; ac_word=$2
5113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5114$as_echo_n "checking for $ac_word... " >&6; }
5115if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5116 $as_echo_n "(cached) " >&6
5117else
5118 if test -n "$ac_ct_CXX"; then
5119 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5120else
5121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5122for as_dir in $PATH
5123do
5124 IFS=$as_save_IFS
5125 test -z "$as_dir" && as_dir=.
5126 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005127 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005128 ac_cv_prog_ac_ct_CXX="$ac_prog"
5129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5130 break 2
5131 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005133 done
5134IFS=$as_save_IFS
5135
5136fi
5137fi
5138ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5139if test -n "$ac_ct_CXX"; then
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5141$as_echo "$ac_ct_CXX" >&6; }
5142else
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5144$as_echo "no" >&6; }
5145fi
5146
5147
5148 test -n "$ac_ct_CXX" && break
5149done
5150
5151 if test "x$ac_ct_CXX" = x; then
5152 CXX="notfound"
5153 else
5154 case $cross_compiling:$ac_tool_warned in
5155yes:)
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5157$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5158ac_tool_warned=yes ;;
5159esac
5160 CXX=$ac_ct_CXX
5161 fi
5162fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005163
5164 if test "$CXX" = "notfound"
5165 then
5166 CXX=""
5167 fi
5168fi
5169if test "$preset_cxx" != "$CXX"
5170then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005171 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005172
5173 By default, distutils will build C++ extension modules with \"$CXX\".
5174 If this is not intended, then set CXX on the configure command line.
5175 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005176$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005177
5178 By default, distutils will build C++ extension modules with \"$CXX\".
5179 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005180 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005181fi
5182
5183
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005184MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5185
5186
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5188$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5189cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005190#undef bfin
5191#undef cris
5192#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005193#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005194#undef hppa
5195#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005196#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005197#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005198#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005199#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005200#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005201#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005202 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005203#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204# if defined(__x86_64__) && defined(__LP64__)
5205 x86_64-linux-gnu
5206# elif defined(__x86_64__) && defined(__ILP32__)
5207 x86_64-linux-gnux32
5208# elif defined(__i386__)
5209 i386-linux-gnu
5210# elif defined(__aarch64__) && defined(__AARCH64EL__)
5211# if defined(__ILP32__)
5212 aarch64_ilp32-linux-gnu
5213# else
5214 aarch64-linux-gnu
5215# endif
5216# elif defined(__aarch64__) && defined(__AARCH64EB__)
5217# if defined(__ILP32__)
5218 aarch64_be_ilp32-linux-gnu
5219# else
5220 aarch64_be-linux-gnu
5221# endif
5222# elif defined(__alpha__)
5223 alpha-linux-gnu
5224# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5225# if defined(__ARMEL__)
5226 arm-linux-gnueabihf
5227# else
5228 armeb-linux-gnueabihf
5229# endif
5230# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5231# if defined(__ARMEL__)
5232 arm-linux-gnueabi
5233# else
5234 armeb-linux-gnueabi
5235# endif
5236# elif defined(__hppa__)
5237 hppa-linux-gnu
5238# elif defined(__ia64__)
5239 ia64-linux-gnu
5240# elif defined(__m68k__) && !defined(__mcoldfire__)
5241 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005242# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5243# if _MIPS_SIM == _ABIO32
5244 mipsisa32r6el-linux-gnu
5245# elif _MIPS_SIM == _ABIN32
5246 mipsisa64r6el-linux-gnuabin32
5247# elif _MIPS_SIM == _ABI64
5248 mipsisa64r6el-linux-gnuabi64
5249# else
5250# error unknown platform triplet
5251# endif
5252# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5253# if _MIPS_SIM == _ABIO32
5254 mipsisa32r6-linux-gnu
5255# elif _MIPS_SIM == _ABIN32
5256 mipsisa64r6-linux-gnuabin32
5257# elif _MIPS_SIM == _ABI64
5258 mipsisa64r6-linux-gnuabi64
5259# else
5260# error unknown platform triplet
5261# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005262# elif defined(__mips_hard_float) && defined(_MIPSEL)
5263# if _MIPS_SIM == _ABIO32
5264 mipsel-linux-gnu
5265# elif _MIPS_SIM == _ABIN32
5266 mips64el-linux-gnuabin32
5267# elif _MIPS_SIM == _ABI64
5268 mips64el-linux-gnuabi64
5269# else
5270# error unknown platform triplet
5271# endif
5272# elif defined(__mips_hard_float)
5273# if _MIPS_SIM == _ABIO32
5274 mips-linux-gnu
5275# elif _MIPS_SIM == _ABIN32
5276 mips64-linux-gnuabin32
5277# elif _MIPS_SIM == _ABI64
5278 mips64-linux-gnuabi64
5279# else
5280# error unknown platform triplet
5281# endif
5282# elif defined(__or1k__)
5283 or1k-linux-gnu
5284# elif defined(__powerpc__) && defined(__SPE__)
5285 powerpc-linux-gnuspe
5286# elif defined(__powerpc64__)
5287# if defined(__LITTLE_ENDIAN__)
5288 powerpc64le-linux-gnu
5289# else
5290 powerpc64-linux-gnu
5291# endif
5292# elif defined(__powerpc__)
5293 powerpc-linux-gnu
5294# elif defined(__s390x__)
5295 s390x-linux-gnu
5296# elif defined(__s390__)
5297 s390-linux-gnu
5298# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5299 sh4-linux-gnu
5300# elif defined(__sparc__) && defined(__arch64__)
5301 sparc64-linux-gnu
5302# elif defined(__sparc__)
5303 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005304# elif defined(__riscv)
5305# if __riscv_xlen == 32
5306 riscv32-linux-gnu
5307# elif __riscv_xlen == 64
5308 riscv64-linux-gnu
5309# else
5310# error unknown platform triplet
5311# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005312# else
5313# error unknown platform triplet
5314# endif
5315#elif defined(__FreeBSD_kernel__)
5316# if defined(__LP64__)
5317 x86_64-kfreebsd-gnu
5318# elif defined(__i386__)
5319 i386-kfreebsd-gnu
5320# else
5321# error unknown platform triplet
5322# endif
5323#elif defined(__gnu_hurd__)
5324 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005325#elif defined(__APPLE__)
5326 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005327#elif defined(__VXWORKS__)
5328 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005329#else
5330# error unknown platform triplet
5331#endif
5332
5333EOF
5334
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005335if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005336 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5338$as_echo "$PLATFORM_TRIPLET" >&6; }
5339else
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5341$as_echo "none" >&6; }
5342fi
5343rm -f conftest.c conftest.out
5344
5345if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5346 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5347 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5348 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005349elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5350 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005351fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005352
doko@ubuntu.com55532312016-06-14 08:55:19 +02005353if test x$MULTIARCH != x; then
5354 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5355fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005356
5357
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5359$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5360save_LDFLAGS="$LDFLAGS"
5361LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005362
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5364/* end confdefs.h. */
5365
5366int
5367main ()
5368{
5369
5370 ;
5371 return 0;
5372}
5373_ACEOF
5374if ac_fn_c_try_link "$LINENO"; then :
5375 NO_AS_NEEDED="-Wl,--no-as-needed"
5376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5377$as_echo "yes" >&6; }
5378else
5379 NO_AS_NEEDED=""
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5381$as_echo "no" >&6; }
5382fi
5383rm -f core conftest.err conftest.$ac_objext \
5384 conftest$ac_exeext conftest.$ac_ext
5385LDFLAGS="$save_LDFLAGS"
5386
5387
5388
5389# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390
Matthias Kloseb9621712010-04-24 17:59:49 +00005391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5392$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005393if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395else
5396 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5397 then ac_cv_path_EGREP="$GREP -E"
5398 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 # Loop through the user's path and test for each of PROGNAME-LIST
5402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5404do
5405 IFS=$as_save_IFS
5406 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 for ac_prog in egrep; do
5408 for ac_exec_ext in '' $ac_executable_extensions; do
5409 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005410 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005411# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 # Check for GNU $ac_path_EGREP
5413case `"$ac_path_EGREP" --version 2>&1` in
5414*GNU*)
5415 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5416*)
5417 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419 while :
5420 do
5421 cat "conftest.in" "conftest.in" >"conftest.tmp"
5422 mv "conftest.tmp" "conftest.in"
5423 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5426 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5429 # Best one so far, save it but keep looking for a better one
5430 ac_cv_path_EGREP="$ac_path_EGREP"
5431 ac_path_EGREP_max=$ac_count
5432 fi
5433 # 10*(2^10) chars as input seems more than enough
5434 test $ac_count -gt 10 && break
5435 done
5436 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5437esac
5438
Matthias Kloseb9621712010-04-24 17:59:49 +00005439 $ac_path_EGREP_found && break 3
5440 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005444 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005445 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447else
5448 ac_cv_path_EGREP=$EGREP
5449fi
5450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451 fi
5452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5454$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005456
5457
Matthias Kloseb9621712010-04-24 17:59:49 +00005458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5459$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005460if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005461 $as_echo_n "(cached) " >&6
5462else
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005464/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005465#include <stdlib.h>
5466#include <stdarg.h>
5467#include <string.h>
5468#include <float.h>
5469
5470int
5471main ()
5472{
5473
5474 ;
5475 return 0;
5476}
5477_ACEOF
5478if ac_fn_c_try_compile "$LINENO"; then :
5479 ac_cv_header_stdc=yes
5480else
5481 ac_cv_header_stdc=no
5482fi
5483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5484
5485if test $ac_cv_header_stdc = yes; then
5486 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5488/* end confdefs.h. */
5489#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005490
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005491_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005493 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005495else
Matthias Kloseb9621712010-04-24 17:59:49 +00005496 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005497fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005498rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499
Matthias Kloseb9621712010-04-24 17:59:49 +00005500fi
5501
5502if test $ac_cv_header_stdc = yes; then
5503 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5505/* end confdefs.h. */
5506#include <stdlib.h>
5507
5508_ACEOF
5509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5510 $EGREP "free" >/dev/null 2>&1; then :
5511
5512else
5513 ac_cv_header_stdc=no
5514fi
5515rm -f conftest*
5516
5517fi
5518
5519if test $ac_cv_header_stdc = yes; then
5520 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5521 if test "$cross_compiling" = yes; then :
5522 :
5523else
5524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5525/* end confdefs.h. */
5526#include <ctype.h>
5527#include <stdlib.h>
5528#if ((' ' & 0x0FF) == 0x020)
5529# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5530# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5531#else
5532# define ISLOWER(c) \
5533 (('a' <= (c) && (c) <= 'i') \
5534 || ('j' <= (c) && (c) <= 'r') \
5535 || ('s' <= (c) && (c) <= 'z'))
5536# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5537#endif
5538
5539#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5540int
5541main ()
5542{
5543 int i;
5544 for (i = 0; i < 256; i++)
5545 if (XOR (islower (i), ISLOWER (i))
5546 || toupper (i) != TOUPPER (i))
5547 return 2;
5548 return 0;
5549}
5550_ACEOF
5551if ac_fn_c_try_run "$LINENO"; then :
5552
5553else
5554 ac_cv_header_stdc=no
5555fi
5556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5557 conftest.$ac_objext conftest.beam conftest.$ac_ext
5558fi
5559
5560fi
5561fi
5562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5563$as_echo "$ac_cv_header_stdc" >&6; }
5564if test $ac_cv_header_stdc = yes; then
5565
5566$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5567
5568fi
5569
5570# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5571for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5572 inttypes.h stdint.h unistd.h
5573do :
5574 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5575ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5576"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005577if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005578 cat >>confdefs.h <<_ACEOF
5579#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5580_ACEOF
5581
5582fi
5583
5584done
5585
5586
5587
5588 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005589if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005590 MINIX=yes
5591else
5592 MINIX=
5593fi
5594
5595
5596 if test "$MINIX" = yes; then
5597
5598$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5599
5600
5601$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5602
5603
5604$as_echo "#define _MINIX 1" >>confdefs.h
5605
5606 fi
5607
5608
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5610$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005611if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005612 $as_echo_n "(cached) " >&6
5613else
5614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5615/* end confdefs.h. */
5616
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005617# define __EXTENSIONS__ 1
5618 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005619int
5620main ()
5621{
5622
5623 ;
5624 return 0;
5625}
5626_ACEOF
5627if ac_fn_c_try_compile "$LINENO"; then :
5628 ac_cv_safe_to_define___extensions__=yes
5629else
5630 ac_cv_safe_to_define___extensions__=no
5631fi
5632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5633fi
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5635$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5636 test $ac_cv_safe_to_define___extensions__ = yes &&
5637 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5638
5639 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5640
5641 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5642
5643 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5644
5645 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5646
5647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648
Xavier de Gaye95750b12016-07-09 11:05:42 +02005649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5650$as_echo_n "checking for the Android API level... " >&6; }
5651cat >> conftest.c <<EOF
5652#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005653android_api = __ANDROID_API__
5654arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005655#else
5656#error not Android
5657#endif
5658EOF
5659
5660if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005661 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5662 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5664$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005665 if test -z "$ANDROID_API_LEVEL"; then
5666 echo 'Fatal: you must define __ANDROID_API__'
5667 exit 1
5668 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005669
5670cat >>confdefs.h <<_ACEOF
5671#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5672_ACEOF
5673
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005674
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5676$as_echo_n "checking for the Android arm ABI... " >&6; }
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5678$as_echo "$_arm_arch" >&6; }
5679 if test "$_arm_arch" = 7; then
5680 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5681 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5682 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005683else
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5685$as_echo "not Android" >&6; }
5686fi
5687rm -f conftest.c conftest.out
5688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689# Check for unsupported systems
5690case $ac_sys_system/$ac_sys_release in
5691atheos*|Linux*/1*)
5692 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5693 echo See README for details.
5694 exit 1;;
5695esac
5696
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5699$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
5701# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005702if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 withval=$with_suffix;
5704 case $withval in
5705 no) EXEEXT=;;
5706 yes) EXEEXT=.exe;;
5707 *) EXEEXT=$withval;;
5708 esac
5709fi
5710
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5712$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
5714# Test whether we're running on a non-case-sensitive system, in which
5715# case we give a warning if no ext is given
5716
Matthias Kloseb9621712010-04-24 17:59:49 +00005717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5718$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719if test ! -d CaseSensitiveTestDir; then
5720mkdir CaseSensitiveTestDir
5721fi
5722
5723if test -d casesensitivetestdir
5724then
Matthias Kloseb9621712010-04-24 17:59:49 +00005725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5726$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727 BUILDEXEEXT=.exe
5728else
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5730$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731 BUILDEXEEXT=$EXEEXT
5732fi
5733rmdir CaseSensitiveTestDir
5734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735case $ac_sys_system in
5736hp*|HP*)
5737 case $CC in
5738 cc|*/cc) CC="$CC -Ae";;
5739 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740esac
5741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742
Matthias Kloseb9621712010-04-24 17:59:49 +00005743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5744$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745if test -z "$LIBRARY"
5746then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005747 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5750$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751
5752# LDLIBRARY is the name of the library to link against (as opposed to the
5753# name of the library into which to insert object files). BLDLIBRARY is also
5754# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5755# is blank as the main program is not linked directly against LDLIBRARY.
5756# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5757# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5758# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5759# DLLLIBRARY is the shared (i.e., DLL) library.
5760#
5761# RUNSHARED is used to run shared python without installed libraries
5762#
5763# INSTSONAME is the name of the shared library that will be use to install
5764# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005765#
5766# LDVERSION is the shared library version number, normally the Python version
5767# with the ABI build flags appended.
5768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770
5771
5772
5773
5774
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776LDLIBRARY="$LIBRARY"
5777BLDLIBRARY='$(LDLIBRARY)'
5778INSTSONAME='$(LDLIBRARY)'
5779DLLLIBRARY=''
5780LDLIBRARYDIR=''
5781RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005782LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784# LINKCC is the command that links the python executable -- default is $(CC).
5785# If CXX is set, and if it is needed to link a main function that was
5786# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5787# python might then depend on the C++ runtime
5788# This is altered for AIX in order to build the export list before
5789# linking.
5790
Matthias Kloseb9621712010-04-24 17:59:49 +00005791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5792$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793if test -z "$LINKCC"
5794then
5795 LINKCC='$(PURIFY) $(MAINCC)'
5796 case $ac_sys_system in
5797 AIX*)
5798 exp_extra="\"\""
5799 if test $ac_sys_release -ge 5 -o \
5800 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5801 exp_extra="."
5802 fi
5803 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804 QNX*)
5805 # qcc must be used because the other compilers do not
5806 # support -N.
5807 LINKCC=qcc;;
5808 esac
5809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5811$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812
5813# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5814# make sure we default having it set to "no": this is used by
5815# distutils.unixccompiler to know if it should add --enable-new-dtags
5816# to linker command lines, and failing to detect GNU ld simply results
5817# in the same bahaviour as before.
5818
Matthias Kloseb9621712010-04-24 17:59:49 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5820$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821ac_prog=ld
5822if test "$GCC" = yes; then
5823 ac_prog=`$CC -print-prog-name=ld`
5824fi
5825case `"$ac_prog" -V 2>&1 < /dev/null` in
5826 *GNU*)
5827 GNULD=yes;;
5828 *)
5829 GNULD=no;;
5830esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5832$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833
Matthias Kloseb9621712010-04-24 17:59:49 +00005834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5835$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005837if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838 enableval=$enable_shared;
5839fi
5840
5841
5842if test -z "$enable_shared"
5843then
5844 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005845 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846 enable_shared="yes";;
5847 *)
5848 enable_shared="no";;
5849 esac
5850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5852$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853
Matthias Kloseb9621712010-04-24 17:59:49 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5855$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005857if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005858 enableval=$enable_profiling;
5859fi
5860
5861if test "x$enable_profiling" = xyes; then
5862 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005863 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865/* end confdefs.h. */
5866int main() { return 0; }
5867_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868if ac_fn_c_try_link "$LINENO"; then :
5869
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005873rm -f core conftest.err conftest.$ac_objext \
5874 conftest$ac_exeext conftest.$ac_ext
5875 CC="$ac_save_cc"
5876else
5877 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5880$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881
doko@ubuntu.comba015832012-06-30 16:52:05 +02005882if test "x$enable_profiling" = xyes; then
5883 BASECFLAGS="-pg $BASECFLAGS"
5884 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885fi
5886
Matthias Kloseb9621712010-04-24 17:59:49 +00005887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5888$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889
5890# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5891# library that we build, but we do not want to link against it (we
5892# will find it with a -framework option). For this reason there is an
5893# extra variable BLDLIBRARY against which Python and the extension
5894# modules are linked, BLDLIBRARY. This is normally the same as
5895# LDLIBRARY, but empty for MacOSX framework builds.
5896if test "$enable_framework"
5897then
5898 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005899 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 BLDLIBRARY=''
5901else
5902 BLDLIBRARY='$(LDLIBRARY)'
5903fi
5904
5905# Other platforms follow
5906if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005907 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
Matthias Kloseb9621712010-04-24 17:59:49 +00005909$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910
5911 case $ac_sys_system in
5912 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).dll.a'
5914 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
5916 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).so'
5918 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005919 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005921 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005922 then
5923 PY3LIBRARY=libpython3.so
5924 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005926 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).so'
5928 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005929 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005931 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005932 then
5933 PY3LIBRARY=libpython3.so
5934 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
5936 hp*|HP*)
5937 case `uname -m` in
5938 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ;;
5944 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005945 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005946 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 LDLIBRARY='libpython$(LDVERSION).dylib'
5950 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005951 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005953 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005954 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005955 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005956 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957
5958 esac
5959else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005960 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 case $ac_sys_system in
5962 CYGWIN*)
5963 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005964 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ;;
5966 esac
5967fi
5968
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005969if test "$cross_compiling" = yes; then
5970 RUNSHARED=
5971fi
5972
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5974$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005977if test -n "$ac_tool_prefix"; then
5978 for ac_prog in ar aal
5979 do
5980 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5981set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005984if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986else
5987 if test -n "$AR"; then
5988 ac_cv_prog_AR="$AR" # Let the user override the test.
5989else
5990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993 IFS=$as_save_IFS
5994 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005997 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999 break 2
6000 fi
6001done
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003IFS=$as_save_IFS
6004
6005fi
6006fi
6007AR=$ac_cv_prog_AR
6008if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6010$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011else
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6013$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014fi
6015
6016
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006017 test -n "$AR" && break
6018 done
6019fi
6020if test -z "$AR"; then
6021 ac_ct_AR=$AR
6022 for ac_prog in ar aal
6023do
6024 # Extract the first word of "$ac_prog", so it can be a program name with args.
6025set dummy $ac_prog; ac_word=$2
6026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6027$as_echo_n "checking for $ac_word... " >&6; }
6028if ${ac_cv_prog_ac_ct_AR+:} false; then :
6029 $as_echo_n "(cached) " >&6
6030else
6031 if test -n "$ac_ct_AR"; then
6032 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6033else
6034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035for as_dir in $PATH
6036do
6037 IFS=$as_save_IFS
6038 test -z "$as_dir" && as_dir=.
6039 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006041 ac_cv_prog_ac_ct_AR="$ac_prog"
6042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6043 break 2
6044 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006046 done
6047IFS=$as_save_IFS
6048
6049fi
6050fi
6051ac_ct_AR=$ac_cv_prog_ac_ct_AR
6052if test -n "$ac_ct_AR"; then
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6054$as_echo "$ac_ct_AR" >&6; }
6055else
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6057$as_echo "no" >&6; }
6058fi
6059
6060
6061 test -n "$ac_ct_AR" && break
6062done
6063
6064 if test "x$ac_ct_AR" = x; then
6065 AR="ar"
6066 else
6067 case $cross_compiling:$ac_tool_warned in
6068yes:)
6069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6071ac_tool_warned=yes ;;
6072esac
6073 AR=$ac_ct_AR
6074 fi
6075fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076
6077
6078# tweak ARFLAGS only if the user didn't set it on the command line
6079
6080if test -z "$ARFLAGS"
6081then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006082 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083fi
6084
doko@ubuntu.com58844492012-06-30 18:25:32 +02006085if test -n "$ac_tool_prefix"; then
6086 for ac_prog in readelf
6087 do
6088 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6089set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6091$as_echo_n "checking for $ac_word... " >&6; }
6092if ${ac_cv_prog_READELF+:} false; then :
6093 $as_echo_n "(cached) " >&6
6094else
6095 if test -n "$READELF"; then
6096 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6097else
6098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6099for as_dir in $PATH
6100do
6101 IFS=$as_save_IFS
6102 test -z "$as_dir" && as_dir=.
6103 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006105 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6107 break 2
6108 fi
6109done
6110 done
6111IFS=$as_save_IFS
6112
6113fi
6114fi
6115READELF=$ac_cv_prog_READELF
6116if test -n "$READELF"; then
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6118$as_echo "$READELF" >&6; }
6119else
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6121$as_echo "no" >&6; }
6122fi
6123
6124
6125 test -n "$READELF" && break
6126 done
6127fi
6128if test -z "$READELF"; then
6129 ac_ct_READELF=$READELF
6130 for ac_prog in readelf
6131do
6132 # Extract the first word of "$ac_prog", so it can be a program name with args.
6133set dummy $ac_prog; ac_word=$2
6134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6135$as_echo_n "checking for $ac_word... " >&6; }
6136if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6137 $as_echo_n "(cached) " >&6
6138else
6139 if test -n "$ac_ct_READELF"; then
6140 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6141else
6142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6143for as_dir in $PATH
6144do
6145 IFS=$as_save_IFS
6146 test -z "$as_dir" && as_dir=.
6147 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006148 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006149 ac_cv_prog_ac_ct_READELF="$ac_prog"
6150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6151 break 2
6152 fi
6153done
6154 done
6155IFS=$as_save_IFS
6156
6157fi
6158fi
6159ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6160if test -n "$ac_ct_READELF"; then
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6162$as_echo "$ac_ct_READELF" >&6; }
6163else
6164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6165$as_echo "no" >&6; }
6166fi
6167
6168
6169 test -n "$ac_ct_READELF" && break
6170done
6171
6172 if test "x$ac_ct_READELF" = x; then
6173 READELF=":"
6174 else
6175 case $cross_compiling:$ac_tool_warned in
6176yes:)
6177{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6178$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6179ac_tool_warned=yes ;;
6180esac
6181 READELF=$ac_ct_READELF
6182 fi
6183fi
6184
6185if test "$cross_compiling" = yes; then
6186 case "$READELF" in
6187 readelf|:)
6188 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6189 ;;
6190 esac
6191fi
6192
6193
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006196hp*|HP*)
6197 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198 if test -z "$INSTALL"
6199 then
6200 INSTALL="${srcdir}/install-sh -c"
6201 fi
6202esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203# Find a good install program. We prefer a C program (faster),
6204# so one script is as good as another. But avoid the broken or
6205# incompatible versions:
6206# SysV /etc/install, /usr/sbin/install
6207# SunOS /usr/etc/install
6208# IRIX /sbin/install
6209# AIX /bin/install
6210# AmigaOS /C/install, which installs bootblocks on floppy discs
6211# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6212# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6213# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6214# OS/2's system install, which has a completely different semantic
6215# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006216# Reject install programs that cannot install multiple files.
6217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6218$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006220if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006221 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222else
6223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6224for as_dir in $PATH
6225do
6226 IFS=$as_save_IFS
6227 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006228 # Account for people who put trailing slashes in PATH elements.
6229case $as_dir/ in #((
6230 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006232 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233 /usr/ucb/* ) ;;
6234 *)
6235 # OSF1 and SCO ODT 3.0 have their own names for install.
6236 # Don't use installbsd from OSF since it installs stuff as root
6237 # by default.
6238 for ac_prog in ginstall scoinst install; do
6239 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006240 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241 if test $ac_prog = install &&
6242 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6243 # AIX install. It has an incompatible calling convention.
6244 :
6245 elif test $ac_prog = install &&
6246 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6247 # program-specific install script used by HP pwplus--don't use.
6248 :
6249 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006250 rm -rf conftest.one conftest.two conftest.dir
6251 echo one > conftest.one
6252 echo two > conftest.two
6253 mkdir conftest.dir
6254 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6255 test -s conftest.one && test -s conftest.two &&
6256 test -s conftest.dir/conftest.one &&
6257 test -s conftest.dir/conftest.two
6258 then
6259 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6260 break 3
6261 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262 fi
6263 fi
6264 done
6265 done
6266 ;;
6267esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006268
6269 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270IFS=$as_save_IFS
6271
Matthias Kloseb9621712010-04-24 17:59:49 +00006272rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273
6274fi
6275 if test "${ac_cv_path_install+set}" = set; then
6276 INSTALL=$ac_cv_path_install
6277 else
6278 # As a last resort, use the slow shell script. Don't cache a
6279 # value for INSTALL within a source directory, because that will
6280 # break other packages using the cache if that directory is
6281 # removed, or if the value is a relative name.
6282 INSTALL=$ac_install_sh
6283 fi
6284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6286$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287
6288# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6289# It thinks the first close brace ends the variable substitution.
6290test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6291
6292test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6293
6294test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6295
Matthias Klose93a0ef12012-03-15 18:08:34 +01006296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6297$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6298if test -z "$MKDIR_P"; then
6299 if ${ac_cv_path_mkdir+:} false; then :
6300 $as_echo_n "(cached) " >&6
6301else
6302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6303for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6304do
6305 IFS=$as_save_IFS
6306 test -z "$as_dir" && as_dir=.
6307 for ac_prog in mkdir gmkdir; do
6308 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006309 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006310 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6311 'mkdir (GNU coreutils) '* | \
6312 'mkdir (coreutils) '* | \
6313 'mkdir (fileutils) '4.1*)
6314 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6315 break 3;;
6316 esac
6317 done
6318 done
6319 done
6320IFS=$as_save_IFS
6321
6322fi
6323
6324 test -d ./--version && rmdir ./--version
6325 if test "${ac_cv_path_mkdir+set}" = set; then
6326 MKDIR_P="$ac_cv_path_mkdir -p"
6327 else
6328 # As a last resort, use the slow shell script. Don't cache a
6329 # value for MKDIR_P within a source directory, because that will
6330 # break other packages using the cache if that directory is
6331 # removed, or if the value is a relative name.
6332 MKDIR_P="$ac_install_sh -d"
6333 fi
6334fi
6335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6336$as_echo "$MKDIR_P" >&6; }
6337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338
6339# Not every filesystem supports hard links
6340
6341if test -z "$LN" ; then
6342 case $ac_sys_system in
6343 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344 *) LN=ln;;
6345 esac
6346fi
6347
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006348# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006349
6350ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006351
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6354$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006355
6356# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006357if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006358 withval=$with_pydebug;
6359if test "$withval" != no
6360then
6361
Matthias Kloseb9621712010-04-24 17:59:49 +00006362$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363
Matthias Kloseb9621712010-04-24 17:59:49 +00006364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6365$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006366 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006367 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006368else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006370fi
6371else
Matthias Kloseb9621712010-04-24 17:59:49 +00006372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6373$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374fi
6375
6376
Victor Stinnerf4e47032019-04-25 00:56:28 +02006377# Check for --with-trace-refs
6378# --with-trace-refs
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6380$as_echo_n "checking for --with-trace-refs... " >&6; }
6381
6382# Check whether --with-trace-refs was given.
6383if test "${with_trace_refs+set}" = set; then :
6384 withval=$with_trace_refs;
6385else
6386 with_trace_refs=no
6387fi
6388
6389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6390$as_echo "$with_trace_refs" >&6; }
6391
6392if test "$with_trace_refs" = "yes"
6393then
6394
6395$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6396
6397fi
6398
6399# Check for --with-assertions.
6400# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006401assertions='false'
6402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6403$as_echo_n "checking for --with-assertions... " >&6; }
6404
6405# Check whether --with-assertions was given.
6406if test "${with_assertions+set}" = set; then :
6407 withval=$with_assertions;
6408if test "$withval" != no
6409then
6410 assertions='true'
6411fi
6412fi
6413
6414if test "$assertions" = 'true'; then
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6416$as_echo "yes" >&6; }
6417elif test "$Py_DEBUG" = 'true'; then
6418 assertions='true'
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6420$as_echo "implied by --with-pydebug" >&6; }
6421else
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
Brett Cannon63d98bc2016-09-06 17:12:40 -07006426# Enable optimization flags
6427
6428
6429Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6431$as_echo_n "checking for --enable-optimizations... " >&6; }
6432# Check whether --enable-optimizations was given.
6433if test "${enable_optimizations+set}" = set; then :
6434 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006435if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006436then
6437 Py_OPT='true'
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6439$as_echo "yes" >&6; };
6440else
6441 Py_OPT='false'
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6443$as_echo "no" >&6; };
6444fi
6445else
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6447$as_echo "no" >&6; }
6448fi
6449
6450if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006451 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6452 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006453 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006454 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006455 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006456 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006457 DEF_MAKE_RULE="build_all"
6458else
6459 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006460 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006461 DEF_MAKE_RULE="all"
6462fi
6463
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006464
6465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6466$as_echo_n "checking PROFILE_TASK... " >&6; }
6467if test -z "$PROFILE_TASK"
6468then
6469 PROFILE_TASK='-m test --pgo'
6470fi
6471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6472$as_echo "$PROFILE_TASK" >&6; }
6473
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006474# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6475# normal names in the default $PATH (ie: Ubuntu). They exist under the
6476# non-suffixed name in their versioned llvm directory.
6477
6478llvm_bin_dir=''
6479llvm_path="${PATH}"
6480if test "${CC}" = "clang"
6481then
6482 clang_bin=`which clang`
6483 # Some systems install clang elsewhere as a symlink to the real path
6484 # which is where the related llvm tools are located.
6485 if test -L "${clang_bin}"
6486 then
6487 clang_dir=`dirname "${clang_bin}"`
6488 clang_bin=`readlink "${clang_bin}"`
6489 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6490 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6491 fi
6492fi
6493
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006494# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6496$as_echo_n "checking for --with-lto... " >&6; }
6497
6498# Check whether --with-lto was given.
6499if test "${with_lto+set}" = set; then :
6500 withval=$with_lto;
6501if test "$withval" != no
6502then
6503 Py_LTO='true'
6504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6505$as_echo "yes" >&6; };
6506else
6507 Py_LTO='false'
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509$as_echo "no" >&6; };
6510fi
6511else
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6513$as_echo "no" >&6; }
6514fi
6515
6516if test "$Py_LTO" = 'true' ; then
6517 case $CC in
6518 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006519
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006520 if test -n "$ac_tool_prefix"; then
6521 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6522set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524$as_echo_n "checking for $ac_word... " >&6; }
6525if ${ac_cv_path_LLVM_AR+:} false; then :
6526 $as_echo_n "(cached) " >&6
6527else
6528 case $LLVM_AR in
6529 [\\/]* | ?:[\\/]*)
6530 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6531 ;;
6532 *)
6533 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6534for as_dir in ${llvm_path}
6535do
6536 IFS=$as_save_IFS
6537 test -z "$as_dir" && as_dir=.
6538 for ac_exec_ext in '' $ac_executable_extensions; do
6539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6540 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6542 break 2
6543 fi
6544done
6545 done
6546IFS=$as_save_IFS
6547
6548 ;;
6549esac
6550fi
6551LLVM_AR=$ac_cv_path_LLVM_AR
6552if test -n "$LLVM_AR"; then
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6554$as_echo "$LLVM_AR" >&6; }
6555else
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6557$as_echo "no" >&6; }
6558fi
6559
6560
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006561fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006562if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006563 ac_pt_LLVM_AR=$LLVM_AR
6564 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006565set dummy llvm-ar; ac_word=$2
6566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6567$as_echo_n "checking for $ac_word... " >&6; }
6568if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6569 $as_echo_n "(cached) " >&6
6570else
6571 case $ac_pt_LLVM_AR in
6572 [\\/]* | ?:[\\/]*)
6573 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6574 ;;
6575 *)
6576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6577for as_dir in ${llvm_path}
6578do
6579 IFS=$as_save_IFS
6580 test -z "$as_dir" && as_dir=.
6581 for ac_exec_ext in '' $ac_executable_extensions; do
6582 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6583 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6585 break 2
6586 fi
6587done
6588 done
6589IFS=$as_save_IFS
6590
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006591 ;;
6592esac
6593fi
6594ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6595if test -n "$ac_pt_LLVM_AR"; then
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6597$as_echo "$ac_pt_LLVM_AR" >&6; }
6598else
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600$as_echo "no" >&6; }
6601fi
6602
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006603 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006604 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006605 else
6606 case $cross_compiling:$ac_tool_warned in
6607yes:)
6608{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6609$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6610ac_tool_warned=yes ;;
6611esac
6612 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006613 fi
6614else
6615 LLVM_AR="$ac_cv_path_LLVM_AR"
6616fi
6617
6618
6619 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6620 then
6621 LLVM_AR_FOUND="found"
6622 else
6623 LLVM_AR_FOUND="not-found"
6624 fi
6625 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6626 then
6627 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6628 if test -n "${found_llvm_ar}"
6629 then
6630 LLVM_AR='/usr/bin/xcrun llvm-ar'
6631 LLVM_AR_FOUND=found
6632 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6633$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6634 fi
6635 fi
6636 if test $LLVM_AR_FOUND = not-found
6637 then
6638 LLVM_PROFR_ERR=yes
6639 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6640 else
6641 LLVM_AR_ERR=no
6642 fi
6643 AR="${LLVM_AR}"
6644 case $ac_sys_system in
6645 Darwin*)
6646 # Any changes made here should be reflected in the GCC+Darwin case below
6647 LTOFLAGS="-flto -Wl,-export_dynamic"
6648 ;;
6649 *)
6650 LTOFLAGS="-flto"
6651 ;;
6652 esac
6653 ;;
6654 *gcc*)
6655 case $ac_sys_system in
6656 Darwin*)
6657 LTOFLAGS="-flto -Wl,-export_dynamic"
6658 ;;
6659 *)
6660 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6661 ;;
6662 esac
6663 ;;
6664 esac
6665
6666 if test "$ac_cv_prog_cc_g" = "yes"
6667 then
6668 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6669 # to get debug symbols.
6670 LTOFLAGS="$LTOFLAGS -g"
6671 fi
6672
stratakisf92c7aa2018-12-04 15:54:01 +01006673 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006674 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006675fi
6676
6677# Enable PGO flags.
6678
6679
6680
6681
6682
6683
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006684if test -n "$ac_tool_prefix"; then
6685 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6686set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6688$as_echo_n "checking for $ac_word... " >&6; }
6689if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6690 $as_echo_n "(cached) " >&6
6691else
6692 case $LLVM_PROFDATA in
6693 [\\/]* | ?:[\\/]*)
6694 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6695 ;;
6696 *)
6697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006699do
6700 IFS=$as_save_IFS
6701 test -z "$as_dir" && as_dir=.
6702 for ac_exec_ext in '' $ac_executable_extensions; do
6703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006704 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6706 break 2
6707 fi
6708done
6709 done
6710IFS=$as_save_IFS
6711
Gregory P. Smith799520c2016-09-07 16:10:00 -07006712 ;;
6713esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006714fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006715LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6716if test -n "$LLVM_PROFDATA"; then
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6718$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006719else
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006725fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006726if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006727 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6728 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006729set dummy llvm-profdata; ac_word=$2
6730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6731$as_echo_n "checking for $ac_word... " >&6; }
6732if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6733 $as_echo_n "(cached) " >&6
6734else
6735 case $ac_pt_LLVM_PROFDATA in
6736 [\\/]* | ?:[\\/]*)
6737 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6738 ;;
6739 *)
6740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6741for as_dir in ${llvm_path}
6742do
6743 IFS=$as_save_IFS
6744 test -z "$as_dir" && as_dir=.
6745 for ac_exec_ext in '' $ac_executable_extensions; do
6746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6747 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6749 break 2
6750 fi
6751done
6752 done
6753IFS=$as_save_IFS
6754
Gregory P. Smith799520c2016-09-07 16:10:00 -07006755 ;;
6756esac
6757fi
6758ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6759if test -n "$ac_pt_LLVM_PROFDATA"; then
6760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6761$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6762else
6763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6764$as_echo "no" >&6; }
6765fi
6766
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006767 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006768 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006769 else
6770 case $cross_compiling:$ac_tool_warned in
6771yes:)
6772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6774ac_tool_warned=yes ;;
6775esac
6776 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006777 fi
6778else
6779 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6780fi
6781
6782
6783if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6784then
6785 LLVM_PROF_FOUND="found"
6786else
6787 LLVM_PROF_FOUND="not-found"
6788fi
6789if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6790then
6791 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6792 if test -n "${found_llvm_profdata}"
6793 then
6794 # llvm-profdata isn't directly in $PATH in some cases.
6795 # https://apple.stackexchange.com/questions/197053/
6796 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6797 LLVM_PROF_FOUND=found
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6799$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6800 fi
6801fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006802LLVM_PROF_ERR=no
6803case $CC in
6804 *clang*)
6805 # Any changes made here should be reflected in the GCC+Darwin case below
6806 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6807 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006808 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006809 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6810 if test $LLVM_PROF_FOUND = not-found
6811 then
6812 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006813 if test "${REQUIRE_PGO}" = "yes"
6814 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006815 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006816 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006817 fi
6818 ;;
6819 *gcc*)
6820 case $ac_sys_system in
6821 Darwin*)
6822 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6823 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006824 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006826 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006827 then
6828 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006829 if test "${REQUIRE_PGO}" = "yes"
6830 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006831 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006832 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006833 fi
6834 ;;
6835 *)
6836 PGO_PROF_GEN_FLAG="-fprofile-generate"
6837 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6838 LLVM_PROF_MERGER="true"
6839 LLVM_PROF_FILE=""
6840 ;;
6841 esac
6842 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006843 *icc*)
6844 PGO_PROF_GEN_FLAG="-prof-gen"
6845 PGO_PROF_USE_FLAG="-prof-use"
6846 LLVM_PROF_MERGER="true"
6847 LLVM_PROF_FILE=""
6848 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006849esac
6850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6852# merged with this chunk of code?
6853
6854# Optimizer/debugger flags
6855# ------------------------
6856# (The following bit of code is complicated enough - please keep things
6857# indented properly. Just pretend you're editing Python code. ;-)
6858
6859# There are two parallel sets of case statements below, one that checks to
6860# see if OPT was set and one that does BASECFLAGS setting based upon
6861# compiler and platform. BASECFLAGS tweaks need to be made even if the
6862# user set OPT.
6863
Victor Stinner23a683a2019-04-12 21:27:37 +02006864case $CC in
6865 *clang*)
6866 cc_is_clang=1
6867 ;;
6868 *)
6869 if $CC --version 2>&1 | grep -q clang
6870 then
6871 cc_is_clang=1
6872 else
6873 cc_is_clang=
6874 fi
6875esac
6876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877# tweak OPT based on compiler and platform, only if the user didn't set
6878# it on the command line
6879
Victor Stinner9ed34a82017-05-02 22:35:58 +02006880
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006881if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882then
6883 case $GCC in
6884 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6886 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6887 WRAP="-fwrapv"
6888 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006889
Victor Stinner35f3d242017-04-21 12:35:24 +02006890 if test -n "${cc_is_clang}"
6891 then
6892 # Clang also needs -fwrapv
6893 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006894 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6895 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006896 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006897 fi
6898
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899 case $ac_cv_prog_cc_g in
6900 yes)
6901 if test "$Py_DEBUG" = 'true' ; then
6902 # Optimization messes up debuggers, so turn it off for
6903 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006904 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006905 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006906 else
Victor Stinner28205b22017-04-21 11:24:34 +02006907 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006908 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909 else
Victor Stinner28205b22017-04-21 11:24:34 +02006910 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911 fi
6912 ;;
6913 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006914 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915 ;;
6916 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006917
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006918 case $ac_sys_system in
6919 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6920 ;;
6921 esac
6922 ;;
6923
6924 *)
6925 OPT="-O"
6926 ;;
6927 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928fi
6929
6930
6931
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006932
stratakiscf10a752018-12-19 18:19:01 +01006933
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006934# The -arch flags for universal builds on OSX
6935UNIVERSAL_ARCH_FLAGS=
6936
6937
6938# tweak BASECFLAGS based on compiler and platform
6939case $GCC in
6940yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006941 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006942
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6944$as_echo_n "checking for -Wextra... " >&6; }
6945 ac_save_cc="$CC"
6946 CC="$CC -Wextra -Werror"
6947 if ${ac_cv_extra_warnings+:} false; then :
6948 $as_echo_n "(cached) " >&6
6949else
6950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951/* end confdefs.h. */
6952
6953
6954int
6955main ()
6956{
6957
6958 ;
6959 return 0;
6960}
6961
6962_ACEOF
6963if ac_fn_c_try_compile "$LINENO"; then :
6964
6965 ac_cv_extra_warnings=yes
6966
6967else
6968
6969 ac_cv_extra_warnings=no
6970
6971fi
6972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6973fi
6974
6975 CC="$ac_save_cc"
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6977$as_echo "$ac_cv_extra_warnings" >&6; }
6978
6979 if test $ac_cv_extra_warnings = yes
6980 then
6981 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6982 fi
6983
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984 # Python doesn't violate C99 aliasing rules, but older versions of
6985 # GCC produce warnings for legal Python code. Enable
6986 # -fno-strict-aliasing on versions of GCC that support but produce
6987 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6989$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006990 ac_save_cc="$CC"
6991 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006992 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006993 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006995else
Matthias Kloseb9621712010-04-24 17:59:49 +00006996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006998
Matthias Kloseb159a552010-04-25 21:00:44 +00006999
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007000int
7001main ()
7002{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007003
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007004 ;
7005 return 0;
7006}
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007009if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007010
7011 CC="$ac_save_cc -fstrict-aliasing"
7012 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007014/* end confdefs.h. */
7015
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007016 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007017int
7018main ()
7019{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007020double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021 ;
7022 return 0;
7023}
Matthias Kloseb159a552010-04-25 21:00:44 +00007024
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007026if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007027
7028 ac_cv_no_strict_aliasing=no
7029
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007030else
Matthias Kloseb159a552010-04-25 21:00:44 +00007031
7032 ac_cv_no_strict_aliasing=yes
7033
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007034fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007036
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007037else
Matthias Kloseb159a552010-04-25 21:00:44 +00007038
7039 ac_cv_no_strict_aliasing=no
7040
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007041fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007043fi
7044
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007045 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007046 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7048$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007049 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007050 then
7051 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7052 fi
7053
Zachary Ware5af85642015-12-21 12:09:17 -06007054 # ICC doesn't recognize the option, but only emits a warning
7055 ## XXX does it emit an unused result warning and can it be disabled?
7056 case "$CC" in
7057 *icc*)
7058 ac_cv_disable_unused_result_warning=no
7059 ;;
7060 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7062$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7063 ac_save_cc="$CC"
7064 CC="$CC -Wunused-result -Werror"
7065 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007066 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007067 $as_echo_n "(cached) " >&6
7068else
7069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7070/* end confdefs.h. */
7071
7072
7073int
7074main ()
7075{
7076
7077 ;
7078 return 0;
7079}
7080
7081_ACEOF
7082if ac_fn_c_try_compile "$LINENO"; then :
7083
7084 ac_cv_disable_unused_result_warning=yes
7085
7086else
7087
7088 ac_cv_disable_unused_result_warning=no
7089
7090fi
7091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7092fi
7093
7094 CFLAGS="$save_CFLAGS"
7095 CC="$ac_save_cc"
7096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7097$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007098 ;;
7099 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007100
7101 if test $ac_cv_disable_unused_result_warning = yes
7102 then
7103 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007104 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7105 fi
7106
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7108$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7109 ac_save_cc="$CC"
7110 CC="$CC -Wunused-parameter -Werror"
7111 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7112 $as_echo_n "(cached) " >&6
7113else
7114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7115/* end confdefs.h. */
7116
7117
7118int
7119main ()
7120{
7121
7122 ;
7123 return 0;
7124}
7125
7126_ACEOF
7127if ac_fn_c_try_compile "$LINENO"; then :
7128
7129 ac_cv_disable_unused_parameter_warning=yes
7130
7131else
7132
7133 ac_cv_disable_unused_parameter_warning=no
7134
7135fi
7136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7137fi
7138
7139 CC="$ac_save_cc"
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7141$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7142
7143 if test $ac_cv_disable_unused_parameter_warning = yes
7144 then
7145 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7146 fi
7147
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7149$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7150 ac_save_cc="$CC"
7151 CC="$CC -Wmissing-field-initializers -Werror"
7152 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7153 $as_echo_n "(cached) " >&6
7154else
7155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7156/* end confdefs.h. */
7157
7158
7159int
7160main ()
7161{
7162
7163 ;
7164 return 0;
7165}
7166
7167_ACEOF
7168if ac_fn_c_try_compile "$LINENO"; then :
7169
7170 ac_cv_disable_missing_field_initializers=yes
7171
7172else
7173
7174 ac_cv_disable_missing_field_initializers=no
7175
7176fi
7177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7178fi
7179
7180 CC="$ac_save_cc"
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7182$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7183
7184 if test $ac_cv_disable_missing_field_initializers = yes
7185 then
7186 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007187 fi
7188
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7190$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7191 ac_save_cc="$CC"
7192 CC="$CC -Wsign-compare"
7193 save_CFLAGS="$CFLAGS"
7194 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7195 $as_echo_n "(cached) " >&6
7196else
7197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7198/* end confdefs.h. */
7199
7200
7201int
7202main ()
7203{
7204
7205 ;
7206 return 0;
7207}
7208
7209_ACEOF
7210if ac_fn_c_try_compile "$LINENO"; then :
7211
7212 ac_cv_enable_sign_compare_warning=yes
7213
7214else
7215
7216 ac_cv_enable_sign_compare_warning=no
7217
7218fi
7219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7220fi
7221
7222 CFLAGS="$save_CFLAGS"
7223 CC="$ac_save_cc"
7224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7225$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7226
7227 if test $ac_cv_enable_sign_compare_warning = yes
7228 then
7229 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7230 fi
7231
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7233$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7234 ac_save_cc="$CC"
7235 CC="$CC -Wunreachable-code"
7236 save_CFLAGS="$CFLAGS"
7237 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7238 $as_echo_n "(cached) " >&6
7239else
7240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7241/* end confdefs.h. */
7242
7243
7244int
7245main ()
7246{
7247
7248 ;
7249 return 0;
7250}
7251
7252_ACEOF
7253if ac_fn_c_try_compile "$LINENO"; then :
7254
7255 ac_cv_enable_unreachable_code_warning=yes
7256
7257else
7258
7259 ac_cv_enable_unreachable_code_warning=no
7260
7261fi
7262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7263fi
7264
7265 CFLAGS="$save_CFLAGS"
7266 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007267
7268 # Don't enable unreachable code warning in debug mode, since it usually
7269 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007270 # Issue #24324: Unfortunately, the unreachable code warning does not work
7271 # correctly on gcc and has been silently removed from the compiler.
7272 # It is supported on clang but on OS X systems gcc may be an alias
7273 # for clang. Try to determine if the compiler is not really gcc and,
7274 # if so, only then enable the warning.
7275 if test $ac_cv_enable_unreachable_code_warning = yes && \
7276 test "$Py_DEBUG" != "true" && \
7277 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007278 then
7279 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007280 else
7281 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007282 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7284$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007285
INADA Naokie3364842018-06-05 20:40:53 +09007286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7287$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7288 ac_save_cc="$CC"
7289 CC="$CC -Werror -Wstrict-prototypes"
7290 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7291 $as_echo_n "(cached) " >&6
7292else
7293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7294/* end confdefs.h. */
7295
7296
7297int
7298main ()
7299{
7300
7301 ;
7302 return 0;
7303}
7304
7305_ACEOF
7306if ac_fn_c_try_compile "$LINENO"; then :
7307
7308 ac_cv_enable_strict_prototypes_warning=yes
7309
7310else
7311
7312 ac_cv_enable_strict_prototypes_warning=no
7313
7314fi
7315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7316fi
7317
7318 CC="$ac_save_cc"
7319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7320$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7321
7322 if test $ac_cv_enable_strict_prototypes_warning = yes
7323 then
7324 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7325 fi
7326
Victor Stinner193ee0a2017-02-06 14:24:00 +01007327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7328$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7329 ac_save_cc="$CC"
7330 CC="$CC -Werror=implicit-function-declaration"
7331 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7332 $as_echo_n "(cached) " >&6
7333else
7334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7335/* end confdefs.h. */
7336
7337
7338int
7339main ()
7340{
7341
7342 ;
7343 return 0;
7344}
7345
7346_ACEOF
7347if ac_fn_c_try_compile "$LINENO"; then :
7348
7349 ac_cv_enable_implicit_function_declaration_error=yes
7350
7351else
7352
7353 ac_cv_enable_implicit_function_declaration_error=no
7354
7355fi
7356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7357fi
7358
7359 CC="$ac_save_cc"
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7361$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7362
7363 if test $ac_cv_enable_implicit_function_declaration_error = yes
7364 then
7365 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7366 fi
7367
Vinay Sajip0b60f642019-10-15 08:26:12 +01007368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7369$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7370 ac_save_cc="$CC"
7371 CC="$CC -fvisibility=hidden"
7372 if ${ac_cv_enable_visibility+:} false; then :
7373 $as_echo_n "(cached) " >&6
7374else
7375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7376/* end confdefs.h. */
7377
7378
7379int
7380main ()
7381{
7382
7383 ;
7384 return 0;
7385}
7386
7387_ACEOF
7388if ac_fn_c_try_compile "$LINENO"; then :
7389
7390 ac_cv_enable_visibility=yes
7391
7392else
7393
7394 ac_cv_enable_visibility=no
7395
7396fi
7397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7398fi
7399
7400 CC="$ac_save_cc"
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7402$as_echo "$ac_cv_enable_visibility" >&6; }
7403
7404 if test $ac_cv_enable_visibility = yes
7405 then
7406 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7407 fi
7408
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007409 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7410 # support. Without this, treatment of subnormals doesn't follow
7411 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007412 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413 alpha*)
7414 BASECFLAGS="$BASECFLAGS -mieee"
7415 ;;
7416 esac
7417
7418 case $ac_sys_system in
7419 SCO_SV*)
7420 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7421 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007422
Ned Deily87adb6e2013-10-18 21:09:56 -07007423 Darwin*)
7424 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7425 # used to be here, but non-Apple gcc doesn't accept them.
7426 if test "${CC}" = gcc
7427 then
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007429$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007430 case "${UNIVERSALSDK}" in
7431 */MacOSX10.4u.sdk)
7432 # Build using 10.4 SDK, force usage of gcc when the
7433 # compiler is gcc, otherwise the user will get very
7434 # confusing error messages when building on OSX 10.6
7435 CC=gcc-4.0
7436 CPP=cpp-4.0
7437 ;;
7438 esac
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007440$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007441 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442
Ned Deily87adb6e2013-10-18 21:09:56 -07007443 if test "${enable_universalsdk}"
7444 then
7445 case "$UNIVERSAL_ARCHS" in
7446 32-bit)
7447 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7448 LIPO_32BIT_FLAGS=""
7449 ARCH_RUN_32BIT=""
7450 ;;
7451 64-bit)
7452 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7453 LIPO_32BIT_FLAGS=""
7454 ARCH_RUN_32BIT="true"
7455 ;;
7456 all)
7457 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7458 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7459 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7460 ;;
7461 intel)
7462 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7463 LIPO_32BIT_FLAGS="-extract i386"
7464 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7465 ;;
7466 intel-32)
7467 UNIVERSAL_ARCH_FLAGS="-arch i386"
7468 LIPO_32BIT_FLAGS=""
7469 ARCH_RUN_32BIT=""
7470 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007471 intel-64)
7472 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7473 LIPO_32BIT_FLAGS=""
7474 ARCH_RUN_32BIT="true"
7475 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007476 3-way)
7477 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7478 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7479 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7480 ;;
7481 *)
7482 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7483 ;;
7484 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485
Ned Deily87adb6e2013-10-18 21:09:56 -07007486 if test "${UNIVERSALSDK}" != "/"
7487 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007488 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7489 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007490 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007491 else
7492 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7493 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007494 fi
7495 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496
Ned Deily87adb6e2013-10-18 21:09:56 -07007497 # Calculate an appropriate deployment target for this build:
7498 # The deployment target value is used explicitly to enable certain
7499 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007500 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007501 # component of the string returned by distutils.get_platform().
7502 #
7503 # Use the value from:
7504 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7505 # 2. the operating system version of the build machine if >= 10.6
7506 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7507 # below to pick either 10.3, 10.4, or 10.5 as the target.
7508 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509
Ned Deily87adb6e2013-10-18 21:09:56 -07007510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7511$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007512 cur_target_major=`sw_vers -productVersion | \
7513 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7514 cur_target_minor=`sw_vers -productVersion | \
7515 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7516 cur_target="${cur_target_major}.${cur_target_minor}"
7517 if test ${cur_target_major} -eq 10 && \
7518 test ${cur_target_minor} -ge 3 && \
7519 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007520 then
Ned Deily36820b62014-06-25 13:44:22 -07007521 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007522 cur_target=10.3
7523 if test ${enable_universalsdk}
7524 then
7525 case "$UNIVERSAL_ARCHS" in
7526 all|3-way|intel|64-bit)
7527 # These configurations were first supported in 10.5
7528 cur_target='10.5'
7529 ;;
7530 esac
7531 else
7532 if test `/usr/bin/arch` = "i386"
7533 then
7534 # 10.4 was the first release to support Intel archs
7535 cur_target="10.4"
7536 fi
7537 fi
7538 fi
7539 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007540
Ned Deily87adb6e2013-10-18 21:09:56 -07007541 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7542 # environment with a value that is the same as what we'll use
7543 # in the Makefile to ensure that we'll get the same compiler
7544 # environment during configure and build time.
7545 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7546 export MACOSX_DEPLOYMENT_TARGET
7547 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7549$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007550
Ned Deily87adb6e2013-10-18 21:09:56 -07007551 # end of Darwin* tests
7552 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553 esac
7554 ;;
7555
7556*)
7557 case $ac_sys_system in
7558 OpenUNIX*|UnixWare*)
7559 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7560 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561 SCO_SV*)
7562 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7563 ;;
7564 esac
7565 ;;
7566esac
7567
Zachary Ware5af85642015-12-21 12:09:17 -06007568# ICC needs -fp-model strict or floats behave badly
7569case "$CC" in
7570*icc*)
7571 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7572 ;;
7573esac
7574
T. Woutersddbfa2c2017-05-23 01:30:49 +02007575if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576 :
7577else
7578 OPT="-DNDEBUG $OPT"
7579fi
7580
7581if test "$ac_arch_flags"
7582then
7583 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7584fi
7585
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586# On some compilers, pthreads are available without further options
7587# (e.g. MacOS X). On some of these systems, the compiler will not
7588# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7589# So we have to see first whether pthreads are available without
7590# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7592$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007593if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595else
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597 ac_cv_pthread_is_default=no
7598else
Matthias Kloseb9621712010-04-24 17:59:49 +00007599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007600/* end confdefs.h. */
7601
Stefan Krah7dba5942012-11-22 22:49:11 +01007602#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603#include <pthread.h>
7604
7605void* routine(void* p){return NULL;}
7606
7607int main(){
7608 pthread_t p;
7609 if(pthread_create(&p,NULL,routine,NULL)!=0)
7610 return 1;
7611 (void)pthread_detach(p);
7612 return 0;
7613}
7614
7615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007616if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617
7618 ac_cv_pthread_is_default=yes
7619 ac_cv_kthread=no
7620 ac_cv_pthread=no
7621
7622else
Matthias Kloseb9621712010-04-24 17:59:49 +00007623 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7626 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627fi
7628
7629
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630fi
7631
Matthias Kloseb9621712010-04-24 17:59:49 +00007632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7633$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634
7635
7636if test $ac_cv_pthread_is_default = yes
7637then
7638 ac_cv_kpthread=no
7639else
7640# -Kpthread, if available, provides the right #defines
7641# and linker options to make pthread_create available
7642# Some compilers won't report that they do not support -Kpthread,
7643# so we need to run a program to see whether it really made the
7644# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7646$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007647if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007648 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649else
7650 ac_save_cc="$CC"
7651CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007652if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653 ac_cv_kpthread=no
7654else
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656/* end confdefs.h. */
7657
Stefan Krah7dba5942012-11-22 22:49:11 +01007658#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659#include <pthread.h>
7660
7661void* routine(void* p){return NULL;}
7662
7663int main(){
7664 pthread_t p;
7665 if(pthread_create(&p,NULL,routine,NULL)!=0)
7666 return 1;
7667 (void)pthread_detach(p);
7668 return 0;
7669}
7670
7671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007672if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007673 ac_cv_kpthread=yes
7674else
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7678 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679fi
7680
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681CC="$ac_save_cc"
7682fi
7683
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7685$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686fi
7687
7688if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7689then
7690# -Kthread, if available, provides the right #defines
7691# and linker options to make pthread_create available
7692# Some compilers won't report that they do not support -Kthread,
7693# so we need to run a program to see whether it really made the
7694# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7696$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007697if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699else
7700 ac_save_cc="$CC"
7701CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007702if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703 ac_cv_kthread=no
7704else
Matthias Kloseb9621712010-04-24 17:59:49 +00007705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706/* end confdefs.h. */
7707
Stefan Krah7dba5942012-11-22 22:49:11 +01007708#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709#include <pthread.h>
7710
7711void* routine(void* p){return NULL;}
7712
7713int main(){
7714 pthread_t p;
7715 if(pthread_create(&p,NULL,routine,NULL)!=0)
7716 return 1;
7717 (void)pthread_detach(p);
7718 return 0;
7719}
7720
7721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007722if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723 ac_cv_kthread=yes
7724else
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729fi
7730
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731CC="$ac_save_cc"
7732fi
7733
Matthias Kloseb9621712010-04-24 17:59:49 +00007734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7735$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736fi
7737
7738if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7739then
7740# -pthread, if available, provides the right #defines
7741# and linker options to make pthread_create available
7742# Some compilers won't report that they do not support -pthread,
7743# so we need to run a program to see whether it really made the
7744# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7746$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007747if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749else
7750 ac_save_cc="$CC"
7751CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007752if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007753 ac_cv_pthread=no
7754else
Matthias Kloseb9621712010-04-24 17:59:49 +00007755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007756/* end confdefs.h. */
7757
Stefan Krah7dba5942012-11-22 22:49:11 +01007758#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759#include <pthread.h>
7760
7761void* routine(void* p){return NULL;}
7762
7763int main(){
7764 pthread_t p;
7765 if(pthread_create(&p,NULL,routine,NULL)!=0)
7766 return 1;
7767 (void)pthread_detach(p);
7768 return 0;
7769}
7770
7771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007772if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007773 ac_cv_pthread=yes
7774else
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779fi
7780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781CC="$ac_save_cc"
7782fi
7783
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7785$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786fi
7787
7788# If we have set a CC compiler flag for thread support then
7789# check if it works for CXX, too.
7790ac_cv_cxx_thread=no
7791if test ! -z "$CXX"
7792then
Matthias Kloseb9621712010-04-24 17:59:49 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7794$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007795ac_save_cxx="$CXX"
7796
7797if test "$ac_cv_kpthread" = "yes"
7798then
7799 CXX="$CXX -Kpthread"
7800 ac_cv_cxx_thread=yes
7801elif test "$ac_cv_kthread" = "yes"
7802then
7803 CXX="$CXX -Kthread"
7804 ac_cv_cxx_thread=yes
7805elif test "$ac_cv_pthread" = "yes"
7806then
7807 CXX="$CXX -pthread"
7808 ac_cv_cxx_thread=yes
7809fi
7810
7811if test $ac_cv_cxx_thread = yes
7812then
7813 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7814 $CXX -c conftest.$ac_ext 2>&5
7815 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7816 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7817 then
7818 ac_cv_cxx_thread=yes
7819 else
7820 ac_cv_cxx_thread=no
7821 fi
7822 rm -fr conftest*
7823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7825$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007826fi
7827CXX="$ac_save_cxx"
7828
7829
7830# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7832$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007833if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007837/* end confdefs.h. */
7838#include <stdlib.h>
7839#include <stdarg.h>
7840#include <string.h>
7841#include <float.h>
7842
7843int
7844main ()
7845{
7846
7847 ;
7848 return 0;
7849}
7850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007851if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007852 ac_cv_header_stdc=yes
7853else
Matthias Kloseb9621712010-04-24 17:59:49 +00007854 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007855fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7857
7858if test $ac_cv_header_stdc = yes; then
7859 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007861/* end confdefs.h. */
7862#include <string.h>
7863
7864_ACEOF
7865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 $EGREP "memchr" >/dev/null 2>&1; then :
7867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007868else
7869 ac_cv_header_stdc=no
7870fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007871rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007872
7873fi
7874
7875if test $ac_cv_header_stdc = yes; then
7876 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007878/* end confdefs.h. */
7879#include <stdlib.h>
7880
7881_ACEOF
7882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 $EGREP "free" >/dev/null 2>&1; then :
7884
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007885else
7886 ac_cv_header_stdc=no
7887fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007888rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007889
7890fi
7891
7892if test $ac_cv_header_stdc = yes; then
7893 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007895 :
7896else
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007898/* end confdefs.h. */
7899#include <ctype.h>
7900#include <stdlib.h>
7901#if ((' ' & 0x0FF) == 0x020)
7902# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7903# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7904#else
7905# define ISLOWER(c) \
7906 (('a' <= (c) && (c) <= 'i') \
7907 || ('j' <= (c) && (c) <= 'r') \
7908 || ('s' <= (c) && (c) <= 'z'))
7909# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7910#endif
7911
7912#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7913int
7914main ()
7915{
7916 int i;
7917 for (i = 0; i < 256; i++)
7918 if (XOR (islower (i), ISLOWER (i))
7919 || toupper (i) != TOUPPER (i))
7920 return 2;
7921 return 0;
7922}
7923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007924if ac_fn_c_try_run "$LINENO"; then :
7925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007926else
Matthias Kloseb9621712010-04-24 17:59:49 +00007927 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7930 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007931fi
7932
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007933fi
7934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7936$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007937if test $ac_cv_header_stdc = yes; then
7938
Matthias Kloseb9621712010-04-24 17:59:49 +00007939$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007940
7941fi
7942
stratakise768c862018-01-23 16:11:24 +01007943for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007944fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007945ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007946sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007947utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007948poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007949sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007950sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007951sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007952sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007953sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007954libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007955linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007956sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007957do :
7958 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7959ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007960if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007962#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007963_ACEOF
7964
7965fi
7966
Guido van Rossum627b2d71993-12-24 10:39:16 +00007967done
7968
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007969ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007970for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007971 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7973$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007974if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007976else
Matthias Kloseb9621712010-04-24 17:59:49 +00007977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007979#include <sys/types.h>
7980#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007981
Martin v. Löwis11437992002-04-12 09:54:03 +00007982int
7983main ()
7984{
7985if ((DIR *) 0)
7986return 0;
7987 ;
7988 return 0;
7989}
7990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007991if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007993else
Matthias Kloseb9621712010-04-24 17:59:49 +00007994 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998eval ac_res=\$$as_ac_Header
7999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8000$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008001if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008003#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008004_ACEOF
8005
8006ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008007fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008009done
8010# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8011if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8013$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008014if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008015 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008016else
Martin v. Löwis11437992002-04-12 09:54:03 +00008017 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021/* Override any GCC internal prototype to avoid an error.
8022 Use char because int might match the return type of a GCC
8023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008024#ifdef __cplusplus
8025extern "C"
8026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008027char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008028int
8029main ()
8030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ;
8033 return 0;
8034}
8035_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036for ac_lib in '' dir; do
8037 if test -z "$ac_lib"; then
8038 ac_res="none required"
8039 else
8040 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008041 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008046rm -f core conftest.err conftest.$ac_objext \
8047 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008048 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051done
Victor Stinnere0be4232011-10-25 13:06:09 +02008052if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054else
8055 ac_cv_search_opendir=no
8056fi
8057rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008058LIBS=$ac_func_search_save_LIBS
8059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8061$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008063if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008066fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008067
Michael W. Hudson54241132001-12-07 15:38:26 +00008068else
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8070$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008071if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008073else
8074 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078/* Override any GCC internal prototype to avoid an error.
8079 Use char because int might match the return type of a GCC
8080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008081#ifdef __cplusplus
8082extern "C"
8083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008084char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008085int
8086main ()
8087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008088return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008089 ;
8090 return 0;
8091}
8092_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008093for ac_lib in '' x; do
8094 if test -z "$ac_lib"; then
8095 ac_res="none required"
8096 else
8097 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008098 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008100 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008103rm -f core conftest.err conftest.$ac_objext \
8104 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008105 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108done
Victor Stinnere0be4232011-10-25 13:06:09 +02008109if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008111else
8112 ac_cv_search_opendir=no
8113fi
8114rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008115LIBS=$ac_func_search_save_LIBS
8116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8118$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008120if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008122
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008123fi
8124
8125fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8128$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008129if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008131else
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008133/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008134#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008135int
8136main ()
8137{
8138return makedev(0, 0);
8139 ;
8140 return 0;
8141}
8142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008144 ac_cv_header_sys_types_h_makedev=yes
8145else
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008148rm -f core conftest.err conftest.$ac_objext \
8149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008150
8151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8153$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008154
8155if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008156ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008157if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008158
Matthias Kloseb9621712010-04-24 17:59:49 +00008159$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008160
8161fi
8162
8163
8164
8165 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008166 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008167if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008170
8171fi
8172
8173
8174 fi
8175fi
8176
Michael W. Hudson54241132001-12-07 15:38:26 +00008177
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008178# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8179# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8180SAVE_CFLAGS=$CFLAGS
8181CFLAGS="-std=c99 $CFLAGS"
8182for ac_header in bluetooth/bluetooth.h
8183do :
8184 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8185if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8186 cat >>confdefs.h <<_ACEOF
8187#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8188_ACEOF
8189
8190fi
8191
8192done
8193
8194CFLAGS=$SAVE_CFLAGS
8195
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008196# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8197for ac_header in net/if.h
8198do :
8199 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8200#ifdef STDC_HEADERS
8201# include <stdlib.h>
8202# include <stddef.h>
8203#else
8204# ifdef HAVE_STDLIB_H
8205# include <stdlib.h>
8206# endif
8207#endif
8208#ifdef HAVE_SYS_SOCKET_H
8209# include <sys/socket.h>
8210#endif
8211
8212"
Victor Stinnere0be4232011-10-25 13:06:09 +02008213if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008214 cat >>confdefs.h <<_ACEOF
8215#define HAVE_NET_IF_H 1
8216_ACEOF
8217
8218fi
8219
8220done
8221
8222
Martin v. Löwis11017b12006-01-14 18:12:57 +00008223# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008224for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008225do :
8226 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00008227#ifdef HAVE_ASM_TYPES_H
8228#include <asm/types.h>
8229#endif
8230#ifdef HAVE_SYS_SOCKET_H
8231#include <sys/socket.h>
8232#endif
8233
Matthias Kloseb9621712010-04-24 17:59:49 +00008234"
Victor Stinnere0be4232011-10-25 13:06:09 +02008235if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008236 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008237#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008238_ACEOF
8239
8240fi
8241
8242done
8243
8244
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008245# On Linux, qrtr.h requires asm/types.h
8246for ac_header in linux/qrtr.h
8247do :
8248 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8249#ifdef HAVE_ASM_TYPES_H
8250#include <asm/types.h>
8251#endif
8252#ifdef HAVE_SYS_SOCKET_H
8253#include <sys/socket.h>
8254#endif
8255
8256"
8257if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8258 cat >>confdefs.h <<_ACEOF
8259#define HAVE_LINUX_QRTR_H 1
8260_ACEOF
8261
8262fi
8263
8264done
8265
8266
caaveryeffc12f2017-09-06 18:18:10 -04008267for ac_header in linux/vm_sockets.h
8268do :
8269 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8270#ifdef HAVE_SYS_SOCKET_H
8271#include <sys/socket.h>
8272#endif
8273
8274"
8275if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8276 cat >>confdefs.h <<_ACEOF
8277#define HAVE_LINUX_VM_SOCKETS_H 1
8278_ACEOF
8279
8280fi
8281
8282done
8283
8284
Charles-François Natali47413c12011-10-06 19:47:44 +02008285# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008286for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008287do :
8288 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8289ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8290#ifdef HAVE_SYS_SOCKET_H
8291#include <sys/socket.h>
8292#endif
8293
8294"
8295if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8296 cat >>confdefs.h <<_ACEOF
8297#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8298_ACEOF
8299
8300fi
8301
8302done
8303
8304
Guido van Rossum627b2d71993-12-24 10:39:16 +00008305# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008306was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8308$as_echo_n "checking for clock_t in time.h... " >&6; }
8309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008310/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008311#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008312
8313_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008316 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008317else
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
8319
Matthias Kloseb9621712010-04-24 17:59:49 +00008320$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008321
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008322
Guido van Rossum627b2d71993-12-24 10:39:16 +00008323fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008324rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008325
Matthias Kloseb9621712010-04-24 17:59:49 +00008326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8327$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008328
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8330$as_echo_n "checking for makedev... " >&6; }
8331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008332/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008333
Jesus Cea740f53a2010-04-28 11:35:30 +00008334#if defined(MAJOR_IN_MKDEV)
8335#include <sys/mkdev.h>
8336#elif defined(MAJOR_IN_SYSMACROS)
8337#include <sys/sysmacros.h>
8338#else
8339#include <sys/types.h>
8340#endif
8341
Neal Norwitz11690112002-07-30 01:08:28 +00008342int
8343main ()
8344{
Jesus Cea740f53a2010-04-28 11:35:30 +00008345
8346 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008347 ;
8348 return 0;
8349}
Matthias Kloseb159a552010-04-25 21:00:44 +00008350
Neal Norwitz11690112002-07-30 01:08:28 +00008351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008352if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008353 ac_cv_has_makedev=yes
8354else
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008357rm -f core conftest.err conftest.$ac_objext \
8358 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8360$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008361if test "$ac_cv_has_makedev" = "yes"; then
8362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008364
8365fi
8366
Christian Heimes985ecdc2013-11-20 11:46:18 +01008367# byte swapping
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8369$as_echo_n "checking for le64toh... " >&6; }
8370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8371/* end confdefs.h. */
8372
8373#ifdef HAVE_ENDIAN_H
8374#include <endian.h>
8375#elif defined(HAVE_SYS_ENDIAN_H)
8376#include <sys/endian.h>
8377#endif
8378
8379int
8380main ()
8381{
8382
8383 le64toh(1)
8384 ;
8385 return 0;
8386}
8387
8388_ACEOF
8389if ac_fn_c_try_link "$LINENO"; then :
8390 ac_cv_has_le64toh=yes
8391else
8392 ac_cv_has_le64toh=no
8393fi
8394rm -f core conftest.err conftest.$ac_objext \
8395 conftest$ac_exeext conftest.$ac_ext
8396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8397$as_echo "$ac_cv_has_le64toh" >&6; }
8398if test "$ac_cv_has_le64toh" = "yes"; then
8399
8400$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8401
8402fi
8403
Martin v. Löwis399a6892002-10-04 10:22:02 +00008404use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008405# Don't use largefile support for GNU/Hurd
8406case $ac_sys_system in GNU*)
8407 use_lfs=no
8408esac
8409
Martin v. Löwis399a6892002-10-04 10:22:02 +00008410if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008411# Two defines needed to enable largefile support on various platforms
8412# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008413case $ac_sys_system/$ac_sys_release in
8414AIX*)
8415
8416$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8417
8418 ;;
8419esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008420
Matthias Kloseb9621712010-04-24 17:59:49 +00008421$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008422
8423
Matthias Kloseb9621712010-04-24 17:59:49 +00008424$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008425
Martin v. Löwis399a6892002-10-04 10:22:02 +00008426fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008427
Guido van Rossum84e7b241996-08-19 21:59:00 +00008428# Add some code to confdefs.h so that the test for off_t works on SCO
8429cat >> confdefs.h <<\EOF
8430#if defined(SCO_DS)
8431#undef _OFF_T
8432#endif
8433EOF
8434
Guido van Rossumef2255b2000-03-10 22:30:29 +00008435# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008436ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008437if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008439else
Martin v. Löwis11437992002-04-12 09:54:03 +00008440
8441cat >>confdefs.h <<_ACEOF
8442#define mode_t int
8443_ACEOF
8444
8445fi
8446
Matthias Kloseb9621712010-04-24 17:59:49 +00008447ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008448if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008449
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008450else
Martin v. Löwis11437992002-04-12 09:54:03 +00008451
8452cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008454_ACEOF
8455
8456fi
8457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008459if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008461else
Martin v. Löwis11437992002-04-12 09:54:03 +00008462
8463cat >>confdefs.h <<_ACEOF
8464#define pid_t int
8465_ACEOF
8466
8467fi
8468
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008469
Martin v. Löwis11437992002-04-12 09:54:03 +00008470cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008471#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008472_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008473
Matthias Kloseb9621712010-04-24 17:59:49 +00008474ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008475if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008476
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008477else
Martin v. Löwis11437992002-04-12 09:54:03 +00008478
8479cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008481_ACEOF
8482
8483fi
8484
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8486$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008487if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008489else
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008491/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008492#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008493
8494_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008497 ac_cv_type_uid_t=yes
8498else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008499 ac_cv_type_uid_t=no
8500fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008501rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008502
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8505$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008506if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008507
Matthias Kloseb9621712010-04-24 17:59:49 +00008508$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008509
8510
Matthias Kloseb9621712010-04-24 17:59:49 +00008511$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008512
8513fi
8514
Mark Dickinson983bc162012-12-02 12:11:38 +00008515
Matthias Kloseb9621712010-04-24 17:59:49 +00008516ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008517if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518
Matthias Kloseb9621712010-04-24 17:59:49 +00008519$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008520
8521fi
8522
Stefan Krah1919b7e2012-03-21 18:25:23 +01008523ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8524if test "x$ac_cv_type___uint128_t" = xyes; then :
8525
8526$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8527
8528fi
8529
Jack Jansendd19cf82001-12-06 22:36:17 +00008530
Michael W. Hudson54241132001-12-07 15:38:26 +00008531# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008532# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008533# The cast to long int works around a bug in the HP C Compiler
8534# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8535# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8536# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8538$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008539if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008541else
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008543
Martin v. Löwis11437992002-04-12 09:54:03 +00008544else
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 if test "$ac_cv_type_int" = yes; then
8546 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8547$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008548as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008549See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550 else
8551 ac_cv_sizeof_int=0
8552 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008554
Martin v. Löwis11437992002-04-12 09:54:03 +00008555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8557$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558
8559
8560
Martin v. Löwis11437992002-04-12 09:54:03 +00008561cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008562#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008563_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008564
8565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566# The cast to long int works around a bug in the HP C Compiler
8567# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8568# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8569# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8571$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008572if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008574else
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008576
Martin v. Löwis11437992002-04-12 09:54:03 +00008577else
Matthias Kloseb9621712010-04-24 17:59:49 +00008578 if test "$ac_cv_type_long" = yes; then
8579 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8580$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008581as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008582See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583 else
8584 ac_cv_sizeof_long=0
8585 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8590$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591
8592
8593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008595#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008596_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008597
8598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599# The cast to long int works around a bug in the HP C Compiler
8600# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8601# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8602# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8604$as_echo_n "checking size of long long... " >&6; }
8605if ${ac_cv_sizeof_long_long+:} false; then :
8606 $as_echo_n "(cached) " >&6
8607else
8608 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8609
8610else
8611 if test "$ac_cv_type_long_long" = yes; then
8612 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8614as_fn_error 77 "cannot compute sizeof (long long)
8615See \`config.log' for more details" "$LINENO" 5; }
8616 else
8617 ac_cv_sizeof_long_long=0
8618 fi
8619fi
8620
8621fi
8622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8623$as_echo "$ac_cv_sizeof_long_long" >&6; }
8624
8625
8626
8627cat >>confdefs.h <<_ACEOF
8628#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8629_ACEOF
8630
8631
8632# The cast to long int works around a bug in the HP C Compiler
8633# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8634# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8635# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8637$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008638if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008640else
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008642
Martin v. Löwis11437992002-04-12 09:54:03 +00008643else
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 if test "$ac_cv_type_void_p" = yes; then
8645 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008647as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008648See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649 else
8650 ac_cv_sizeof_void_p=0
8651 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8656$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657
8658
8659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008661#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008662_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008663
8664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665# The cast to long int works around a bug in the HP C Compiler
8666# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8667# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8668# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8670$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008671if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008672 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008673else
Matthias Kloseb9621712010-04-24 17:59:49 +00008674 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676else
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 if test "$ac_cv_type_short" = yes; then
8678 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008680as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008681See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682 else
8683 ac_cv_sizeof_short=0
8684 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008686
Martin v. Löwis11437992002-04-12 09:54:03 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8689$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008690
8691
8692
Martin v. Löwis11437992002-04-12 09:54:03 +00008693cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008694#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008695_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008696
8697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008698# The cast to long int works around a bug in the HP C Compiler
8699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8701# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8703$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008704if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008708
Martin v. Löwis11437992002-04-12 09:54:03 +00008709else
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 if test "$ac_cv_type_float" = yes; then
8711 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008713as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008714See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715 else
8716 ac_cv_sizeof_float=0
8717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719
Martin v. Löwis11437992002-04-12 09:54:03 +00008720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8722$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723
8724
8725
Martin v. Löwis11437992002-04-12 09:54:03 +00008726cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008727#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008728_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008729
8730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731# The cast to long int works around a bug in the HP C Compiler
8732# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8733# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8734# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8736$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008737if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008741
Martin v. Löwis11437992002-04-12 09:54:03 +00008742else
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 if test "$ac_cv_type_double" = yes; then
8744 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8745$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008746as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008747See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008748 else
8749 ac_cv_sizeof_double=0
8750 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008752
Martin v. Löwis11437992002-04-12 09:54:03 +00008753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8755$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756
8757
8758
Martin v. Löwis11437992002-04-12 09:54:03 +00008759cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008760#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008761_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008762
8763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764# The cast to long int works around a bug in the HP C Compiler
8765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8769$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008770if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008774
Martin v. Löwis11437992002-04-12 09:54:03 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 if test "$ac_cv_type_fpos_t" = yes; then
8777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008779as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008780See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008781 else
8782 ac_cv_sizeof_fpos_t=0
8783 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785
Martin v. Löwis11437992002-04-12 09:54:03 +00008786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8788$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789
8790
8791
Martin v. Löwis11437992002-04-12 09:54:03 +00008792cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008793#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008794_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008795
Michael W. Hudson54241132001-12-07 15:38:26 +00008796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008797# The cast to long int works around a bug in the HP C Compiler
8798# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8799# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8800# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8802$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008803if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008805else
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00008807
Martin v. Löwis18e16552006-02-15 17:27:45 +00008808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 if test "$ac_cv_type_size_t" = yes; then
8810 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008812as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008813See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008814 else
8815 ac_cv_sizeof_size_t=0
8816 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008818
Martin v. Löwis18e16552006-02-15 17:27:45 +00008819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8821$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822
8823
8824
Martin v. Löwis18e16552006-02-15 17:27:45 +00008825cat >>confdefs.h <<_ACEOF
8826#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8827_ACEOF
8828
8829
Christian Heimes400adb02008-02-01 08:12:03 +00008830# The cast to long int works around a bug in the HP C Compiler
8831# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8832# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8833# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8835$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008836if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00008840
Christian Heimes400adb02008-02-01 08:12:03 +00008841else
Matthias Kloseb9621712010-04-24 17:59:49 +00008842 if test "$ac_cv_type_pid_t" = yes; then
8843 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008845as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008846See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008847 else
8848 ac_cv_sizeof_pid_t=0
8849 fi
8850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008851
Christian Heimes400adb02008-02-01 08:12:03 +00008852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8854$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008855
8856
8857
8858cat >>confdefs.h <<_ACEOF
8859#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8860_ACEOF
8861
8862
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008863# The cast to long int works around a bug in the HP C Compiler
8864# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8865# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8866# This bug is HP SR number 8606223364.
8867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8868$as_echo_n "checking size of uintptr_t... " >&6; }
8869if ${ac_cv_sizeof_uintptr_t+:} false; then :
8870 $as_echo_n "(cached) " >&6
8871else
8872 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8873
8874else
8875 if test "$ac_cv_type_uintptr_t" = yes; then
8876 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8878as_fn_error 77 "cannot compute sizeof (uintptr_t)
8879See \`config.log' for more details" "$LINENO" 5; }
8880 else
8881 ac_cv_sizeof_uintptr_t=0
8882 fi
8883fi
8884
8885fi
8886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8887$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8888
8889
8890
8891cat >>confdefs.h <<_ACEOF
8892#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8893_ACEOF
8894
8895
Michael W. Hudson54241132001-12-07 15:38:26 +00008896
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008897
Eitan Adler3055c942018-05-15 22:58:09 -07008898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8899$as_echo_n "checking for long double... " >&6; }
8900if ${ac_cv_type_long_double+:} false; then :
8901 $as_echo_n "(cached) " >&6
8902else
8903 if test "$GCC" = yes; then
8904 ac_cv_type_long_double=yes
8905 else
8906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8907/* end confdefs.h. */
8908/* The Stardent Vistra knows sizeof (long double), but does
8909 not support it. */
8910 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008911int
8912main ()
8913{
Eitan Adler3055c942018-05-15 22:58:09 -07008914static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8915 sizeof (double) <= sizeof (long double))];
8916test_array [0] = 0;
8917return test_array [0];
8918
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008919 ;
8920 return 0;
8921}
8922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008923if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008924 ac_cv_type_long_double=yes
8925else
8926 ac_cv_type_long_double=no
8927fi
8928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8929 fi
8930fi
8931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8932$as_echo "$ac_cv_type_long_double" >&6; }
8933 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008934
Matthias Kloseb9621712010-04-24 17:59:49 +00008935$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008936
Eitan Adler3055c942018-05-15 22:58:09 -07008937 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008938
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008939# The cast to long int works around a bug in the HP C Compiler
8940# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8941# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8942# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8944$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008945if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008947else
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008949
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008950else
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 if test "$ac_cv_type_long_double" = yes; then
8952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008954as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008955See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008956 else
8957 ac_cv_sizeof_long_double=0
8958 fi
8959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008960
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8963$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008964
8965
8966
8967cat >>confdefs.h <<_ACEOF
8968#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8969_ACEOF
8970
8971
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973# The cast to long int works around a bug in the HP C Compiler
8974# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8975# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8976# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8978$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008979if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008980 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008981else
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008983
Thomas Woutersb2137042007-02-01 18:02:27 +00008984else
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 if test "$ac_cv_type__Bool" = yes; then
8986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008988as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008989See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990 else
8991 ac_cv_sizeof__Bool=0
8992 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008994
Thomas Woutersb2137042007-02-01 18:02:27 +00008995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8997$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998
8999
9000
Thomas Woutersb2137042007-02-01 18:02:27 +00009001cat >>confdefs.h <<_ACEOF
9002#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9003_ACEOF
9004
9005
Thomas Woutersb2137042007-02-01 18:02:27 +00009006
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009007# The cast to long int works around a bug in the HP C Compiler
9008# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9009# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9010# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9012$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009013if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009015else
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009017#ifdef HAVE_SYS_TYPES_H
9018#include <sys/types.h>
9019#endif
9020
Matthias Kloseb9621712010-04-24 17:59:49 +00009021"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009022
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009023else
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 if test "$ac_cv_type_off_t" = yes; then
9025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009027as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009028See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009029 else
9030 ac_cv_sizeof_off_t=0
9031 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009033
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9036$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009037
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009038
9039
Martin v. Löwis11437992002-04-12 09:54:03 +00009040cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009041#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009042_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009043
Michael W. Hudson54241132001-12-07 15:38:26 +00009044
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009045
Matthias Kloseb9621712010-04-24 17:59:49 +00009046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9047$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009048if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009049 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009050
Matthias Kloseb9621712010-04-24 17:59:49 +00009051$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009052
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9054$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009055else
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9057$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009058fi
9059
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009060# The cast to long int works around a bug in the HP C Compiler
9061# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9062# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9063# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9065$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009066if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009067 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009068else
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009070#ifdef HAVE_SYS_TYPES_H
9071#include <sys/types.h>
9072#endif
9073#ifdef HAVE_TIME_H
9074#include <time.h>
9075#endif
9076
Matthias Kloseb9621712010-04-24 17:59:49 +00009077"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009078
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009079else
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 if test "$ac_cv_type_time_t" = yes; then
9081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009083as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009084See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009085 else
9086 ac_cv_sizeof_time_t=0
9087 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009089
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9092$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009093
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009094
9095
Martin v. Löwis11437992002-04-12 09:54:03 +00009096cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009097#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009098_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009099
Michael W. Hudson54241132001-12-07 15:38:26 +00009100
9101
Trent Mick635f6fb2000-08-23 21:33:05 +00009102# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009103ac_save_cc="$CC"
9104if test "$ac_cv_kpthread" = "yes"
9105then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009106elif test "$ac_cv_kthread" = "yes"
9107then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009108elif test "$ac_cv_pthread" = "yes"
9109then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009110fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009111
Matthias Kloseb9621712010-04-24 17:59:49 +00009112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9113$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009114have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009116/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009117
9118 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009119int
9120main ()
9121{
Guido van Rossum12580492000-09-24 16:47:19 +00009122pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 ;
9124 return 0;
9125}
Matthias Kloseb159a552010-04-25 21:00:44 +00009126
Martin v. Löwis11437992002-04-12 09:54:03 +00009127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009128if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009129 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9133$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009134if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9138# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9140$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009141if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009142 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009143else
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009145#ifdef HAVE_PTHREAD_H
9146#include <pthread.h>
9147#endif
9148
Matthias Kloseb9621712010-04-24 17:59:49 +00009149"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009151else
Matthias Kloseb9621712010-04-24 17:59:49 +00009152 if test "$ac_cv_type_pthread_t" = yes; then
9153 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009155as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009156See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009157 else
9158 ac_cv_sizeof_pthread_t=0
9159 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009161
Trent Mick635f6fb2000-08-23 21:33:05 +00009162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9164$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009165
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009166
9167
Martin v. Löwis11437992002-04-12 09:54:03 +00009168cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009169#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009170_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009171
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009172
Trent Mick635f6fb2000-08-23 21:33:05 +00009173fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009174
9175# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9176# This checking will be unnecessary after removing deprecated TLS API.
9177# The cast to long int works around a bug in the HP C Compiler
9178# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9179# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9180# This bug is HP SR number 8606223364.
9181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9182$as_echo_n "checking size of pthread_key_t... " >&6; }
9183if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9184 $as_echo_n "(cached) " >&6
9185else
9186 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9187"; then :
9188
9189else
9190 if test "$ac_cv_type_pthread_key_t" = yes; then
9191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9193as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9194See \`config.log' for more details" "$LINENO" 5; }
9195 else
9196 ac_cv_sizeof_pthread_key_t=0
9197 fi
9198fi
9199
9200fi
9201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9202$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9203
9204
9205
9206cat >>confdefs.h <<_ACEOF
9207#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9208_ACEOF
9209
9210
9211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9212$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9213if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9215/* end confdefs.h. */
9216#include <pthread.h>
9217int
9218main ()
9219{
9220pthread_key_t k; k * 1;
9221 ;
9222 return 0;
9223}
9224_ACEOF
9225if ac_fn_c_try_compile "$LINENO"; then :
9226 ac_pthread_key_t_is_arithmetic_type=yes
9227else
9228 ac_pthread_key_t_is_arithmetic_type=no
9229
9230fi
9231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9233$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9234 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9235
9236$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9237
9238 fi
9239else
9240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9241$as_echo "no" >&6; }
9242fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009243CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009244
Michael W. Hudson54241132001-12-07 15:38:26 +00009245
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009246case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009247 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009248 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9249 ;;
9250 Darwin/*)
9251 OTHER_LIBTOOL_OPT=""
9252 ;;
9253esac
9254
9255
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009256
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009257case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009258 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009259 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9260 if test "${enable_universalsdk}"; then
9261 :
9262 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009263 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009264 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009265 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009266 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009267 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009268 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009269 if test ${gcc_version} '<' 4.0
9270 then
9271 LIBTOOL_CRUFT="-lcc_dynamic"
9272 else
9273 LIBTOOL_CRUFT=""
9274 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009276 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009277else
Matthias Kloseb9621712010-04-24 17:59:49 +00009278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009279/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009280
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009281 #include <unistd.h>
9282 int main(int argc, char*argv[])
9283 {
9284 if (sizeof(long) == 4) {
9285 return 0;
9286 } else {
9287 return 1;
9288 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009289 }
9290
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009292if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009293 ac_osx_32bit=yes
9294else
Matthias Kloseb9621712010-04-24 17:59:49 +00009295 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9298 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009299fi
9300
9301
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009302 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009303 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009304 i386)
9305 MACOSX_DEFAULT_ARCH="i386"
9306 ;;
9307 ppc)
9308 MACOSX_DEFAULT_ARCH="ppc"
9309 ;;
9310 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009311 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009312 ;;
9313 esac
9314 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009315 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009316 i386)
9317 MACOSX_DEFAULT_ARCH="x86_64"
9318 ;;
9319 ppc)
9320 MACOSX_DEFAULT_ARCH="ppc64"
9321 ;;
9322 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009323 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009324 ;;
9325 esac
9326
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009327 fi
9328
9329 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009330 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009331 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009332esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9334$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009335if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009336then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009337 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009338 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009339 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009340
Matthias Kloseb9621712010-04-24 17:59:49 +00009341$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009342
Matthias Kloseb9621712010-04-24 17:59:49 +00009343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9344$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009345 if test $enable_shared = "yes"
9346 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009347 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00009348 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009349else
Matthias Kloseb9621712010-04-24 17:59:49 +00009350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9351$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009352fi
9353
Matthias Kloseb9621712010-04-24 17:59:49 +00009354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9355$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009356case $ac_sys_system/$ac_sys_release in
9357 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009358
Matthias Kloseb9621712010-04-24 17:59:49 +00009359$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009360
Matthias Kloseb9621712010-04-24 17:59:49 +00009361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9362$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009363 ;;
9364 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9366$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009367 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009368esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009369
Guido van Rossum0a516c91994-09-12 10:58:40 +00009370# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009371
Michael W. Hudson54241132001-12-07 15:38:26 +00009372
9373
9374
9375
Benjamin Peterson99f03762010-04-11 22:15:28 +00009376
Thomas Wouters477c8d52006-05-27 19:21:47 +00009377
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009378# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9379# -- usually .so, .sl on HP-UX, .dll on Cygwin
9380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9381$as_echo_n "checking the extension of shared libraries... " >&6; }
9382if test -z "$SHLIB_SUFFIX"; then
9383 case $ac_sys_system in
9384 hp*|HP*)
9385 case `uname -m` in
9386 ia64) SHLIB_SUFFIX=.so;;
9387 *) SHLIB_SUFFIX=.sl;;
9388 esac
9389 ;;
9390 CYGWIN*) SHLIB_SUFFIX=.dll;;
9391 *) SHLIB_SUFFIX=.so;;
9392 esac
9393fi
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9395$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009396
Guido van Rossum0a516c91994-09-12 10:58:40 +00009397# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009398# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009399# (Shared libraries in this instance are shared modules to be loaded into
9400# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9402$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009403if test -z "$LDSHARED"
9404then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009405 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009406 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009407 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009408 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009409 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009410 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009411 if test "$GCC" = "yes" ; then
9412 LDSHARED='$(CC) -shared'
9413 LDCXXSHARED='$(CXX) -shared'
9414 else
9415 LDSHARED='$(CC) -G'
9416 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009417 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009418 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009419 if test "$GCC" = "yes" ; then
9420 LDSHARED='$(CC) -shared'
9421 LDCXXSHARED='$(CXX) -shared'
9422 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009423 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009424 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009425 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009426 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009427 LDSHARED='$(CC) -bundle'
9428 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009429 if test "$enable_framework" ; then
9430 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009431 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9432 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009433 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009434 else
9435 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009436 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009437 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009438 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009439 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009440 LDSHARED='$(CC) -bundle'
9441 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009442 if test "$enable_framework" ; then
9443 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009444 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9445 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009446 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009447 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009448 # No framework, use the Python app as bundle-loader
9449 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009450 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009451 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009452 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009453 Darwin/*)
9454 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9455 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009456
Ned Deily36820b62014-06-25 13:44:22 -07009457 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9458 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9459 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9460 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9461 if test ${dep_target_major} -eq 10 && \
9462 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009463 then
Ned Deily36820b62014-06-25 13:44:22 -07009464 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009465 LDSHARED='$(CC) -bundle'
9466 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009467 if test "$enable_framework" ; then
9468 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009469 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9470 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009471 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009472 else
9473 # No framework, use the Python app as bundle-loader
9474 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9475 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009476 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009477 fi
Ned Deily36820b62014-06-25 13:44:22 -07009478 else
9479 # building for OS X 10.3 and later
9480 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9481 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9482 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009483 fi
9484 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009485 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009486 LDSHARED='$(CC) -shared'
9487 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009488 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009489 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009490 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009491 LDSHARED='$(CC) -shared'
9492 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009493 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009494 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009495 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009496 OpenBSD*)
9497 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9498 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009499 LDSHARED='$(CC) -shared $(CCSHARED)'
9500 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009501 else
9502 case `uname -r` in
9503 [01].* | 2.[0-7] | 2.[0-7].*)
9504 LDSHARED="ld -Bshareable ${LDFLAGS}"
9505 ;;
9506 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009507 LDSHARED='$(CC) -shared $(CCSHARED)'
9508 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009509 ;;
9510 esac
9511 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009512 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009513 LDSHARED='$(CC) -shared'
9514 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009515 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009516 if test "$GCC" = "yes" ; then
9517 LDSHARED='$(CC) -shared'
9518 LDCXXSHARED='$(CXX) -shared'
9519 else
9520 LDSHARED='$(CC) -G'
9521 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009522 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009523 SCO_SV*)
9524 LDSHARED='$(CC) -Wl,-G,-Bexport'
9525 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9526 CYGWIN*)
9527 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9528 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009529 *) LDSHARED="ld";;
9530 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9533$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009534LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009535BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009536# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009537# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9539$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009540if test -z "$CCSHARED"
9541then
Guido van Rossum07397971997-04-29 21:49:50 +00009542 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009543 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009544 then CCSHARED="-fPIC";
9545 elif test `uname -p` = sparc;
9546 then CCSHARED="-xcode=pic32";
9547 else CCSHARED="-Kpic";
9548 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009549 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009550 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009551 else CCSHARED="+z";
9552 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009553 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009554 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009555 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009556 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009557 if test "$GCC" = "yes"
9558 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009559 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009560 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009561 SCO_SV*)
9562 if test "$GCC" = "yes"
9563 then CCSHARED="-fPIC"
9564 else CCSHARED="-Kpic -belf"
9565 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009566 VxWorks*)
9567 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009568 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9571$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009572# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009573# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9575$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009576if test -z "$LINKFORSHARED"
9577then
Guido van Rossum07397971997-04-29 21:49:50 +00009578 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009579 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009580 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009581 LINKFORSHARED="-Wl,-E -Wl,+s";;
9582# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009583 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009584 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009585 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009587 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009588
9589 # Issue #18075: the default maximum stack size (8MBytes) is too
9590 # small for the default recursion limit. Increase the stack size
9591 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009592 # Note: This matches the value of THREAD_STACK_SIZE in
9593 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009594 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9595
Jack Jansene578a632001-08-15 01:27:14 +00009596 if test "$enable_framework"
9597 then
Jack Jansenda49e192005-01-07 13:08:22 +00009598 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009599 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009600 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009601 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009602 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009603 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009604 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009605 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9606 then
9607 LINKFORSHARED="-Wl,--export-dynamic"
9608 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009609 SunOS/5*) case $CC in
9610 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009611 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009612 then
9613 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009614 fi;;
9615 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009616 CYGWIN*)
9617 if test $enable_shared = "no"
9618 then
9619 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9620 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009621 QNX*)
9622 # -Wl,-E causes the symbols to be added to the dynamic
9623 # symbol table so that they can be found when a module
9624 # is loaded. -N 2048K causes the stack size to be set
9625 # to 2048 kilobytes so that the stack doesn't overflow
9626 # when running test_compile.py.
9627 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009628 VxWorks*)
9629 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009630 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9633$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009634
Michael W. Hudson54241132001-12-07 15:38:26 +00009635
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009636
Matthias Kloseb9621712010-04-24 17:59:49 +00009637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9638$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009639if test ! "$LIBRARY" = "$LDLIBRARY"
9640then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009641 case $ac_sys_system in
9642 CYGWIN*)
9643 # Cygwin needs CCSHARED when building extension DLLs
9644 # but not when building the interpreter DLL.
9645 CFLAGSFORSHARED='';;
9646 *)
9647 CFLAGSFORSHARED='$(CCSHARED)'
9648 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9651$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009652
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009653# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9654# library (with --enable-shared).
9655# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009656# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9657# if it is not required, since it creates a dependency of the shared library
9658# to LIBS. This, in turn, means that applications linking the shared libpython
9659# don't need to link LIBS explicitly. The default should be only changed
9660# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009661
Matthias Kloseb9621712010-04-24 17:59:49 +00009662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9663$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009664case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009665 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009666 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009667esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9669$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009670
9671
Guido van Rossum627b2d71993-12-24 10:39:16 +00009672# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9674$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009675if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009676 $as_echo_n "(cached) " >&6
9677else
9678 ac_check_lib_save_LIBS=$LIBS
9679LIBS="-lsendfile $LIBS"
9680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9681/* end confdefs.h. */
9682
9683/* Override any GCC internal prototype to avoid an error.
9684 Use char because int might match the return type of a GCC
9685 builtin and then its argument prototype would still apply. */
9686#ifdef __cplusplus
9687extern "C"
9688#endif
9689char sendfile ();
9690int
9691main ()
9692{
9693return sendfile ();
9694 ;
9695 return 0;
9696}
9697_ACEOF
9698if ac_fn_c_try_link "$LINENO"; then :
9699 ac_cv_lib_sendfile_sendfile=yes
9700else
9701 ac_cv_lib_sendfile_sendfile=no
9702fi
9703rm -f core conftest.err conftest.$ac_objext \
9704 conftest$ac_exeext conftest.$ac_ext
9705LIBS=$ac_check_lib_save_LIBS
9706fi
9707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9708$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009709if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009710 cat >>confdefs.h <<_ACEOF
9711#define HAVE_LIBSENDFILE 1
9712_ACEOF
9713
9714 LIBS="-lsendfile $LIBS"
9715
9716fi
9717
Matthias Kloseb9621712010-04-24 17:59:49 +00009718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9719$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009720if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009722else
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009724LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728/* Override any GCC internal prototype to avoid an error.
9729 Use char because int might match the return type of a GCC
9730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009731#ifdef __cplusplus
9732extern "C"
9733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009734char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009735int
9736main ()
9737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ;
9740 return 0;
9741}
9742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009745else
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748rm -f core conftest.err conftest.$ac_objext \
9749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009750LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9753$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009754if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 cat >>confdefs.h <<_ACEOF
9756#define HAVE_LIBDL 1
9757_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009758
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009759 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009760
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009761fi
9762 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9764$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009765if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009766 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009767else
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009769LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773/* Override any GCC internal prototype to avoid an error.
9774 Use char because int might match the return type of a GCC
9775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009776#ifdef __cplusplus
9777extern "C"
9778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009779char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009780int
9781main ()
9782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009784 ;
9785 return 0;
9786}
9787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009790else
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009793rm -f core conftest.err conftest.$ac_objext \
9794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9798$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009799if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 cat >>confdefs.h <<_ACEOF
9801#define HAVE_LIBDLD 1
9802_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009803
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009804 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009806fi
9807 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009808
Michael Felt0d3ccb42017-12-30 22:39:20 +01009809# checks for uuid.h location
9810for ac_header in uuid/uuid.h uuid.h
9811do :
9812 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9813ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9814if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9815 cat >>confdefs.h <<_ACEOF
9816#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9817_ACEOF
9818
9819fi
9820
9821done
9822
9823
Berker Peksag9a10ff42017-11-08 23:09:16 +03009824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9825$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9827/* end confdefs.h. */
9828#include <uuid/uuid.h>
9829int
9830main ()
9831{
9832
9833#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009834void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009835#endif
9836
9837 ;
9838 return 0;
9839}
9840_ACEOF
9841if ac_fn_c_try_compile "$LINENO"; then :
9842
9843$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9844
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9846$as_echo "yes" >&6; }
9847else
9848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9849$as_echo "no" >&6; }
9850
9851fi
9852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9853
Michael Felt0d3ccb42017-12-30 22:39:20 +01009854# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009855# FreeBSD and OpenBSD provides support as well
9856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9857$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9859/* end confdefs.h. */
9860#include <uuid.h>
9861int
9862main ()
9863{
9864
9865#ifndef uuid_create
9866void *x = uuid_create
9867#endif
9868
9869 ;
9870 return 0;
9871}
9872_ACEOF
9873if ac_fn_c_try_compile "$LINENO"; then :
9874
9875$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9876
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9878$as_echo "yes" >&6; }
9879else
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
9882
9883fi
9884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9885
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009886# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9887# stream in big-endian byte-order
9888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9889$as_echo_n "checking for uuid_enc_be... " >&6; }
9890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9891/* end confdefs.h. */
9892#include <uuid.h>
9893int
9894main ()
9895{
9896
9897#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009898void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009899#endif
9900
9901 ;
9902 return 0;
9903}
9904_ACEOF
9905if ac_fn_c_try_compile "$LINENO"; then :
9906
9907$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9908
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9910$as_echo "yes" >&6; }
9911else
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913$as_echo "no" >&6; }
9914
9915fi
9916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9917
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009918# 'Real Time' functions on Solaris
9919# posix4 on Solaris 2.6
9920# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009922$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009923if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009925else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009926 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930/* Override any GCC internal prototype to avoid an error.
9931 Use char because int might match the return type of a GCC
9932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009933#ifdef __cplusplus
9934extern "C"
9935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009936char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009937int
9938main ()
9939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009940return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009941 ;
9942 return 0;
9943}
9944_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009945for ac_lib in '' pthread rt posix4; do
9946 if test -z "$ac_lib"; then
9947 ac_res="none required"
9948 else
9949 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009950 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009951 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009955rm -f core conftest.err conftest.$ac_objext \
9956 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009957 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009958 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009960done
Victor Stinnere0be4232011-10-25 13:06:09 +02009961if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009963else
9964 ac_cv_search_sem_init=no
9965fi
9966rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009967LIBS=$ac_func_search_save_LIBS
9968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9970$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009972if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009973 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009974
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009975fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009976
Martin v. Löwis519adae2003-09-20 10:47:47 +00009977
Martin v. Löwis19d17342003-06-14 21:03:05 +00009978# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9980$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009981if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009983else
9984 ac_check_lib_save_LIBS=$LIBS
9985LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009987/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009989/* Override any GCC internal prototype to avoid an error.
9990 Use char because int might match the return type of a GCC
9991 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009992#ifdef __cplusplus
9993extern "C"
9994#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009995char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009996int
9997main ()
9998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009999return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010000 ;
10001 return 0;
10002}
10003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010005 ac_cv_lib_intl_textdomain=yes
10006else
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010009rm -f core conftest.err conftest.$ac_objext \
10010 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010011LIBS=$ac_check_lib_save_LIBS
10012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10014$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010015if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010016
Matthias Kloseb9621712010-04-24 17:59:49 +000010017$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010018
Brett Cannonc6d936e2009-06-07 20:09:53 +000010019 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010020fi
10021
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010022
10023# checks for system dependent C++ extensions support
10024case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010025 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10026$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010028/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010029
Georg Brandl59e87bd2011-02-15 19:48:59 +000010030 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010031int
10032main ()
10033{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010034loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010035 ;
10036 return 0;
10037}
Matthias Kloseb159a552010-04-25 21:00:44 +000010038
Martin v. Löwis11437992002-04-12 09:54:03 +000010039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010040if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010041
Matthias Kloseb159a552010-04-25 21:00:44 +000010042
Matthias Kloseb9621712010-04-24 17:59:49 +000010043$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010044
Matthias Kloseb159a552010-04-25 21:00:44 +000010045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010046$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010047
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010048else
Matthias Kloseb159a552010-04-25 21:00:44 +000010049
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010051$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010052
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010054rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010055 conftest$ac_exeext conftest.$ac_ext
10056# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10057# of the AIX system used to build/package Python executable. This tag serves
10058# as a baseline for bdist module packages
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10060$as_echo_n "checking for the system builddate... " >&6; }
10061 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10062
10063cat >>confdefs.h <<_ACEOF
10064#define AIX_BUILDDATE $AIX_BUILDDATE
10065_ACEOF
10066
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10068$as_echo "$AIX_BUILDDATE" >&6; }
10069 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010070 *) ;;
10071esac
10072
Christian Heimes985ecdc2013-11-20 11:46:18 +010010073# check for systems that require aligned memory access
10074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10075$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010076if ${ac_cv_aligned_required+:} false; then :
10077 $as_echo_n "(cached) " >&6
10078else
10079 if test "$cross_compiling" = yes; then :
10080 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010081else
10082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10083/* end confdefs.h. */
10084
10085int main()
10086{
10087 char s[16];
10088 int i, *p1, *p2;
10089 for (i=0; i < 16; i++)
10090 s[i] = i;
10091 p1 = (int*)(s+1);
10092 p2 = (int*)(s+2);
10093 if (*p1 == *p2)
10094 return 1;
10095 return 0;
10096}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010097_ACEOF
10098if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010099 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010100else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010101 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010102fi
10103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10104 conftest.$ac_objext conftest.beam conftest.$ac_ext
10105fi
10106
10107
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010108fi
10109
10110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10111$as_echo "$ac_cv_aligned_required" >&6; }
10112if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010113
10114$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10115
10116fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010117
10118# str, bytes and memoryview hash algorithm
10119
10120
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10122$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10123
10124# Check whether --with-hash_algorithm was given.
10125if test "${with_hash_algorithm+set}" = set; then :
10126 withval=$with_hash_algorithm;
10127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10128$as_echo "$withval" >&6; }
10129case "$withval" in
10130 siphash24)
10131 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10132
10133 ;;
10134 fnv)
10135 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10136
10137 ;;
10138 *)
10139 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10140 ;;
10141esac
10142
10143else
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10145$as_echo "default" >&6; }
10146fi
10147
10148
Charles-François Natalid30b0222014-05-08 23:08:51 +010010149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10150$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10151
10152# Check whether --with-address_sanitizer was given.
10153if test "${with_address_sanitizer+set}" = set; then :
10154 withval=$with_address_sanitizer;
10155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10156$as_echo "$withval" >&6; }
10157BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10158LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010159# ASan works by controlling memory allocation, our own malloc interferes.
10160with_pymalloc="no"
10161
10162else
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10164$as_echo "no" >&6; }
10165fi
10166
10167
10168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10169$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10170
10171# Check whether --with-memory_sanitizer was given.
10172if test "${with_memory_sanitizer+set}" = set; then :
10173 withval=$with_memory_sanitizer;
10174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10175$as_echo "$withval" >&6; }
10176BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10177LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10178# MSan works by controlling memory allocation, our own malloc interferes.
10179with_pymalloc="no"
10180
10181else
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10183$as_echo "no" >&6; }
10184fi
10185
10186
10187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10188$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10189
10190# Check whether --with-undefined_behavior_sanitizer was given.
10191if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10192 withval=$with_undefined_behavior_sanitizer;
10193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10194$as_echo "$withval" >&6; }
10195BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10196LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010197
10198else
10199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10200$as_echo "no" >&6; }
10201fi
10202
10203
Guido van Rossum70c7f481998-03-26 18:44:10 +000010204# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10206$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010207if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010209else
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010211LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215/* Override any GCC internal prototype to avoid an error.
10216 Use char because int might match the return type of a GCC
10217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010218#ifdef __cplusplus
10219extern "C"
10220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010221char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010222int
10223main ()
10224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010225return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 ;
10227 return 0;
10228}
10229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010230if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010231 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010232else
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010235rm -f core conftest.err conftest.$ac_objext \
10236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010237LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10240$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010241if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010242 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010243fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010244 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10246$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010247if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010249else
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010251LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255/* Override any GCC internal prototype to avoid an error.
10256 Use char because int might match the return type of a GCC
10257 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010258#ifdef __cplusplus
10259extern "C"
10260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010261char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010262int
10263main ()
10264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ;
10267 return 0;
10268}
10269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010270if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010272else
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010275rm -f core conftest.err conftest.$ac_objext \
10276 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010277LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10280$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010281if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010282 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010283fi
10284 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010285
Matthias Kloseb9621712010-04-24 17:59:49 +000010286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10287$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010290if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10293$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010294LIBS="$withval $LIBS"
10295
10296else
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299fi
10300
Guido van Rossum7f43da71994-08-01 12:15:30 +000010301
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010302
10303
10304
10305
10306
10307
Victor Stinnerb477d192020-01-22 22:48:16 +010010308
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010309if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10310 if test -n "$ac_tool_prefix"; then
10311 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10312set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10314$as_echo_n "checking for $ac_word... " >&6; }
10315if ${ac_cv_path_PKG_CONFIG+:} false; then :
10316 $as_echo_n "(cached) " >&6
10317else
10318 case $PKG_CONFIG in
10319 [\\/]* | ?:[\\/]*)
10320 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10321 ;;
10322 *)
10323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10324for as_dir in $PATH
10325do
10326 IFS=$as_save_IFS
10327 test -z "$as_dir" && as_dir=.
10328 for ac_exec_ext in '' $ac_executable_extensions; do
10329 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10330 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10331 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10332 break 2
10333 fi
10334done
10335 done
10336IFS=$as_save_IFS
10337
10338 ;;
10339esac
10340fi
10341PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10342if test -n "$PKG_CONFIG"; then
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10344$as_echo "$PKG_CONFIG" >&6; }
10345else
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347$as_echo "no" >&6; }
10348fi
10349
10350
10351fi
10352if test -z "$ac_cv_path_PKG_CONFIG"; then
10353 ac_pt_PKG_CONFIG=$PKG_CONFIG
10354 # Extract the first word of "pkg-config", so it can be a program name with args.
10355set dummy pkg-config; ac_word=$2
10356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10357$as_echo_n "checking for $ac_word... " >&6; }
10358if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10359 $as_echo_n "(cached) " >&6
10360else
10361 case $ac_pt_PKG_CONFIG in
10362 [\\/]* | ?:[\\/]*)
10363 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10364 ;;
10365 *)
10366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10367for as_dir in $PATH
10368do
10369 IFS=$as_save_IFS
10370 test -z "$as_dir" && as_dir=.
10371 for ac_exec_ext in '' $ac_executable_extensions; do
10372 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10373 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10374 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10375 break 2
10376 fi
10377done
10378 done
10379IFS=$as_save_IFS
10380
10381 ;;
10382esac
10383fi
10384ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10385if test -n "$ac_pt_PKG_CONFIG"; then
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10387$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10388else
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
10391fi
10392
10393 if test "x$ac_pt_PKG_CONFIG" = x; then
10394 PKG_CONFIG=""
10395 else
10396 case $cross_compiling:$ac_tool_warned in
10397yes:)
10398{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10399$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10400ac_tool_warned=yes ;;
10401esac
10402 PKG_CONFIG=$ac_pt_PKG_CONFIG
10403 fi
10404else
10405 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10406fi
10407
10408fi
10409if test -n "$PKG_CONFIG"; then
10410 _pkg_min_version=0.9.0
10411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10412$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10413 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10415$as_echo "yes" >&6; }
10416 else
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
10419 PKG_CONFIG=""
10420 fi
10421fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010422
10423# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10425$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010426
10427# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010428if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010429 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010430else
10431 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010432fi
10433
10434
Matthias Kloseb9621712010-04-24 17:59:49 +000010435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10436$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010437
10438# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10440$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010441
10442# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010444 withval=$with_system_ffi;
10445fi
10446
10447
Zachary Waref40d4dd2016-09-17 01:25:24 -050010448if test "$ac_sys_system" = "Darwin"
10449then
10450 case "$with_system_ffi" in
10451 "")
10452 with_system_ffi="no"
10453 ;;
10454 yes|no)
10455 ;;
10456 *)
10457 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10458 ;;
10459 esac
10460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10461$as_echo "$with_system_ffi" >&6; }
10462else
10463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10464$as_echo "yes" >&6; }
10465 if test "$with_system_ffi" != ""
10466 then
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10468$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10469 fi
10470 with_system_ffi="yes"
10471fi
Zachary Ware935043d2016-09-09 17:01:21 -070010472
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010473if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010474 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10475else
10476 LIBFFI_INCLUDEDIR=""
10477fi
10478
10479
Stefan Krah60187b52012-03-23 19:06:27 +010010480# Check for use of the system libmpdec library
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10482$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10483
10484# Check whether --with-system_libmpdec was given.
10485if test "${with_system_libmpdec+set}" = set; then :
10486 withval=$with_system_libmpdec;
10487else
10488 with_system_libmpdec="no"
10489fi
10490
10491
10492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10493$as_echo "$with_system_libmpdec" >&6; }
10494
Stefan Krah815280e2020-02-29 19:43:42 +010010495# Check whether _decimal should use a coroutine-local or thread-local context
10496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10497$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10498
10499# Check whether --with-decimal_contextvar was given.
10500if test "${with_decimal_contextvar+set}" = set; then :
10501 withval=$with_decimal_contextvar;
10502else
10503 with_decimal_contextvar="yes"
10504fi
10505
10506
10507if test "$with_decimal_contextvar" != "no"
10508then
10509
10510$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10511
10512fi
10513
10514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10515$as_echo "$with_decimal_contextvar" >&6; }
10516
Benjamin Peterson076ed002010-10-31 17:11:02 +000010517# Check for support for loadable sqlite extensions
10518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10519$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10520# Check whether --enable-loadable-sqlite-extensions was given.
10521if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10522 enableval=$enable_loadable_sqlite_extensions;
10523else
10524 enable_loadable_sqlite_extensions="no"
10525fi
10526
10527
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10529$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10530
Ned Deilyd819b932013-09-06 01:07:05 -070010531# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10532
10533
10534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10535$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10536
10537# Check whether --with-tcltk-includes was given.
10538if test "${with_tcltk_includes+set}" = set; then :
10539 withval=$with_tcltk_includes;
10540else
10541 with_tcltk_includes="default"
10542fi
10543
10544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10545$as_echo "$with_tcltk_includes" >&6; }
10546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10547$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10548
10549# Check whether --with-tcltk-libs was given.
10550if test "${with_tcltk_libs+set}" = set; then :
10551 withval=$with_tcltk_libs;
10552else
10553 with_tcltk_libs="default"
10554fi
10555
10556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10557$as_echo "$with_tcltk_libs" >&6; }
10558if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10559then
10560 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10561 then
10562 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10563 fi
10564 TCLTK_INCLUDES=""
10565 TCLTK_LIBS=""
10566else
10567 TCLTK_INCLUDES="$with_tcltk_includes"
10568 TCLTK_LIBS="$with_tcltk_libs"
10569fi
10570
Matthias Klose55708cc2009-04-30 08:06:49 +000010571# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10573$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010574
10575# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010576if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010577 withval=$with_dbmliborder;
10578if test x$with_dbmliborder = xyes
10579then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010580as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010581else
10582 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10583 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10584 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010585 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010586 fi
10587 done
10588fi
10589fi
10590
Matthias Kloseb9621712010-04-24 17:59:49 +000010591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10592$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010593
Martin v. Löwis11437992002-04-12 09:54:03 +000010594# Templates for things AC_DEFINEd more than once.
10595# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010596
10597
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010598if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010599then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010600 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010602
10603 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010604 if test "$ac_sys_system" = "SunOS"; then
10605 CFLAGS="$CFLAGS -D_REENTRANT"
10606 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010607elif test "$ac_cv_kpthread" = "yes"
10608then
10609 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010610 if test "$ac_cv_cxx_thread" = "yes"; then
10611 CXX="$CXX -Kpthread"
10612 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010613 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010614elif test "$ac_cv_kthread" = "yes"
10615then
10616 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010617 if test "$ac_cv_cxx_thread" = "yes"; then
10618 CXX="$CXX -Kthread"
10619 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010620 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010621elif test "$ac_cv_pthread" = "yes"
10622then
10623 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010624 if test "$ac_cv_cxx_thread" = "yes"; then
10625 CXX="$CXX -pthread"
10626 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010627 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010628else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010629 if test ! -z "$withval" -a -d "$withval"
10630 then LDFLAGS="$LDFLAGS -L$withval"
10631 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010632
10633 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010634 # define _POSIX_THREADS in unistd.h. Some apparently don't
10635 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10637$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010639/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010640
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010641#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010642#ifdef _POSIX_THREADS
10643yes
10644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010645
10646_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010647if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010649 unistd_defines_pthreads=yes
10650else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010651 unistd_defines_pthreads=no
10652fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010653rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010654
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10656$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010659
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010660 # Just looking for pthread_create in libpthread is not enough:
10661 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10662 # So we really have to include pthread.h, and then link.
10663 _libs=$LIBS
10664 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10666$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010668/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010669
10670#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010671#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010672
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010673void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010674int
10675main ()
10676{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010677
10678pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 ;
10680 return 0;
10681}
10682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010684
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10686$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010687 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010688
Guido van Rossum02a1c402000-02-25 19:26:31 +000010689else
Martin v. Löwis11437992002-04-12 09:54:03 +000010690
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010691 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010693if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010694
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010695 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010696
Guido van Rossumad678af1998-10-02 14:42:15 +000010697else
Guido van Rossumad678af1998-10-02 14:42:15 +000010698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10700$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010701if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010703else
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010705LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709/* Override any GCC internal prototype to avoid an error.
10710 Use char because int might match the return type of a GCC
10711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010712#ifdef __cplusplus
10713extern "C"
10714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010715char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010716int
10717main ()
10718{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010720 ;
10721 return 0;
10722}
10723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010725 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010726else
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010729rm -f core conftest.err conftest.$ac_objext \
10730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010731LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10734$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010735if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010736
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010737 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010738 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010739
Greg Steinadf63d62000-07-05 10:38:09 +000010740else
Greg Steinadf63d62000-07-05 10:38:09 +000010741
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10743$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010744if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010746else
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010748LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752/* Override any GCC internal prototype to avoid an error.
10753 Use char because int might match the return type of a GCC
10754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010755#ifdef __cplusplus
10756extern "C"
10757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010758char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010759int
10760main ()
10761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 ;
10764 return 0;
10765}
10766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010768 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010769else
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010772rm -f core conftest.err conftest.$ac_objext \
10773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010774LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10777$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010778if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010779
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010780 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010781 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010782
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010783else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010784
Matthias Kloseb9621712010-04-24 17:59:49 +000010785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10786$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010787if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010789else
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010791LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795/* Override any GCC internal prototype to avoid an error.
10796 Use char because int might match the return type of a GCC
10797 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010798#ifdef __cplusplus
10799extern "C"
10800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010801char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010802int
10803main ()
10804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010805return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010806 ;
10807 return 0;
10808}
10809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010810if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010811 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010812else
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010815rm -f core conftest.err conftest.$ac_objext \
10816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010817LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10820$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010821if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010822
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010823 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010824 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010825
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010826else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10829$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010830if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010832else
Martin v. Löwis11437992002-04-12 09:54:03 +000010833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010834LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010838/* Override any GCC internal prototype to avoid an error.
10839 Use char because int might match the return type of a GCC
10840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010841#ifdef __cplusplus
10842extern "C"
10843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010844char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010845int
10846main ()
10847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010848return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010849 ;
10850 return 0;
10851}
10852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010854 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010855else
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010858rm -f core conftest.err conftest.$ac_objext \
10859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010860LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10863$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010864if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010865
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010866 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010867 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010868
Guido van Rossumb93a8621998-05-07 13:27:32 +000010869else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010870
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010871 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10872
Guido van Rossum2d38f911996-06-26 19:47:01 +000010873fi
10874
Guido van Rossum627b2d71993-12-24 10:39:16 +000010875
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010876fi
10877
Guido van Rossum0be3e491997-05-22 20:33:33 +000010878fi
10879
Guido van Rossum49545951997-12-02 19:28:29 +000010880fi
10881
Guido van Rossumb93a8621998-05-07 13:27:32 +000010882fi
10883
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010885rm -f core conftest.err conftest.$ac_objext \
10886 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010887
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10889$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010890if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010891 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010892else
Martin v. Löwis11437992002-04-12 09:54:03 +000010893 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010894LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010898/* Override any GCC internal prototype to avoid an error.
10899 Use char because int might match the return type of a GCC
10900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010901#ifdef __cplusplus
10902extern "C"
10903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010904char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010905int
10906main ()
10907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010908return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 ;
10910 return 0;
10911}
10912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010913if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010914 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010915else
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010918rm -f core conftest.err conftest.$ac_objext \
10919 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010920LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10923$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010924if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010925
Martin v. Löwis130fb172001-07-19 11:00:41 +000010926 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010927
Guido van Rossum627b2d71993-12-24 10:39:16 +000010928fi
10929
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010930
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010931fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010932
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010933if test "$posix_threads" = "yes"; then
10934 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010937
10938 fi
10939
10940 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10941 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010942 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010943$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010944
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010945 ;;
10946 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010947$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010948
10949 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010950 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010951$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010952
10953 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010954 esac
10955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10957$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010958 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010960else
Matthias Kloseb9621712010-04-24 17:59:49 +000010961 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010962 ac_cv_pthread_system_supported=no
10963else
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010965/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010966
10967 #include <stdio.h>
10968 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010969 void *foo(void *parm) {
10970 return NULL;
10971 }
10972 main() {
10973 pthread_attr_t attr;
10974 pthread_t id;
10975 if (pthread_attr_init(&attr)) exit(-1);
10976 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10977 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10978 exit(0);
10979 }
10980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010981if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010982 ac_cv_pthread_system_supported=yes
10983else
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10987 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010988fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990
Guido van Rossum627b2d71993-12-24 10:39:16 +000010991fi
10992
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10994$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010995 if test "$ac_cv_pthread_system_supported" = "yes"; then
10996
Matthias Kloseb9621712010-04-24 17:59:49 +000010997$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010998
10999 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 for ac_func in pthread_sigmask
11001do :
11002 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011003if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011004 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011005#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011006_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011007 case $ac_sys_system in
11008 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011009
Matthias Kloseb9621712010-04-24 17:59:49 +000011010$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011011
11012 ;;
11013 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011014fi
11015done
11016
pdoxe14679c2017-10-05 00:01:56 -070011017 for ac_func in pthread_getcpuclockid
11018do :
11019 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11020if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11021 cat >>confdefs.h <<_ACEOF
11022#define HAVE_PTHREAD_GETCPUCLOCKID 1
11023_ACEOF
11024
11025fi
11026done
11027
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011028fi
11029
11030
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011032
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11034$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011035# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011036if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011038 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11040$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011041 ipv6=no
11042 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11044$as_echo "yes" >&6; }
11045 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046
11047 ipv6=yes
11048 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050else
Martin v. Löwis11437992002-04-12 09:54:03 +000011051
Matthias Kloseb9621712010-04-24 17:59:49 +000011052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011053/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011054 /* AF_INET6 available check */
11055#include <sys/types.h>
11056#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011057int
11058main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011060int domain = AF_INET6;
11061 ;
11062 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011063}
Martin v. Löwis11437992002-04-12 09:54:03 +000011064_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011065if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011066
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11068$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011069 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011070
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071else
Matthias Kloseb159a552010-04-25 21:00:44 +000011072
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11074$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011076
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011077fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011079
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011080if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11082$as_echo_n "checking if RFC2553 API is available... " >&6; }
11083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011084/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011085
11086 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011087#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011088int
11089main ()
11090{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011091struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011092 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011093 ;
11094 return 0;
11095}
Matthias Kloseb159a552010-04-25 21:00:44 +000011096
Martin v. Löwis11437992002-04-12 09:54:03 +000011097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011098if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011099
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011101$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011102 ipv6=yes
11103
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011104else
Matthias Kloseb159a552010-04-25 21:00:44 +000011105
11106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011107$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011108 ipv6=no
11109
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011112fi
11113
11114if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011116
11117fi
11118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011119fi
11120
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121
11122ipv6type=unknown
11123ipv6lib=none
11124ipv6trylibc=no
11125
11126if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11128$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011129 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11130 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131 case $i in
11132 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011134/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011135
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011136#include <netinet/in.h>
11137#ifdef IPV6_INRIA_VERSION
11138yes
11139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011140_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011142 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011143 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011145rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011146
11147 ;;
11148 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011150/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011151
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011152#include <netinet/in.h>
11153#ifdef __KAME__
11154yes
11155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011156_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011159 ipv6type=$i;
11160 ipv6lib=inet6
11161 ipv6libdir=/usr/local/v6/lib
11162 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011163fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011164rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011165
11166 ;;
11167 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011169/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011170
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011171#include <features.h>
11172#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11173yes
11174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011175_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011177 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011178 ipv6type=$i;
11179 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011180fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011181rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011182
11183 ;;
11184 linux-inet6)
11185 if test -d /usr/inet6; then
11186 ipv6type=$i
11187 ipv6lib=inet6
11188 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011189 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011190 fi
11191 ;;
11192 solaris)
11193 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011194 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011195 ipv6type=$i
11196 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011197 fi
11198 fi
11199 ;;
11200 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011202/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011203
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011204#include <sys/param.h>
11205#ifdef _TOSHIBA_INET6
11206yes
11207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011208_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011209if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011211 ipv6type=$i;
11212 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011213 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011214fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011215rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011216
11217 ;;
11218 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011221
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011222#include </usr/local/v6/include/sys/v6config.h>
11223#ifdef __V6D__
11224yes
11225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011226_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011228 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011229 ipv6type=$i;
11230 ipv6lib=v6;
11231 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011232 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011233fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011234rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011235
11236 ;;
11237 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011239/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011240
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011241#include <sys/param.h>
11242#ifdef _ZETA_MINAMI_INET6
11243yes
11244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011245_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011248 ipv6type=$i;
11249 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011250 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011251fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011252rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011253
11254 ;;
11255 esac
11256 if test "$ipv6type" != "unknown"; then
11257 break
11258 fi
11259 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11261$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011262fi
11263
11264if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11265 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11266 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11267 echo "using lib$ipv6lib"
11268 else
11269 if test $ipv6trylibc = "yes"; then
11270 echo "using libc"
11271 else
11272 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11273 echo "You need to fetch lib$ipv6lib.a from appropriate"
11274 echo 'ipv6 kit and compile beforehand.'
11275 exit 1
11276 fi
11277 fi
11278fi
11279
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11281$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11283/* end confdefs.h. */
11284 /* CAN_RAW_FD_FRAMES available check */
11285#include <linux/can/raw.h>
11286int
11287main ()
11288{
11289int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294if ac_fn_c_try_compile "$LINENO"; then :
11295
11296
11297$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11298
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11300$as_echo "yes" >&6; }
11301
11302else
11303
11304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305$as_echo "no" >&6; }
11306
11307fi
11308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11309
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011310# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11312$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011315if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011316 withval=$with_doc_strings;
11317fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011318
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011319
11320if test -z "$with_doc_strings"
11321then with_doc_strings="yes"
11322fi
11323if test "$with_doc_strings" != "no"
11324then
11325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011327
11328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11330$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011331
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011332# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11334$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011337if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011338 withval=$with_pymalloc;
11339fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011340
Neil Schemenauera35c6882001-02-27 04:45:05 +000011341
Neil Schemenauer16c22972002-03-22 15:34:49 +000011342if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011343then
11344 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011345fi
11346if test "$with_pymalloc" != "no"
11347then
Martin v. Löwis11437992002-04-12 09:54:03 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011350
11351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11353$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011354
Nick Coghlan6ea41862017-06-11 13:16:15 +100011355# Check for --with-c-locale-coercion
11356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11357$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11358
11359# Check whether --with-c-locale-coercion was given.
11360if test "${with_c_locale_coercion+set}" = set; then :
11361 withval=$with_c_locale_coercion;
11362fi
11363
11364
11365if test -z "$with_c_locale_coercion"
11366then
11367 with_c_locale_coercion="yes"
11368fi
11369if test "$with_c_locale_coercion" != "no"
11370then
11371
11372$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11373
11374fi
11375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11376$as_echo "$with_c_locale_coercion" >&6; }
11377
Benjamin Peterson05159c42009-12-03 03:01:27 +000011378# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11380$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011381
11382# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011383if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011384 withval=$with_valgrind;
11385else
11386 with_valgrind=no
11387fi
11388
Matthias Kloseb9621712010-04-24 17:59:49 +000011389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11390$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011391if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011392 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 +020011393if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011394
Matthias Kloseb9621712010-04-24 17:59:49 +000011395$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011396
11397else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011398 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011399
11400fi
11401
11402
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011403 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011404fi
11405
Łukasz Langaa785c872016-09-09 17:37:37 -070011406# Check for DTrace support
11407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11408$as_echo_n "checking for --with-dtrace... " >&6; }
11409
11410# Check whether --with-dtrace was given.
11411if test "${with_dtrace+set}" = set; then :
11412 withval=$with_dtrace;
11413else
11414 with_dtrace=no
11415fi
11416
11417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11418$as_echo "$with_dtrace" >&6; }
11419
11420
11421
11422
11423
11424DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011425DTRACE_HEADERS=
11426DTRACE_OBJS=
11427
11428if test "$with_dtrace" = "yes"
11429then
11430 # Extract the first word of "dtrace", so it can be a program name with args.
11431set dummy dtrace; ac_word=$2
11432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11433$as_echo_n "checking for $ac_word... " >&6; }
11434if ${ac_cv_path_DTRACE+:} false; then :
11435 $as_echo_n "(cached) " >&6
11436else
11437 case $DTRACE in
11438 [\\/]* | ?:[\\/]*)
11439 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11440 ;;
11441 *)
11442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11443for as_dir in $PATH
11444do
11445 IFS=$as_save_IFS
11446 test -z "$as_dir" && as_dir=.
11447 for ac_exec_ext in '' $ac_executable_extensions; do
11448 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11449 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11451 break 2
11452 fi
11453done
11454 done
11455IFS=$as_save_IFS
11456
11457 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11458 ;;
11459esac
11460fi
11461DTRACE=$ac_cv_path_DTRACE
11462if test -n "$DTRACE"; then
11463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11464$as_echo "$DTRACE" >&6; }
11465else
11466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11467$as_echo "no" >&6; }
11468fi
11469
11470
11471 if test "$DTRACE" = "not found"; then
11472 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11473 fi
11474
11475$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11476
11477 DTRACE_HEADERS="Include/pydtrace_probes.h"
11478
11479 # On OS X, DTrace providers do not need to be explicitly compiled and
11480 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11481 # generation flag '-G'. We check for presence of this flag, rather than
11482 # hardcoding support by OS, in the interest of robustness.
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11484$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11485if ${ac_cv_dtrace_link+:} false; then :
11486 $as_echo_n "(cached) " >&6
11487else
11488 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011489 echo 'BEGIN{}' > conftest.d
David Carlieraabdeb72020-01-28 12:53:32 +000011490 "$DTRACE" "$DFLAGS" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011491 ac_cv_dtrace_link=yes
11492
11493fi
11494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11495$as_echo "$ac_cv_dtrace_link" >&6; }
11496 if test "$ac_cv_dtrace_link" = "yes"; then
11497 DTRACE_OBJS="Python/pydtrace.o"
11498 fi
11499fi
11500
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011501# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011502
Guido van Rossum98935bf2001-09-05 19:13:16 +000011503DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011504
Guido van Rossume97ee181999-12-20 21:27:22 +000011505# the dlopen() function means we might want to use dynload_shlib.o. some
11506# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011507for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011508do :
11509 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011510if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011512#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011513_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011514
Guido van Rossume97ee181999-12-20 21:27:22 +000011515fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011516done
Guido van Rossume97ee181999-12-20 21:27:22 +000011517
Michael W. Hudson54241132001-12-07 15:38:26 +000011518
Guido van Rossume97ee181999-12-20 21:27:22 +000011519# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11520# loading of modules.
11521
Matthias Kloseb9621712010-04-24 17:59:49 +000011522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11523$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011524if test -z "$DYNLOADFILE"
11525then
11526 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011527 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11528 if test "$ac_cv_func_dlopen" = yes
11529 then DYNLOADFILE="dynload_shlib.o"
11530 else DYNLOADFILE="dynload_aix.o"
11531 fi
11532 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011533 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011534 *)
11535 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11536 # out any dynamic loading
11537 if test "$ac_cv_func_dlopen" = yes
11538 then DYNLOADFILE="dynload_shlib.o"
11539 else DYNLOADFILE="dynload_stub.o"
11540 fi
11541 ;;
11542 esac
11543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11545$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011546if test "$DYNLOADFILE" != "dynload_stub.o"
11547then
Martin v. Löwis11437992002-04-12 09:54:03 +000011548
Matthias Kloseb9621712010-04-24 17:59:49 +000011549$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011550
11551fi
11552
Neil Schemenauer4e425612001-06-19 15:44:15 +000011553# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11554
Michael W. Hudson54241132001-12-07 15:38:26 +000011555
Matthias Kloseb9621712010-04-24 17:59:49 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11557$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011558if test -z "$MACHDEP_OBJS"
11559then
Jack Jansene578a632001-08-15 01:27:14 +000011560 MACHDEP_OBJS=$extra_machdep_objs
11561else
11562 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011563fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011564if test -z "$MACHDEP_OBJS"; then
11565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11566$as_echo "none" >&6; }
11567else
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11569$as_echo "$MACHDEP_OBJS" >&6; }
11570fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011571
Guido van Rossum627b2d71993-12-24 10:39:16 +000011572# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011573for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011574 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11575 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011576 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011577 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011578 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011579 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011580 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011581 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011582 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011583 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011584 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011585 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011586 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011587 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011588 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011589 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011590 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011591 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11592 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011593 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011594 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011595 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011596 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011597 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011598do :
11599 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11600ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011601if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011602 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011603#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011604_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011605
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011606fi
11607done
11608
Michael W. Hudson54241132001-12-07 15:38:26 +000011609
Benjamin Peterson40caa052018-09-12 15:52:40 -070011610# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11611# links. Some libc implementations have a stub lchmod implementation that always
11612# returns an error.
11613if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011614 for ac_func in lchmod
11615do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011616 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11617if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011618 cat >>confdefs.h <<_ACEOF
11619#define HAVE_LCHMOD 1
11620_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011621
11622fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011623done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011624
11625fi
11626
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011627ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11628 #include <dirent.h>
11629"
11630if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11631
11632$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11633
11634fi
11635
11636
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011637# For some functions, having a definition is not sufficient, since
11638# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11640$as_echo_n "checking for chroot... " >&6; }
11641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011642/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011643#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011644int
11645main ()
11646{
11647void *x=chroot
11648 ;
11649 return 0;
11650}
11651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011653
Matthias Kloseb9621712010-04-24 17:59:49 +000011654$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011655
Matthias Kloseb159a552010-04-25 21:00:44 +000011656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011657$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011658else
Matthias Kloseb9621712010-04-24 17:59:49 +000011659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11660$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011661
11662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11665$as_echo_n "checking for link... " >&6; }
11666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011667/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011668#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011669int
11670main ()
11671{
11672void *x=link
11673 ;
11674 return 0;
11675}
11676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011680
Matthias Kloseb159a552010-04-25 21:00:44 +000011681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011682$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011683else
Matthias Kloseb9621712010-04-24 17:59:49 +000011684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11685$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011686
11687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11690$as_echo_n "checking for symlink... " >&6; }
11691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011692/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011693#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011694int
11695main ()
11696{
11697void *x=symlink
11698 ;
11699 return 0;
11700}
11701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011703
Matthias Kloseb9621712010-04-24 17:59:49 +000011704$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011705
Matthias Kloseb159a552010-04-25 21:00:44 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011707$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011708else
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11710$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011711
11712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11715$as_echo_n "checking for fchdir... " >&6; }
11716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011717/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011718#include <unistd.h>
11719int
11720main ()
11721{
11722void *x=fchdir
11723 ;
11724 return 0;
11725}
11726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011727if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011728
Matthias Kloseb9621712010-04-24 17:59:49 +000011729$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011730
Matthias Kloseb159a552010-04-25 21:00:44 +000011731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011732$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011733else
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11735$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011736
11737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11740$as_echo_n "checking for fsync... " >&6; }
11741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011742/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011743#include <unistd.h>
11744int
11745main ()
11746{
11747void *x=fsync
11748 ;
11749 return 0;
11750}
11751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011752if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011753
Matthias Kloseb9621712010-04-24 17:59:49 +000011754$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011755
Matthias Kloseb159a552010-04-25 21:00:44 +000011756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011757$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011758else
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11760$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011761
11762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11765$as_echo_n "checking for fdatasync... " >&6; }
11766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011767/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011768#include <unistd.h>
11769int
11770main ()
11771{
11772void *x=fdatasync
11773 ;
11774 return 0;
11775}
11776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011778
Matthias Kloseb9621712010-04-24 17:59:49 +000011779$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011780
Matthias Kloseb159a552010-04-25 21:00:44 +000011781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011782$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11785$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011786
11787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11790$as_echo_n "checking for epoll... " >&6; }
11791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011792/* end confdefs.h. */
11793#include <sys/epoll.h>
11794int
11795main ()
11796{
11797void *x=epoll_create
11798 ;
11799 return 0;
11800}
11801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011802if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011803
Matthias Kloseb9621712010-04-24 17:59:49 +000011804$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011805
Matthias Kloseb159a552010-04-25 21:00:44 +000011806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011807$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011808else
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11810$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011811
11812fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11815$as_echo_n "checking for epoll_create1... " >&6; }
11816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11817/* end confdefs.h. */
11818#include <sys/epoll.h>
11819int
11820main ()
11821{
11822void *x=epoll_create1
11823 ;
11824 return 0;
11825}
11826_ACEOF
11827if ac_fn_c_try_compile "$LINENO"; then :
11828
11829$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11830
11831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11832$as_echo "yes" >&6; }
11833else
11834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11835$as_echo "no" >&6; }
11836
11837fi
11838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11840$as_echo_n "checking for kqueue... " >&6; }
11841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011842/* end confdefs.h. */
11843
11844#include <sys/types.h>
11845#include <sys/event.h>
11846
11847int
11848main ()
11849{
11850int x=kqueue()
11851 ;
11852 return 0;
11853}
11854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011855if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011856
Matthias Kloseb9621712010-04-24 17:59:49 +000011857$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011858
Matthias Kloseb159a552010-04-25 21:00:44 +000011859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011860$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011861else
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11863$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011864
11865fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11868$as_echo_n "checking for prlimit... " >&6; }
11869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11870/* end confdefs.h. */
11871
11872#include <sys/time.h>
11873#include <sys/resource.h>
11874
11875int
11876main ()
11877{
11878void *x=prlimit
11879 ;
11880 return 0;
11881}
11882_ACEOF
11883if ac_fn_c_try_compile "$LINENO"; then :
11884
11885$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11886
11887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11888$as_echo "yes" >&6; }
11889else
11890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11891$as_echo "no" >&6; }
11892
11893fi
11894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11895
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11897$as_echo_n "checking for memfd_create... " >&6; }
11898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11899/* end confdefs.h. */
11900
11901#ifdef HAVE_SYS_MMAN_H
11902#include <sys/mman.h>
11903#endif
11904#ifdef HAVE_SYS_MEMFD_H
11905#include <sys/memfd.h>
11906#endif
11907
11908int
11909main ()
11910{
11911void *x=memfd_create
11912 ;
11913 return 0;
11914}
11915_ACEOF
11916if ac_fn_c_try_compile "$LINENO"; then :
11917
11918$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11919
11920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11921$as_echo "yes" >&6; }
11922else
11923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11924$as_echo "no" >&6; }
11925
11926fi
11927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11928
Martin v. Löwisd5843682002-11-21 20:41:28 +000011929# On some systems (eg. FreeBSD 5), we would find a definition of the
11930# functions ctermid_r, setgroups in the library, but no prototype
11931# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11932# address to avoid compiler warnings and potential miscompilations
11933# because of the missing prototypes.
11934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11936$as_echo_n "checking for ctermid_r... " >&6; }
11937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011938/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011939
Martin v. Löwisd5843682002-11-21 20:41:28 +000011940#include <stdio.h>
11941
Martin v. Löwisd5843682002-11-21 20:41:28 +000011942int
11943main ()
11944{
11945void* p = ctermid_r
11946 ;
11947 return 0;
11948}
11949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011950if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011953
Matthias Kloseb159a552010-04-25 21:00:44 +000011954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011955$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011956else
Matthias Kloseb9621712010-04-24 17:59:49 +000011957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11958$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011959
11960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11962
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11964$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011965if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011966 $as_echo_n "(cached) " >&6
11967else
11968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011969/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011970#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011971int
11972main ()
11973{
11974void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011975
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011976 ;
11977 return 0;
11978}
11979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011980if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011981 ac_cv_flock_decl=yes
11982else
11983 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011984
11985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011987
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011988fi
11989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11990$as_echo "$ac_cv_flock_decl" >&6; }
11991if test "x${ac_cv_flock_decl}" = xyes; then
11992 for ac_func in flock
11993do :
11994 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011995if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011996 cat >>confdefs.h <<_ACEOF
11997#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011998_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011999
Antoine Pitroua3000072010-09-07 14:52:42 +000012000else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012002$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012003if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012004 $as_echo_n "(cached) " >&6
12005else
12006 ac_check_lib_save_LIBS=$LIBS
12007LIBS="-lbsd $LIBS"
12008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12009/* end confdefs.h. */
12010
12011/* Override any GCC internal prototype to avoid an error.
12012 Use char because int might match the return type of a GCC
12013 builtin and then its argument prototype would still apply. */
12014#ifdef __cplusplus
12015extern "C"
12016#endif
12017char flock ();
12018int
12019main ()
12020{
12021return flock ();
12022 ;
12023 return 0;
12024}
12025_ACEOF
12026if ac_fn_c_try_link "$LINENO"; then :
12027 ac_cv_lib_bsd_flock=yes
12028else
12029 ac_cv_lib_bsd_flock=no
12030fi
12031rm -f core conftest.err conftest.$ac_objext \
12032 conftest$ac_exeext conftest.$ac_ext
12033LIBS=$ac_check_lib_save_LIBS
12034fi
12035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12036$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012037if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012038 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012039
12040
12041$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12042
12043
12044fi
12045
12046
12047fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012048done
12049
Antoine Pitroua3000072010-09-07 14:52:42 +000012050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12053$as_echo_n "checking for getpagesize... " >&6; }
12054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012055/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012056
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012057#include <unistd.h>
12058
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012059int
12060main ()
12061{
12062void* p = getpagesize
12063 ;
12064 return 0;
12065}
12066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012067if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012068
Matthias Kloseb9621712010-04-24 17:59:49 +000012069$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012070
Matthias Kloseb159a552010-04-25 21:00:44 +000012071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012072$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012073else
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12075$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012076
12077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012079
Victor Stinner984890f2011-11-24 13:53:38 +010012080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12081$as_echo_n "checking for broken unsetenv... " >&6; }
12082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12083/* end confdefs.h. */
12084
12085#include <stdlib.h>
12086
12087int
12088main ()
12089{
12090int res = unsetenv("DUMMY")
12091 ;
12092 return 0;
12093}
12094_ACEOF
12095if ac_fn_c_try_compile "$LINENO"; then :
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12097$as_echo "no" >&6; }
12098else
12099
12100$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12101
12102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12103$as_echo "yes" >&6; }
12104
12105fi
12106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12107
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012108for ac_prog in true
12109do
12110 # Extract the first word of "$ac_prog", so it can be a program name with args.
12111set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12113$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012114if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012116else
12117 if test -n "$TRUE"; then
12118 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12119else
12120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12121for as_dir in $PATH
12122do
12123 IFS=$as_save_IFS
12124 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012127 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 $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 +000012129 break 2
12130 fi
12131done
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012134
12135fi
12136fi
12137TRUE=$ac_cv_prog_TRUE
12138if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12140$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012141else
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12143$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012144fi
12145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012146
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012147 test -n "$TRUE" && break
12148done
12149test -n "$TRUE" || TRUE="/bin/true"
12150
12151
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12153$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012154if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012156else
12157 ac_check_lib_save_LIBS=$LIBS
12158LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012160/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162/* Override any GCC internal prototype to avoid an error.
12163 Use char because int might match the return type of a GCC
12164 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012165#ifdef __cplusplus
12166extern "C"
12167#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012168char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012169int
12170main ()
12171{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012173 ;
12174 return 0;
12175}
12176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012177if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012178 ac_cv_lib_c_inet_aton=yes
12179else
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012182rm -f core conftest.err conftest.$ac_objext \
12183 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012184LIBS=$ac_check_lib_save_LIBS
12185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12187$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012188if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012189 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012190else
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12192$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012193if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012195else
12196 ac_check_lib_save_LIBS=$LIBS
12197LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012199/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201/* Override any GCC internal prototype to avoid an error.
12202 Use char because int might match the return type of a GCC
12203 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012204#ifdef __cplusplus
12205extern "C"
12206#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012207char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012208int
12209main ()
12210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012211return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012212 ;
12213 return 0;
12214}
12215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012216if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012217 ac_cv_lib_resolv_inet_aton=yes
12218else
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012221rm -f core conftest.err conftest.$ac_objext \
12222 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012223LIBS=$ac_check_lib_save_LIBS
12224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12226$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012227if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012228 cat >>confdefs.h <<_ACEOF
12229#define HAVE_LIBRESOLV 1
12230_ACEOF
12231
12232 LIBS="-lresolv $LIBS"
12233
12234fi
12235
12236
12237fi
12238
12239
Christian Heimesd0764e22007-12-04 15:00:33 +000012240# On Tru64, chflags seems to be present, but calling it will
12241# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12243$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012244if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012246else
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012248 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012249else
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012251/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012252
Christian Heimesd0764e22007-12-04 15:00:33 +000012253#include <sys/stat.h>
12254#include <unistd.h>
12255int main(int argc, char*argv[])
12256{
12257 if(chflags(argv[0], 0) != 0)
12258 return 1;
12259 return 0;
12260}
Ned Deily3eb67d52011-06-28 00:00:28 -070012261
Christian Heimesd0764e22007-12-04 15:00:33 +000012262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012263if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012264 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012265else
Matthias Kloseb9621712010-04-24 17:59:49 +000012266 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12269 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012270fi
12271
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012272
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12275$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012276if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012279 ac_cv_have_chflags="yes"
12280else
12281 ac_cv_have_chflags="no"
12282fi
12283
12284fi
12285if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012286
Matthias Kloseb9621712010-04-24 17:59:49 +000012287$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012288
12289fi
12290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12292$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012293if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012295else
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012297 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012298else
Matthias Kloseb9621712010-04-24 17:59:49 +000012299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012300/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012301
Christian Heimesd0764e22007-12-04 15:00:33 +000012302#include <sys/stat.h>
12303#include <unistd.h>
12304int main(int argc, char*argv[])
12305{
12306 if(lchflags(argv[0], 0) != 0)
12307 return 1;
12308 return 0;
12309}
Ned Deily3eb67d52011-06-28 00:00:28 -070012310
Christian Heimesd0764e22007-12-04 15:00:33 +000012311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012312if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012313 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012314else
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12318 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012319fi
12320
12321
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012322fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12324$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012325if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012327if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012328 ac_cv_have_lchflags="yes"
12329else
12330 ac_cv_have_lchflags="no"
12331fi
12332
12333fi
12334if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012335
Matthias Kloseb9621712010-04-24 17:59:49 +000012336$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012337
12338fi
12339
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012340case $ac_sys_system/$ac_sys_release in
12341Darwin/*)
12342 _CUR_CFLAGS="${CFLAGS}"
12343 _CUR_LDFLAGS="${LDFLAGS}"
12344 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12345 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12346 ;;
12347esac
12348
Matthias Kloseb9621712010-04-24 17:59:49 +000012349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12350$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012351if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012353else
12354 ac_check_lib_save_LIBS=$LIBS
12355LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012357/* end confdefs.h. */
12358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359/* Override any GCC internal prototype to avoid an error.
12360 Use char because int might match the return type of a GCC
12361 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012362#ifdef __cplusplus
12363extern "C"
12364#endif
12365char inflateCopy ();
12366int
12367main ()
12368{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012370 ;
12371 return 0;
12372}
12373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012374if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012375 ac_cv_lib_z_inflateCopy=yes
12376else
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012379rm -f core conftest.err conftest.$ac_objext \
12380 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012381LIBS=$ac_check_lib_save_LIBS
12382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12384$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012385if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012386
Matthias Kloseb9621712010-04-24 17:59:49 +000012387$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012388
12389fi
12390
12391
12392case $ac_sys_system/$ac_sys_release in
12393Darwin/*)
12394 CFLAGS="${_CUR_CFLAGS}"
12395 LDFLAGS="${_CUR_LDFLAGS}"
12396 ;;
12397esac
12398
Matthias Kloseb9621712010-04-24 17:59:49 +000012399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12400$as_echo_n "checking for hstrerror... " >&6; }
12401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012402/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012403
Martin v. Löwise9416172003-05-03 10:12:45 +000012404#include <netdb.h>
12405
Martin v. Löwise9416172003-05-03 10:12:45 +000012406int
12407main ()
12408{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012409void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012410 ;
12411 return 0;
12412}
12413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012414if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012415
Matthias Kloseb9621712010-04-24 17:59:49 +000012416$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012417
Matthias Kloseb159a552010-04-25 21:00:44 +000012418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012419$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012420else
Matthias Kloseb9621712010-04-24 17:59:49 +000012421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12422$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012423
12424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012425rm -f core conftest.err conftest.$ac_objext \
12426 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427
Matthias Kloseb9621712010-04-24 17:59:49 +000012428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12429$as_echo_n "checking for inet_aton... " >&6; }
12430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012431/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012432
Martin v. Löwis86d66262006-02-17 08:40:11 +000012433#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012434#include <sys/socket.h>
12435#include <netinet/in.h>
12436#include <arpa/inet.h>
12437
Martin v. Löwise9416172003-05-03 10:12:45 +000012438int
12439main ()
12440{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012441void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012442 ;
12443 return 0;
12444}
12445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012446if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012449
Matthias Kloseb159a552010-04-25 21:00:44 +000012450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012451$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012452else
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12454$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012455
12456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012457rm -f core conftest.err conftest.$ac_objext \
12458 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012459
Matthias Kloseb9621712010-04-24 17:59:49 +000012460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12461$as_echo_n "checking for inet_pton... " >&6; }
12462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012463/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012464
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012465#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012466#include <sys/socket.h>
12467#include <netinet/in.h>
12468#include <arpa/inet.h>
12469
Martin v. Löwise9416172003-05-03 10:12:45 +000012470int
12471main ()
12472{
12473void* p = inet_pton
12474 ;
12475 return 0;
12476}
12477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012478if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012479
Matthias Kloseb9621712010-04-24 17:59:49 +000012480$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012481
Matthias Kloseb159a552010-04-25 21:00:44 +000012482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012483$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012484else
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12486$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012487
12488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012490
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012491# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12493$as_echo_n "checking for setgroups... " >&6; }
12494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012495/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012496
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012497#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012498#ifdef HAVE_GRP_H
12499#include <grp.h>
12500#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012501
Martin v. Löwisd5843682002-11-21 20:41:28 +000012502int
12503main ()
12504{
12505void* p = setgroups
12506 ;
12507 return 0;
12508}
12509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012510if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012511
Matthias Kloseb9621712010-04-24 17:59:49 +000012512$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012513
Matthias Kloseb159a552010-04-25 21:00:44 +000012514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012515$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012516else
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12518$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012519
12520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012522
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012523# check for openpty and forkpty
12524
12525for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012526do :
12527 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012528if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012530#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012531_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012532
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012533else
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12535$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012536if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012538else
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012540LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544/* Override any GCC internal prototype to avoid an error.
12545 Use char because int might match the return type of a GCC
12546 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012547#ifdef __cplusplus
12548extern "C"
12549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012550char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012551int
12552main ()
12553{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012554return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 ;
12556 return 0;
12557}
12558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012559if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012560 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012561else
Matthias Kloseb9621712010-04-24 17:59:49 +000012562 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012564rm -f core conftest.err conftest.$ac_objext \
12565 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012566LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12569$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012570if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012571 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012572 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012573else
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12575$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012576if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012577 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012578else
12579 ac_check_lib_save_LIBS=$LIBS
12580LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012582/* end confdefs.h. */
12583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012584/* Override any GCC internal prototype to avoid an error.
12585 Use char because int might match the return type of a GCC
12586 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012587#ifdef __cplusplus
12588extern "C"
12589#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012590char openpty ();
12591int
12592main ()
12593{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012594return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012595 ;
12596 return 0;
12597}
12598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012599if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012600 ac_cv_lib_bsd_openpty=yes
12601else
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012604rm -f core conftest.err conftest.$ac_objext \
12605 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012606LIBS=$ac_check_lib_save_LIBS
12607fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12609$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012610if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012612 LIBS="$LIBS -lbsd"
12613fi
12614
12615
12616fi
12617
Fred Drake8cef4cf2000-06-28 16:40:38 +000012618
12619fi
12620done
12621
12622for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012623do :
12624 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012625if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012627#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012628_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012629
Fred Drake8cef4cf2000-06-28 16:40:38 +000012630else
Matthias Kloseb9621712010-04-24 17:59:49 +000012631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12632$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012633if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012634 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012635else
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012637LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641/* Override any GCC internal prototype to avoid an error.
12642 Use char because int might match the return type of a GCC
12643 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012644#ifdef __cplusplus
12645extern "C"
12646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012647char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012648int
12649main ()
12650{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012651return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012652 ;
12653 return 0;
12654}
12655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012656if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012657 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012658else
Matthias Kloseb9621712010-04-24 17:59:49 +000012659 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012661rm -f core conftest.err conftest.$ac_objext \
12662 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012663LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12666$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012667if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012669 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012670else
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12672$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012673if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012675else
12676 ac_check_lib_save_LIBS=$LIBS
12677LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012679/* end confdefs.h. */
12680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681/* Override any GCC internal prototype to avoid an error.
12682 Use char because int might match the return type of a GCC
12683 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012684#ifdef __cplusplus
12685extern "C"
12686#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012687char forkpty ();
12688int
12689main ()
12690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012691return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012692 ;
12693 return 0;
12694}
12695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012696if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012697 ac_cv_lib_bsd_forkpty=yes
12698else
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012701rm -f core conftest.err conftest.$ac_objext \
12702 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012703LIBS=$ac_check_lib_save_LIBS
12704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12706$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012707if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012708 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012709 LIBS="$LIBS -lbsd"
12710fi
12711
12712
12713fi
12714
Fred Drake8cef4cf2000-06-28 16:40:38 +000012715
12716fi
12717done
12718
Jack Jansendd19cf82001-12-06 22:36:17 +000012719
Michael W. Hudson54241132001-12-07 15:38:26 +000012720# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012721for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012722do :
12723 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12724ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012725if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012727#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012728_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012729
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012730fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012731done
12732
Michael W. Hudson54241132001-12-07 15:38:26 +000012733
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012734ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012735if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012736 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012737
Martin v. Löwis1142de32002-03-29 16:28:31 +000012738else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012739 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012740 *" dup2.$ac_objext "* ) ;;
12741 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012743esac
12744
Martin v. Löwis1142de32002-03-29 16:28:31 +000012745fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012746
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012747ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012748if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012749 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12750
12751else
12752 case " $LIBOBJS " in
12753 *" strdup.$ac_objext "* ) ;;
12754 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12755 ;;
12756esac
12757
12758fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012759
12760
12761for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012762do :
12763 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012764if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012766#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012769/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012770#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012771int
12772main ()
12773{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012774getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012775 ;
12776 return 0;
12777}
12778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012779if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012782
Guido van Rossum627b2d71993-12-24 10:39:16 +000012783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012785
Guido van Rossum627b2d71993-12-24 10:39:16 +000012786fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012787done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012788
Jack Jansen150753c2003-03-29 22:07:47 +000012789for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012790do :
12791 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012792if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012793 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012794#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012797/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012798#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012799int
12800main ()
12801{
12802setpgrp(0,0);
12803 ;
12804 return 0;
12805}
12806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012808
Matthias Kloseb9621712010-04-24 17:59:49 +000012809$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012810
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012813
12814fi
12815done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012816
Michael W. Hudson54241132001-12-07 15:38:26 +000012817
Gregory P. Smith387512c2018-12-30 15:42:32 -080012818# We search for both crypt and crypt_r as one or the other may be defined
12819# This gets us our -lcrypt in LIBS when required on the target platform.
12820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12821$as_echo_n "checking for library containing crypt... " >&6; }
12822if ${ac_cv_search_crypt+:} false; then :
12823 $as_echo_n "(cached) " >&6
12824else
12825 ac_func_search_save_LIBS=$LIBS
12826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12827/* end confdefs.h. */
12828
12829/* Override any GCC internal prototype to avoid an error.
12830 Use char because int might match the return type of a GCC
12831 builtin and then its argument prototype would still apply. */
12832#ifdef __cplusplus
12833extern "C"
12834#endif
12835char crypt ();
12836int
12837main ()
12838{
12839return crypt ();
12840 ;
12841 return 0;
12842}
12843_ACEOF
12844for ac_lib in '' crypt; do
12845 if test -z "$ac_lib"; then
12846 ac_res="none required"
12847 else
12848 ac_res=-l$ac_lib
12849 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12850 fi
12851 if ac_fn_c_try_link "$LINENO"; then :
12852 ac_cv_search_crypt=$ac_res
12853fi
12854rm -f core conftest.err conftest.$ac_objext \
12855 conftest$ac_exeext
12856 if ${ac_cv_search_crypt+:} false; then :
12857 break
12858fi
12859done
12860if ${ac_cv_search_crypt+:} false; then :
12861
12862else
12863 ac_cv_search_crypt=no
12864fi
12865rm conftest.$ac_ext
12866LIBS=$ac_func_search_save_LIBS
12867fi
12868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12869$as_echo "$ac_cv_search_crypt" >&6; }
12870ac_res=$ac_cv_search_crypt
12871if test "$ac_res" != no; then :
12872 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12873
12874fi
12875
12876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12877$as_echo_n "checking for library containing crypt_r... " >&6; }
12878if ${ac_cv_search_crypt_r+:} false; then :
12879 $as_echo_n "(cached) " >&6
12880else
12881 ac_func_search_save_LIBS=$LIBS
12882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12883/* end confdefs.h. */
12884
12885/* Override any GCC internal prototype to avoid an error.
12886 Use char because int might match the return type of a GCC
12887 builtin and then its argument prototype would still apply. */
12888#ifdef __cplusplus
12889extern "C"
12890#endif
12891char crypt_r ();
12892int
12893main ()
12894{
12895return crypt_r ();
12896 ;
12897 return 0;
12898}
12899_ACEOF
12900for ac_lib in '' crypt; do
12901 if test -z "$ac_lib"; then
12902 ac_res="none required"
12903 else
12904 ac_res=-l$ac_lib
12905 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12906 fi
12907 if ac_fn_c_try_link "$LINENO"; then :
12908 ac_cv_search_crypt_r=$ac_res
12909fi
12910rm -f core conftest.err conftest.$ac_objext \
12911 conftest$ac_exeext
12912 if ${ac_cv_search_crypt_r+:} false; then :
12913 break
12914fi
12915done
12916if ${ac_cv_search_crypt_r+:} false; then :
12917
12918else
12919 ac_cv_search_crypt_r=no
12920fi
12921rm conftest.$ac_ext
12922LIBS=$ac_func_search_save_LIBS
12923fi
12924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12925$as_echo "$ac_cv_search_crypt_r" >&6; }
12926ac_res=$ac_cv_search_crypt_r
12927if test "$ac_res" != no; then :
12928 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12929
12930fi
12931
12932
12933ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12934if test "x$ac_cv_func_crypt_r" = xyes; then :
12935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12936/* end confdefs.h. */
12937
12938#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12939#include <crypt.h>
12940
12941int
12942main ()
12943{
12944
12945struct crypt_data d;
12946char *r = crypt_r("", "", &d);
12947
12948 ;
12949 return 0;
12950}
12951_ACEOF
12952if ac_fn_c_try_compile "$LINENO"; then :
12953
12954$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12955
12956fi
12957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12958
12959fi
12960
12961
Victor Stinnere0be4232011-10-25 13:06:09 +020012962for ac_func in clock_gettime
12963do :
12964 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12965if test "x$ac_cv_func_clock_gettime" = xyes; then :
12966 cat >>confdefs.h <<_ACEOF
12967#define HAVE_CLOCK_GETTIME 1
12968_ACEOF
12969
12970else
12971
12972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12973$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12974if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12975 $as_echo_n "(cached) " >&6
12976else
12977 ac_check_lib_save_LIBS=$LIBS
12978LIBS="-lrt $LIBS"
12979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12980/* end confdefs.h. */
12981
12982/* Override any GCC internal prototype to avoid an error.
12983 Use char because int might match the return type of a GCC
12984 builtin and then its argument prototype would still apply. */
12985#ifdef __cplusplus
12986extern "C"
12987#endif
12988char clock_gettime ();
12989int
12990main ()
12991{
12992return clock_gettime ();
12993 ;
12994 return 0;
12995}
12996_ACEOF
12997if ac_fn_c_try_link "$LINENO"; then :
12998 ac_cv_lib_rt_clock_gettime=yes
12999else
13000 ac_cv_lib_rt_clock_gettime=no
13001fi
13002rm -f core conftest.err conftest.$ac_objext \
13003 conftest$ac_exeext conftest.$ac_ext
13004LIBS=$ac_check_lib_save_LIBS
13005fi
13006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13007$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13008if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13009
Victor Stinner7efb8332014-08-29 15:41:08 +020013010 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013011 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13012
13013
13014$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13015
13016
13017fi
13018
13019
13020fi
13021done
13022
13023
13024for ac_func in clock_getres
13025do :
13026 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13027if test "x$ac_cv_func_clock_getres" = xyes; then :
13028 cat >>confdefs.h <<_ACEOF
13029#define HAVE_CLOCK_GETRES 1
13030_ACEOF
13031
13032else
13033
13034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13035$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13036if ${ac_cv_lib_rt_clock_getres+:} false; then :
13037 $as_echo_n "(cached) " >&6
13038else
13039 ac_check_lib_save_LIBS=$LIBS
13040LIBS="-lrt $LIBS"
13041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13042/* end confdefs.h. */
13043
13044/* Override any GCC internal prototype to avoid an error.
13045 Use char because int might match the return type of a GCC
13046 builtin and then its argument prototype would still apply. */
13047#ifdef __cplusplus
13048extern "C"
13049#endif
13050char clock_getres ();
13051int
13052main ()
13053{
13054return clock_getres ();
13055 ;
13056 return 0;
13057}
13058_ACEOF
13059if ac_fn_c_try_link "$LINENO"; then :
13060 ac_cv_lib_rt_clock_getres=yes
13061else
13062 ac_cv_lib_rt_clock_getres=no
13063fi
13064rm -f core conftest.err conftest.$ac_objext \
13065 conftest$ac_exeext conftest.$ac_ext
13066LIBS=$ac_check_lib_save_LIBS
13067fi
13068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13069$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13070if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13071
13072 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13073
13074
13075fi
13076
13077
13078fi
13079done
13080
13081
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013082for ac_func in clock_settime
13083do :
13084 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13085if test "x$ac_cv_func_clock_settime" = xyes; then :
13086 cat >>confdefs.h <<_ACEOF
13087#define HAVE_CLOCK_SETTIME 1
13088_ACEOF
13089
13090else
13091
13092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13093$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13094if ${ac_cv_lib_rt_clock_settime+:} false; then :
13095 $as_echo_n "(cached) " >&6
13096else
13097 ac_check_lib_save_LIBS=$LIBS
13098LIBS="-lrt $LIBS"
13099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13100/* end confdefs.h. */
13101
13102/* Override any GCC internal prototype to avoid an error.
13103 Use char because int might match the return type of a GCC
13104 builtin and then its argument prototype would still apply. */
13105#ifdef __cplusplus
13106extern "C"
13107#endif
13108char clock_settime ();
13109int
13110main ()
13111{
13112return clock_settime ();
13113 ;
13114 return 0;
13115}
13116_ACEOF
13117if ac_fn_c_try_link "$LINENO"; then :
13118 ac_cv_lib_rt_clock_settime=yes
13119else
13120 ac_cv_lib_rt_clock_settime=no
13121fi
13122rm -f core conftest.err conftest.$ac_objext \
13123 conftest$ac_exeext conftest.$ac_ext
13124LIBS=$ac_check_lib_save_LIBS
13125fi
13126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13127$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13128if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13129
13130 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13131
13132
13133fi
13134
13135
13136fi
13137done
13138
13139
Matthias Kloseb9621712010-04-24 17:59:49 +000013140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13141$as_echo_n "checking for major... " >&6; }
13142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013143/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013144
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013145#if defined(MAJOR_IN_MKDEV)
13146#include <sys/mkdev.h>
13147#elif defined(MAJOR_IN_SYSMACROS)
13148#include <sys/sysmacros.h>
13149#else
13150#include <sys/types.h>
13151#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013152
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013153int
13154main ()
13155{
13156
13157 makedev(major(0),minor(0));
13158
13159 ;
13160 return 0;
13161}
13162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013163if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013164
13165
Matthias Kloseb9621712010-04-24 17:59:49 +000013166$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13169$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013170
13171else
Skip Montanaro6dead952003-09-25 14:50:04 +000013172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13174$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013175
13176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013177rm -f core conftest.err conftest.$ac_objext \
13178 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013179
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013180# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013181# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13183$as_echo_n "checking for getaddrinfo... " >&6; }
13184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013185/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013186
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013187#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013188#include <sys/socket.h>
13189#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013190#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013191
Martin v. Löwis11437992002-04-12 09:54:03 +000013192int
13193main ()
13194{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013195getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 ;
13197 return 0;
13198}
13199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013200if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013201 have_getaddrinfo=yes
13202else
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013205rm -f core conftest.err conftest.$ac_objext \
13206 conftest$ac_exeext conftest.$ac_ext
13207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13208$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013209if test $have_getaddrinfo = yes
13210then
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13212$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013213 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013215else
Matthias Kloseb9621712010-04-24 17:59:49 +000013216 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013217
13218if test "${enable_ipv6+set}" = set; then
13219 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13220else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013221 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013222fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013225/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226
Stefan Krah19c21392012-11-22 23:47:32 +010013227#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013228#include <sys/types.h>
13229#include <netdb.h>
13230#include <string.h>
13231#include <sys/socket.h>
13232#include <netinet/in.h>
13233
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013234int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013235{
13236 int passive, gaierr, inet4 = 0, inet6 = 0;
13237 struct addrinfo hints, *ai, *aitop;
13238 char straddr[INET6_ADDRSTRLEN], strport[16];
13239
13240 for (passive = 0; passive <= 1; passive++) {
13241 memset(&hints, 0, sizeof(hints));
13242 hints.ai_family = AF_UNSPEC;
13243 hints.ai_flags = passive ? AI_PASSIVE : 0;
13244 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013245 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013246 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13247 (void)gai_strerror(gaierr);
13248 goto bad;
13249 }
13250 for (ai = aitop; ai; ai = ai->ai_next) {
13251 if (ai->ai_addr == NULL ||
13252 ai->ai_addrlen == 0 ||
13253 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13254 straddr, sizeof(straddr), strport, sizeof(strport),
13255 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13256 goto bad;
13257 }
13258 switch (ai->ai_family) {
13259 case AF_INET:
13260 if (strcmp(strport, "54321") != 0) {
13261 goto bad;
13262 }
13263 if (passive) {
13264 if (strcmp(straddr, "0.0.0.0") != 0) {
13265 goto bad;
13266 }
13267 } else {
13268 if (strcmp(straddr, "127.0.0.1") != 0) {
13269 goto bad;
13270 }
13271 }
13272 inet4++;
13273 break;
13274 case AF_INET6:
13275 if (strcmp(strport, "54321") != 0) {
13276 goto bad;
13277 }
13278 if (passive) {
13279 if (strcmp(straddr, "::") != 0) {
13280 goto bad;
13281 }
13282 } else {
13283 if (strcmp(straddr, "::1") != 0) {
13284 goto bad;
13285 }
13286 }
13287 inet6++;
13288 break;
13289 case AF_UNSPEC:
13290 goto bad;
13291 break;
13292 default:
13293 /* another family support? */
13294 break;
13295 }
13296 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013297 freeaddrinfo(aitop);
13298 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013299 }
13300
13301 if (!(inet4 == 0 || inet4 == 2))
13302 goto bad;
13303 if (!(inet6 == 0 || inet6 == 2))
13304 goto bad;
13305
13306 if (aitop)
13307 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013308 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013309
13310 bad:
13311 if (aitop)
13312 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013313 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013314}
13315
Martin v. Löwis11437992002-04-12 09:54:03 +000013316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013317if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013318 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013319else
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13323 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013325
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013326fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013327
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013329
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13331$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13332
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013333if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334then
13335 if test $ipv6 = yes
13336 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013337 echo 'Fatal: You must get working getaddrinfo() function.'
13338 echo ' or you can specify "--disable-ipv6"'.
13339 exit 1
13340 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013341else
Martin v. Löwis11437992002-04-12 09:54:03 +000013342
Matthias Kloseb9621712010-04-24 17:59:49 +000013343$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013344
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013345fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013346
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013347for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013348do :
13349 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013350if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013352#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013353_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013354
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013355fi
13356done
13357
Michael W. Hudson54241132001-12-07 15:38:26 +000013358
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013359# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13361$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013362if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013366/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013367#include <sys/types.h>
13368#include <sys/time.h>
13369#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013370
Martin v. Löwis11437992002-04-12 09:54:03 +000013371int
13372main ()
13373{
13374if ((struct tm *) 0)
13375return 0;
13376 ;
13377 return 0;
13378}
13379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013381 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013382else
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13388$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013389if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013392
13393fi
13394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13396$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013397if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013399else
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013401/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013402#include <sys/types.h>
13403#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013404
Martin v. Löwis11437992002-04-12 09:54:03 +000013405int
13406main ()
13407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408struct tm tm;
13409 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 ;
13412 return 0;
13413}
13414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013415if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013416 ac_cv_struct_tm=time.h
13417else
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13423$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013424if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013427
13428fi
13429
Matthias Kloseb9621712010-04-24 17:59:49 +000013430ac_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 +000013431#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433"
Victor Stinnere0be4232011-10-25 13:06:09 +020013434if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013435
13436cat >>confdefs.h <<_ACEOF
13437#define HAVE_STRUCT_TM_TM_ZONE 1
13438_ACEOF
13439
13440
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013441fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013442
Martin v. Löwis11437992002-04-12 09:54:03 +000013443if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013446
13447else
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13449"
Victor Stinnere0be4232011-10-25 13:06:09 +020013450if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452else
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454fi
13455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013456cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013457#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013458_ACEOF
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13461$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013462if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013463 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013464else
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013466/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013467#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013468#if !HAVE_DECL_TZNAME
13469extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
Martin v. Löwis11437992002-04-12 09:54:03 +000013472int
13473main ()
13474{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013475return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013476 ;
13477 return 0;
13478}
13479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013480if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013481 ac_cv_var_tzname=yes
13482else
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013485rm -f core conftest.err conftest.$ac_objext \
13486 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13489$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013490 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013493
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013494 fi
13495fi
13496
Matthias Kloseb9621712010-04-24 17:59:49 +000013497ac_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 +020013498if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013499
13500cat >>confdefs.h <<_ACEOF
13501#define HAVE_STRUCT_STAT_ST_RDEV 1
13502_ACEOF
13503
13504
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013505fi
13506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507ac_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 +020013508if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013509
Martin v. Löwis11437992002-04-12 09:54:03 +000013510cat >>confdefs.h <<_ACEOF
13511#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13512_ACEOF
13513
13514
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013515fi
13516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517ac_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 +020013518if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013519
13520cat >>confdefs.h <<_ACEOF
13521#define HAVE_STRUCT_STAT_ST_FLAGS 1
13522_ACEOF
13523
13524
13525fi
13526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527ac_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 +020013528if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013529
13530cat >>confdefs.h <<_ACEOF
13531#define HAVE_STRUCT_STAT_ST_GEN 1
13532_ACEOF
13533
13534
13535fi
13536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537ac_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 +020013538if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013539
13540cat >>confdefs.h <<_ACEOF
13541#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13542_ACEOF
13543
13544
13545fi
13546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547ac_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 +020013548if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013549
Martin v. Löwis11437992002-04-12 09:54:03 +000013550cat >>confdefs.h <<_ACEOF
13551#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13552_ACEOF
13553
13554
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013555fi
13556
Stefan Krah267b6392016-04-26 01:09:18 +020013557ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13558 #include <sys/types.h>
13559 #include <pwd.h>
13560
13561"
13562if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13563
13564cat >>confdefs.h <<_ACEOF
13565#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13566_ACEOF
13567
13568
13569fi
13570ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13571 #include <sys/types.h>
13572 #include <pwd.h>
13573
13574"
13575if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13576
13577cat >>confdefs.h <<_ACEOF
13578#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13579_ACEOF
13580
13581
13582fi
13583
Zachary Ware6a6967e2016-10-01 00:47:27 -050013584# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13585ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13586"
13587if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13588
13589cat >>confdefs.h <<_ACEOF
13590#define HAVE_SIGINFO_T_SI_BAND 1
13591_ACEOF
13592
13593
13594fi
13595
Michael W. Hudson54241132001-12-07 15:38:26 +000013596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13598$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013599if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013601else
Matthias Kloseb159a552010-04-25 21:00:44 +000013602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013604/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013605#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013606int
13607main ()
13608{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013609return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013610 ;
13611 return 0;
13612}
13613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013614if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013615 ac_cv_header_time_altzone=yes
13616else
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013621fi
13622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13624$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013625if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013628
13629fi
13630
Guido van Rossumda88dad1995-01-26 00:46:29 +000013631was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13633$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013635/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013636
13637#include <sys/types.h>
13638#include <sys/select.h>
13639#include <sys/time.h>
13640
Martin v. Löwis11437992002-04-12 09:54:03 +000013641int
13642main ()
13643{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013644;
Martin v. Löwis11437992002-04-12 09:54:03 +000013645 ;
13646 return 0;
13647}
13648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013649if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013650
13651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013653
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013654 was_it_defined=yes
13655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13659$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13662$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013663if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013667/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013668#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013669int
13670main ()
13671{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013672struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013673 ;
13674 return 0;
13675}
13676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013678 ac_cv_struct_addrinfo=yes
13679else
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13683fi
13684
Matthias Kloseb9621712010-04-24 17:59:49 +000013685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13686$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013687if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013690
13691fi
13692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13694$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013695if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013697else
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013699/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013700
13701# include <sys/types.h>
13702# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013703int
13704main ()
13705{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013706struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 ;
13708 return 0;
13709}
13710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013712 ac_cv_struct_sockaddr_storage=yes
13713else
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13717fi
13718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13720$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013721if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013724
13725fi
13726
Christian Heimesdffa3942016-09-05 23:54:41 +020013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13728$as_echo_n "checking for sockaddr_alg... " >&6; }
13729if ${ac_cv_struct_sockaddr_alg+:} false; then :
13730 $as_echo_n "(cached) " >&6
13731else
13732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13733/* end confdefs.h. */
13734
13735# include <sys/types.h>
13736# include <sys/socket.h>
13737# include <linux/if_alg.h>
13738int
13739main ()
13740{
13741struct sockaddr_alg s
13742 ;
13743 return 0;
13744}
13745_ACEOF
13746if ac_fn_c_try_compile "$LINENO"; then :
13747 ac_cv_struct_sockaddr_alg=yes
13748else
13749 ac_cv_struct_sockaddr_alg=no
13750fi
13751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13752fi
13753
13754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13755$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13756if test $ac_cv_struct_sockaddr_alg = yes; then
13757
13758$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13759
13760fi
13761
Guido van Rossum627b2d71993-12-24 10:39:16 +000013762# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13765$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013766if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013768else
Matthias Kloseb9621712010-04-24 17:59:49 +000013769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013771$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013772int
13773main ()
13774{
13775static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013776test_array [0] = 0;
13777return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013778
13779 ;
13780 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013781}
Martin v. Löwis11437992002-04-12 09:54:03 +000013782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013783if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013784 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013785else
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13791$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013792if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013793 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013794
13795fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013796
Matthias Kloseb9621712010-04-24 17:59:49 +000013797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13798$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013799if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013801else
Matthias Kloseb9621712010-04-24 17:59:49 +000013802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013803/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013804
Martin v. Löwis11437992002-04-12 09:54:03 +000013805int
13806main ()
13807{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013808
Martin v. Löwis11437992002-04-12 09:54:03 +000013809#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013810 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013812 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013814 char const *const *pcpcc;
13815 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 /* NEC SVR4.0.2 mips cc rejects this. */
13817 struct point {int x, y;};
13818 static struct point const zero = {0,0};
13819 /* AIX XL C 1.02.0.0 rejects this.
13820 It does not let you subtract one const X* pointer from another in
13821 an arm of an if-expression whose if-part is not a constant
13822 expression */
13823 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013826 ++pcpcc;
13827 ppc = (char**) pcpcc;
13828 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013829 { /* SCO 3.2v4 cc rejects this sort of thing. */
13830 char tx;
13831 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013833
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 }
13837 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13838 int x[] = {25, 17};
13839 const int *foo = &x[0];
13840 ++foo;
13841 }
13842 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13843 typedef const int *iptr;
13844 iptr p = 0;
13845 ++p;
13846 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013847 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013848 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013849 struct s { int j; const int *ap[3]; } bx;
13850 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 }
13852 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13853 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013854 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013855 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013856 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013857#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013858
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 ;
13860 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013861}
Martin v. Löwis11437992002-04-12 09:54:03 +000013862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013863if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013864 ac_cv_c_const=yes
13865else
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13871$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013872if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013875
13876fi
13877
Michael W. Hudson54241132001-12-07 15:38:26 +000013878
Guido van Rossumda88dad1995-01-26 00:46:29 +000013879works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13881$as_echo_n "checking for working signed char... " >&6; }
13882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013883/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013884
Martin v. Löwis11437992002-04-12 09:54:03 +000013885int
13886main ()
13887{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013888signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 ;
13890 return 0;
13891}
13892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013893if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013894 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013895else
Skip Montanaro6dead952003-09-25 14:50:04 +000013896
Matthias Kloseb9621712010-04-24 17:59:49 +000013897$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013898
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013899
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: $works" >&5
13903$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013904
Guido van Rossumda88dad1995-01-26 00:46:29 +000013905have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13907$as_echo_n "checking for prototypes... " >&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 +000013910int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013911int
13912main ()
13913{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013914return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 ;
13916 return 0;
13917}
13918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013919if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013920
Matthias Kloseb9621712010-04-24 17:59:49 +000013921$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013922
Matthias Kloseb159a552010-04-25 21:00:44 +000013923 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13927$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013928
Guido van Rossumda88dad1995-01-26 00:46:29 +000013929works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13931$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013933/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013934
13935#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013936int foo(int x, ...) {
13937 va_list va;
13938 va_start(va, x);
13939 va_arg(va, int);
13940 va_arg(va, char *);
13941 va_arg(va, double);
13942 return 0;
13943}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013944
Martin v. Löwis11437992002-04-12 09:54:03 +000013945int
13946main ()
13947{
Guido van Rossum90eea071996-08-30 20:58:57 +000013948return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 ;
13950 return 0;
13951}
13952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013953if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013954
13955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013957
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013958 works=yes
13959
Guido van Rossum627b2d71993-12-24 10:39:16 +000013960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13963$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013964
Martin v. Löwisd6320502004-08-12 13:45:08 +000013965# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13967$as_echo_n "checking for socketpair... " >&6; }
13968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013969/* end confdefs.h. */
13970
13971#include <sys/types.h>
13972#include <sys/socket.h>
13973
13974int
13975main ()
13976{
13977void *x=socketpair
13978 ;
13979 return 0;
13980}
13981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013982if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013983
Matthias Kloseb9621712010-04-24 17:59:49 +000013984$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013985
Matthias Kloseb159a552010-04-25 21:00:44 +000013986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013987$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013988else
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13990$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013991
13992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013994
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013995# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13997$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013999/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014000#include <sys/types.h>
14001#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014002int
14003main ()
14004{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014005struct sockaddr x;
14006x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 ;
14008 return 0;
14009}
14010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014011if ac_fn_c_try_compile "$LINENO"; then :
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14013$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014016
14017else
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14019$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014020
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014023
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014024# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014025
14026
Matthias Kloseb9621712010-04-24 17:59:49 +000014027ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014028if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014031
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14033$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014034 OLD_CFLAGS=$CFLAGS
14035 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014037/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014038
14039# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014040
Martin v. Löwis11437992002-04-12 09:54:03 +000014041int
14042main ()
14043{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014044
14045 char *name;
14046 struct hostent *he, *res;
14047 char buffer[2048];
14048 int buflen = 2048;
14049 int h_errnop;
14050
14051 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014052
14053 ;
14054 return 0;
14055}
14056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014058
Matthias Kloseb9621712010-04-24 17:59:49 +000014059 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014060
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
Matthias Kloseb9621712010-04-24 17:59:49 +000014062$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14065$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014066
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014067else
Skip Montanaro6dead952003-09-25 14:50:04 +000014068
Matthias Kloseb9621712010-04-24 17:59:49 +000014069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14070$as_echo "no" >&6; }
14071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14072$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014074/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014075
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014076# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014077
Martin v. Löwis11437992002-04-12 09:54:03 +000014078int
14079main ()
14080{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014081
14082 char *name;
14083 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014084 char buffer[2048];
14085 int buflen = 2048;
14086 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014087
Matthias Kloseb159a552010-04-25 21:00:44 +000014088 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014089
14090 ;
14091 return 0;
14092}
14093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014094if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014095
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014097
Martin v. Löwis11437992002-04-12 09:54:03 +000014098
Matthias Kloseb159a552010-04-25 21:00:44 +000014099$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014100
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14102$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014104else
Skip Montanaro6dead952003-09-25 14:50:04 +000014105
Matthias Kloseb9621712010-04-24 17:59:49 +000014106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14107$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14109$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14111/* end confdefs.h. */
14112
14113# include <netdb.h>
14114
14115int
14116main ()
14117{
14118
14119 char *name;
14120 struct hostent *he;
14121 struct hostent_data data;
14122
14123 (void) gethostbyname_r(name, he, &data);
14124
14125 ;
14126 return 0;
14127}
14128_ACEOF
14129if ac_fn_c_try_compile "$LINENO"; then :
14130
14131 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14132
14133
14134$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14135
14136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14137$as_echo "yes" >&6; }
14138
14139else
14140
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14142$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014143
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014146
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014149
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014152 CFLAGS=$OLD_CFLAGS
14153
14154else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014155
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 for ac_func in gethostbyname
14157do :
14158 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014159if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014161#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014162_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014163
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014164fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014165done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014166
Michael W. Hudson54241132001-12-07 15:38:26 +000014167
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014168fi
14169
Michael W. Hudson54241132001-12-07 15:38:26 +000014170
14171
14172
14173
14174
14175
Guido van Rossum627b2d71993-12-24 10:39:16 +000014176# checks for system services
14177# (none yet)
14178
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014179# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014180ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014181if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014182
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014183else
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14185$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014186if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014188else
Martin v. Löwis11437992002-04-12 09:54:03 +000014189 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014190LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014194/* Override any GCC internal prototype to avoid an error.
14195 Use char because int might match the return type of a GCC
14196 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014197#ifdef __cplusplus
14198extern "C"
14199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014200char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014201int
14202main ()
14203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014204return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014205 ;
14206 return 0;
14207}
14208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014209if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014210 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014211else
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014214rm -f core conftest.err conftest.$ac_objext \
14215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014216LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14219$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014220if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014221 cat >>confdefs.h <<_ACEOF
14222#define HAVE_LIBIEEE 1
14223_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014224
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014225 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014226
Guido van Rossum627b2d71993-12-24 10:39:16 +000014227fi
14228
Michael W. Hudson54241132001-12-07 15:38:26 +000014229
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014230fi
14231
Michael W. Hudson54241132001-12-07 15:38:26 +000014232
Guido van Rossum7f43da71994-08-01 12:15:30 +000014233# check for --with-libm=...
14234
Guido van Rossum563e7081996-09-10 18:20:48 +000014235case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014236Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014237*) LIBM=-lm
14238esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14240$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014243if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014245if test "$withval" = no
14246then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14248$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014249elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014250then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14252$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014253else as_fn_error $? "proper usage is --with-libm=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 LIBM=\"$LIBM\"" >&5
14257$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258fi
14259
Guido van Rossum7f43da71994-08-01 12:15:30 +000014260
14261# check for --with-libc=...
14262
Matthias Kloseb9621712010-04-24 17:59:49 +000014263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14264$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014267if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014269if test "$withval" = no
14270then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14272$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014273elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014274then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14276$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014277else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014278fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014279else
Matthias Kloseb9621712010-04-24 17:59:49 +000014280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14281$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282fi
14283
Guido van Rossum7f43da71994-08-01 12:15:30 +000014284
Stefan Krah1919b7e2012-03-21 18:25:23 +010014285# **************************************
14286# * Check for gcc x64 inline assembler *
14287# **************************************
14288
14289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14290$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14292/* end confdefs.h. */
14293
14294int
14295main ()
14296{
14297
14298 __asm__ __volatile__ ("movq %rcx, %rax");
14299
14300 ;
14301 return 0;
14302}
14303_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014304if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014305 have_gcc_asm_for_x64=yes
14306else
14307 have_gcc_asm_for_x64=no
14308fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014309rm -f core conftest.err conftest.$ac_objext \
14310 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14312$as_echo "$have_gcc_asm_for_x64" >&6; }
14313if test "$have_gcc_asm_for_x64" = yes
14314then
14315
14316$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14317
14318fi
14319
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014320# **************************************************
14321# * Check for various properties of floating point *
14322# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014323
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14325$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14326if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014328else
14329
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014330
14331ax_cv_c_float_words_bigendian=unknown
14332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014333/* end confdefs.h. */
14334
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014335
14336double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14337
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014338
14339_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014340if ac_fn_c_try_compile "$LINENO"; then :
14341
14342
14343if grep noonsees conftest.$ac_objext >/dev/null ; then
14344 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014345fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014346if grep seesnoon conftest.$ac_objext >/dev/null ; then
14347 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14348 ax_cv_c_float_words_bigendian=no
14349 else
14350 ax_cv_c_float_words_bigendian=unknown
14351 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014352fi
14353
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014354
14355fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014357fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14359$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014360
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014361case $ax_cv_c_float_words_bigendian in
14362 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014363
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014364$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14365 ;;
14366 no)
14367 ;;
14368 *)
14369 as_fn_error $? "
14370
14371Unknown float word ordering. You need to manually preset
14372ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14373
14374 " "$LINENO" 5 ;;
14375esac
14376
14377
14378if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014379then
14380
Matthias Kloseb9621712010-04-24 17:59:49 +000014381$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014382
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014383elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014384then
14385
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014386$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14387
14388else
14389 # Some ARM platforms use a mixed-endian representation for doubles.
14390 # While Python doesn't currently have full support for these platforms
14391 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14392 # conversions work.
14393 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14394 # or little, then it must be this?
14395
Matthias Kloseb9621712010-04-24 17:59:49 +000014396$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014397
14398fi
14399
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014400# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014401# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014402# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014403# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014404# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014405# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014406
14407# This inline assembler syntax may also work for suncc and icc,
14408# so we try it on all platforms.
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14411$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014413/* end confdefs.h. */
14414
14415int
14416main ()
14417{
14418
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014419 unsigned short cw;
14420 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14421 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014422
14423 ;
14424 return 0;
14425}
14426_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014427if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014428 have_gcc_asm_for_x87=yes
14429else
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014431fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014432rm -f core conftest.err conftest.$ac_objext \
14433 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14435$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014436if test "$have_gcc_asm_for_x87" = yes
14437then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014438
Matthias Kloseb9621712010-04-24 17:59:49 +000014439$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014440
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014442
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14444$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14446/* end confdefs.h. */
14447
14448int
14449main ()
14450{
14451
14452 unsigned int fpcr;
14453 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14454 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14455
14456 ;
14457 return 0;
14458}
14459_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014460if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014461 have_gcc_asm_for_mc68881=yes
14462else
14463 have_gcc_asm_for_mc68881=no
14464fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014465rm -f core conftest.err conftest.$ac_objext \
14466 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14468$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14469if test "$have_gcc_asm_for_mc68881" = yes
14470then
14471
14472$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14473
14474fi
14475
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014476# Detect whether system arithmetic is subject to x87-style double
14477# rounding issues. The result of this test has little meaning on non
14478# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14479# mode is round-to-nearest and double rounding issues are present, and
14480# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14482$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014483# $BASECFLAGS may affect the result
14484ac_save_cc="$CC"
14485CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014486if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014487 ac_cv_x87_double_rounding=no
14488else
Matthias Kloseb9621712010-04-24 17:59:49 +000014489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014490/* end confdefs.h. */
14491
14492#include <stdlib.h>
14493#include <math.h>
14494int main() {
14495 volatile double x, y, z;
14496 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14497 x = 0.99999999999999989; /* 1-2**-53 */
14498 y = 1./x;
14499 if (y != 1.)
14500 exit(0);
14501 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14502 x = 1e16;
14503 y = 2.99999;
14504 z = x + y;
14505 if (z != 1e16+4.)
14506 exit(0);
14507 /* both tests show evidence of double rounding */
14508 exit(1);
14509}
14510
14511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014512if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014513 ac_cv_x87_double_rounding=no
14514else
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14518 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014519fi
14520
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014521CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14523$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014524if test "$ac_cv_x87_double_rounding" = yes
14525then
14526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014528
14529fi
14530
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014531# ************************************
14532# * Check for mathematical functions *
14533# ************************************
14534
14535LIBS_SAVE=$LIBS
14536LIBS="$LIBS $LIBM"
14537
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014538for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14539do :
14540 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14541ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014542if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014543 cat >>confdefs.h <<_ACEOF
14544#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14545_ACEOF
14546
14547fi
14548done
14549
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014550for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014551do :
14552 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14553ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014554if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014555 cat >>confdefs.h <<_ACEOF
14556#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14557_ACEOF
14558
14559fi
14560done
14561
14562ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14563"
Victor Stinnere0be4232011-10-25 13:06:09 +020014564if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014565 ac_have_decl=1
14566else
14567 ac_have_decl=0
14568fi
14569
14570cat >>confdefs.h <<_ACEOF
14571#define HAVE_DECL_ISINF $ac_have_decl
14572_ACEOF
14573ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14574"
Victor Stinnere0be4232011-10-25 13:06:09 +020014575if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014576 ac_have_decl=1
14577else
14578 ac_have_decl=0
14579fi
14580
14581cat >>confdefs.h <<_ACEOF
14582#define HAVE_DECL_ISNAN $ac_have_decl
14583_ACEOF
14584ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14585"
Victor Stinnere0be4232011-10-25 13:06:09 +020014586if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014587 ac_have_decl=1
14588else
14589 ac_have_decl=0
14590fi
14591
14592cat >>confdefs.h <<_ACEOF
14593#define HAVE_DECL_ISFINITE $ac_have_decl
14594_ACEOF
14595
14596
Mark Dickinsona614f042009-11-28 12:48:43 +000014597# For multiprocessing module, check that sem_open
14598# actually works. For FreeBSD versions <= 7.2,
14599# the kernel module that provides POSIX semaphores
14600# isn't loaded by default, so an attempt to call
14601# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14603$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014604if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014606else
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014608 ac_cv_posix_semaphores_enabled=yes
14609else
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014611/* end confdefs.h. */
14612
14613#include <unistd.h>
14614#include <fcntl.h>
14615#include <stdio.h>
14616#include <semaphore.h>
14617#include <sys/stat.h>
14618
14619int main(void) {
14620 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14621 if (a == SEM_FAILED) {
14622 perror("sem_open");
14623 return 1;
14624 }
14625 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014626 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014627 return 0;
14628}
14629
14630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014631if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014632 ac_cv_posix_semaphores_enabled=yes
14633else
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14637 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014638fi
14639
14640
Mark Dickinsona614f042009-11-28 12:48:43 +000014641fi
14642
Matthias Kloseb9621712010-04-24 17:59:49 +000014643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14644$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014645if test $ac_cv_posix_semaphores_enabled = no
14646then
14647
Matthias Kloseb9621712010-04-24 17:59:49 +000014648$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014649
14650fi
14651
Mark Dickinson10683072009-04-18 21:18:19 +000014652# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14654$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014655if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014656 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014657else
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014659 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014660else
Matthias Kloseb9621712010-04-24 17:59:49 +000014661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014662/* end confdefs.h. */
14663
14664#include <unistd.h>
14665#include <fcntl.h>
14666#include <stdio.h>
14667#include <semaphore.h>
14668#include <sys/stat.h>
14669
14670int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014671 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014672 int count;
14673 int res;
14674 if(a==SEM_FAILED){
14675 perror("sem_open");
14676 return 1;
14677
14678 }
14679 res = sem_getvalue(a, &count);
14680 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014681 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014682 return res==-1 ? 1 : 0;
14683}
14684
Mark Dickinson10683072009-04-18 21:18:19 +000014685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014686if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014687 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014688else
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014693fi
14694
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014695
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014696fi
14697
Matthias Kloseb9621712010-04-24 17:59:49 +000014698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14699$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014700if test $ac_cv_broken_sem_getvalue = yes
14701then
14702
Matthias Kloseb9621712010-04-24 17:59:49 +000014703$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014704
14705fi
14706
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014707ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14708"
14709if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14710 ac_have_decl=1
14711else
14712 ac_have_decl=0
14713fi
14714
14715cat >>confdefs.h <<_ACEOF
14716#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14717_ACEOF
14718ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14719"
14720if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14721 ac_have_decl=1
14722else
14723 ac_have_decl=0
14724fi
14725
14726cat >>confdefs.h <<_ACEOF
14727#define HAVE_DECL_RTLD_NOW $ac_have_decl
14728_ACEOF
14729ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14730"
14731if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14732 ac_have_decl=1
14733else
14734 ac_have_decl=0
14735fi
14736
14737cat >>confdefs.h <<_ACEOF
14738#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14739_ACEOF
14740ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14741"
14742if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14743 ac_have_decl=1
14744else
14745 ac_have_decl=0
14746fi
14747
14748cat >>confdefs.h <<_ACEOF
14749#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14750_ACEOF
14751ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14752"
14753if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14754 ac_have_decl=1
14755else
14756 ac_have_decl=0
14757fi
14758
14759cat >>confdefs.h <<_ACEOF
14760#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14761_ACEOF
14762ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14763"
14764if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14765 ac_have_decl=1
14766else
14767 ac_have_decl=0
14768fi
14769
14770cat >>confdefs.h <<_ACEOF
14771#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14772_ACEOF
14773ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14774"
14775if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14776 ac_have_decl=1
14777else
14778 ac_have_decl=0
14779fi
14780
14781cat >>confdefs.h <<_ACEOF
14782#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14783_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014784ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14785"
14786if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14787 ac_have_decl=1
14788else
14789 ac_have_decl=0
14790fi
14791
14792cat >>confdefs.h <<_ACEOF
14793#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14794_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014795
14796
Mark Dickinsonbd792642009-03-18 20:06:12 +000014797# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14799$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014800# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014801if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014802 enableval=$enable_big_digits; case $enable_big_digits in
14803yes)
14804 enable_big_digits=30 ;;
14805no)
14806 enable_big_digits=15 ;;
1480715|30)
14808 ;;
14809*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014810 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 +000014811esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14813$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014814
14815cat >>confdefs.h <<_ACEOF
14816#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14817_ACEOF
14818
14819
14820else
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14822$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014823fi
14824
14825
Guido van Rossumef2255b2000-03-10 22:30:29 +000014826# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014827ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014828if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014829
14830
Matthias Kloseb9621712010-04-24 17:59:49 +000014831$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014833 wchar_h="yes"
14834
Guido van Rossumef2255b2000-03-10 22:30:29 +000014835else
Martin v. Löwis11437992002-04-12 09:54:03 +000014836 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014837
14838fi
14839
Michael W. Hudson54241132001-12-07 15:38:26 +000014840
Martin v. Löwis11437992002-04-12 09:54:03 +000014841
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014842# determine wchar_t size
14843if test "$wchar_h" = yes
14844then
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014846# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14847# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14848# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14850$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014851if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014853else
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14855"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014856
Martin v. Löwis11437992002-04-12 09:54:03 +000014857else
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 if test "$ac_cv_type_wchar_t" = yes; then
14859 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014861as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014862See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863 else
14864 ac_cv_sizeof_wchar_t=0
14865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014867
Martin v. Löwis11437992002-04-12 09:54:03 +000014868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14870$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871
14872
14873
Martin v. Löwis11437992002-04-12 09:54:03 +000014874cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014875#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014876_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014877
Michael W. Hudson54241132001-12-07 15:38:26 +000014878
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014879fi
14880
Matthias Kloseb9621712010-04-24 17:59:49 +000014881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14882$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014883have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014885/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014886
14887#include <tcl.h>
14888#if TCL_UTF_MAX != 6
14889# error "NOT UCS4_TCL"
14890#endif
14891int
14892main ()
14893{
14894
14895 ;
14896 return 0;
14897}
14898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014899if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014900
14901
Matthias Kloseb9621712010-04-24 17:59:49 +000014902$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014903
14904 have_ucs4_tcl=yes
14905
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14909$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014910
Skip Montanaro6dead952003-09-25 14:50:04 +000014911# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014912if test "$wchar_h" = yes
14913then
14914 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14916$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014917 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014919else
14920
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014922 ac_cv_wchar_t_signed=yes
14923else
Matthias Kloseb9621712010-04-24 17:59:49 +000014924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014925/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014926
14927 #include <wchar.h>
14928 int main()
14929 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014930 /* Success: exit code 0 */
14931 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014932 }
14933
14934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014935if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014936 ac_cv_wchar_t_signed=yes
14937else
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14941 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014942fi
14943
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014944fi
14945
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14947$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948fi
14949
Michael Osipov3738fad2018-08-24 18:17:19 +020014950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14951$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014952# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014953if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014954 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014955then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014956
Matthias Kloseb9621712010-04-24 17:59:49 +000014957$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014958
Michael Osipov3738fad2018-08-24 18:17:19 +020014959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14960$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014961else
Michael Osipov3738fad2018-08-24 18:17:19 +020014962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14963$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014964fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014965
14966# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14968$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014969if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014970 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014971else
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 ac_cv_c_bigendian=unknown
14973 # See if we're dealing with a universal compiler.
14974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14975/* end confdefs.h. */
14976#ifndef __APPLE_CC__
14977 not a universal capable compiler
14978 #endif
14979 typedef int dummy;
14980
Skip Montanaro6dead952003-09-25 14:50:04 +000014981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014982if ac_fn_c_try_compile "$LINENO"; then :
14983
14984 # Check for potential -arch flags. It is not universal unless
14985 # there are at least two -arch flags with different values.
14986 ac_arch=
14987 ac_prev=
14988 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14989 if test -n "$ac_prev"; then
14990 case $ac_word in
14991 i?86 | x86_64 | ppc | ppc64)
14992 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14993 ac_arch=$ac_word
14994 else
14995 ac_cv_c_bigendian=universal
14996 break
14997 fi
14998 ;;
14999 esac
15000 ac_prev=
15001 elif test "x$ac_word" = "x-arch"; then
15002 ac_prev=arch
15003 fi
15004 done
15005fi
15006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15007 if test $ac_cv_c_bigendian = unknown; then
15008 # See if sys/param.h defines the BYTE_ORDER macro.
15009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015010/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015011#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015013
Martin v. Löwis11437992002-04-12 09:54:03 +000015014int
15015main ()
15016{
Matthias Kloseb9621712010-04-24 17:59:49 +000015017#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15018 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15019 && LITTLE_ENDIAN)
15020 bogus endian macros
15021 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015022
15023 ;
15024 return 0;
15025}
15026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015027if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015028 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015030/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015031#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015032 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015033
Martin v. Löwis11437992002-04-12 09:54:03 +000015034int
15035main ()
15036{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015037#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 not big endian
15039 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015040
15041 ;
15042 return 0;
15043}
15044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015045if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015046 ac_cv_c_bigendian=yes
15047else
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015051fi
15052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15053 fi
15054 if test $ac_cv_c_bigendian = unknown; then
15055 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015057/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015058#include <limits.h>
15059
Martin v. Löwis11437992002-04-12 09:54:03 +000015060int
15061main ()
15062{
Matthias Kloseb9621712010-04-24 17:59:49 +000015063#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15064 bogus endian macros
15065 #endif
15066
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 ;
15068 return 0;
15069}
15070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015071if ac_fn_c_try_compile "$LINENO"; then :
15072 # It does; now see whether it defined to _BIG_ENDIAN or not.
15073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15074/* end confdefs.h. */
15075#include <limits.h>
15076
15077int
15078main ()
15079{
15080#ifndef _BIG_ENDIAN
15081 not big endian
15082 #endif
15083
15084 ;
15085 return 0;
15086}
15087_ACEOF
15088if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015090else
Matthias Kloseb9621712010-04-24 17:59:49 +000015091 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15094fi
15095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15096 fi
15097 if test $ac_cv_c_bigendian = unknown; then
15098 # Compile a test program.
15099 if test "$cross_compiling" = yes; then :
15100 # Try to guess by grepping values from an object file.
15101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15102/* end confdefs.h. */
15103short int ascii_mm[] =
15104 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15105 short int ascii_ii[] =
15106 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15107 int use_ascii (int i) {
15108 return ascii_mm[i] + ascii_ii[i];
15109 }
15110 short int ebcdic_ii[] =
15111 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15112 short int ebcdic_mm[] =
15113 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15114 int use_ebcdic (int i) {
15115 return ebcdic_mm[i] + ebcdic_ii[i];
15116 }
15117 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015118
Matthias Kloseb9621712010-04-24 17:59:49 +000015119int
15120main ()
15121{
15122return use_ascii (foo) == use_ebcdic (foo);
15123 ;
15124 return 0;
15125}
15126_ACEOF
15127if ac_fn_c_try_compile "$LINENO"; then :
15128 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15129 ac_cv_c_bigendian=yes
15130 fi
15131 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15132 if test "$ac_cv_c_bigendian" = unknown; then
15133 ac_cv_c_bigendian=no
15134 else
15135 # finding both strings is unlikely to happen, but who knows?
15136 ac_cv_c_bigendian=unknown
15137 fi
15138 fi
15139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015141else
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015143/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015145int
15146main ()
15147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149 /* Are we little or big endian? From Harbison&Steele. */
15150 union
15151 {
15152 long int l;
15153 char c[sizeof (long int)];
15154 } u;
15155 u.l = 1;
15156 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157
15158 ;
15159 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015160}
Martin v. Löwis11437992002-04-12 09:54:03 +000015161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015162if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015163 ac_cv_c_bigendian=no
15164else
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15168 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15174$as_echo "$ac_cv_c_bigendian" >&6; }
15175 case $ac_cv_c_bigendian in #(
15176 yes)
15177 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15178;; #(
15179 no)
15180 ;; #(
15181 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015182
Matthias Kloseb9621712010-04-24 17:59:49 +000015183$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015184
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 ;; #(
15186 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015187 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015188 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015190
Michael W. Hudson54241132001-12-07 15:38:26 +000015191
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015192# ABI version string for Python extension modules. This appears between the
15193# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15194# from the following attributes which affect the ABI of this Python build (in
15195# this order):
15196#
15197# * The Python implementation (always 'cpython-' for us)
15198# * The major and minor version numbers
15199# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015200#
15201# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015202# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15203# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015204#
15205# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15206# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015207
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15209$as_echo_n "checking ABIFLAGS... " >&6; }
15210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15211$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15213$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015214SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15216$as_echo "$SOABI" >&6; }
15217
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015218# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15219if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015220 # Similar to SOABI but remove "d" flag from ABIFLAGS
15221
15222 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15223
15224cat >>confdefs.h <<_ACEOF
15225#define ALT_SOABI "${ALT_SOABI}"
15226_ACEOF
15227
15228fi
15229
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015230
15231case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015232 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015233 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15234 *)
15235 EXT_SUFFIX=${SHLIB_SUFFIX};;
15236esac
15237
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15239$as_echo_n "checking LDVERSION... " >&6; }
15240LDVERSION='$(VERSION)$(ABIFLAGS)'
15241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15242$as_echo "$LDVERSION" >&6; }
15243
E. M. Brayc994c8f2019-05-24 17:33:47 +020015244# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015245
E. M. Brayb1fc4172019-05-24 18:39:39 +020015246if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015247 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015248else
15249 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015250fi
15251
doko@python.org87421192013-01-26 11:39:31 +010015252
Victor Stinner8510f432020-03-10 09:53:09 +010015253# Check for --with-libdir-name
15254# /usr/$LIDIRNAME/python$VERSION
15255
15256PLATLIBDIR="lib"
15257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15258$as_echo_n "checking for --with-platlibdir... " >&6; }
15259
15260# Check whether --with-platlibdir was given.
15261if test "${with_platlibdir+set}" = set; then :
15262 withval=$with_platlibdir;
15263# ignore 3 options:
15264# --with-platlibdir
15265# --with-platlibdir=
15266# --without-platlibdir
15267if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15268then
15269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15270$as_echo "yes" >&6; }
15271 PLATLIBDIR="$withval"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015272else
Victor Stinner8510f432020-03-10 09:53:09 +010015273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15274$as_echo "no" >&6; }
15275fi
15276else
15277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15278$as_echo "no" >&6; }
15279fi
15280
15281
15282
15283
15284if test x$PLATFORM_TRIPLET = x; then
15285 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15286else
15287 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015288fi
doko@python.org87421192013-01-26 11:39:31 +010015289
15290
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015291# Check whether right shifting a negative integer extends the sign bit
15292# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15294$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015295if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015296 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015297else
Martin v. Löwis11437992002-04-12 09:54:03 +000015298
Matthias Kloseb9621712010-04-24 17:59:49 +000015299if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015300 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015301else
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015303/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015304
15305int main()
15306{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015307 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015308}
15309
Martin v. Löwis11437992002-04-12 09:54:03 +000015310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015311if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015312 ac_cv_rshift_extends_sign=yes
15313else
Matthias Kloseb9621712010-04-24 17:59:49 +000015314 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015318fi
15319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015320fi
15321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15323$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015324if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015325then
Martin v. Löwis11437992002-04-12 09:54:03 +000015326
Matthias Kloseb9621712010-04-24 17:59:49 +000015327$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015328
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015329fi
15330
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015331# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15333$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015334if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015336else
Martin v. Löwis11437992002-04-12 09:54:03 +000015337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015339/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015340#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015341int
15342main ()
15343{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015344
15345 FILE *f = fopen("/dev/null", "r");
15346 flockfile(f);
15347 getc_unlocked(f);
15348 funlockfile(f);
15349
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 ;
15351 return 0;
15352}
15353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015354if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015355 ac_cv_have_getc_unlocked=yes
15356else
Matthias Kloseb9621712010-04-24 17:59:49 +000015357 ac_cv_have_getc_unlocked=no
15358fi
15359rm -f core conftest.err conftest.$ac_objext \
15360 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015362
Matthias Kloseb9621712010-04-24 17:59:49 +000015363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15364$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015365if test "$ac_cv_have_getc_unlocked" = yes
15366then
Martin v. Löwis11437992002-04-12 09:54:03 +000015367
Matthias Kloseb9621712010-04-24 17:59:49 +000015368$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015369
15370fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015371
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015372# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015373# save the value of LIBS so we don't actually link Python with readline
15374LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015375
Gregory P. Smith18820942008-09-07 06:24:49 +000015376# On some systems we need to link readline to a termcap compatible
15377# library. NOTE: Keep the precedence of listed libraries synchronised
15378# with setup.py.
15379py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15381$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015382for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015383 if test -z "$py_libtermcap"; then
15384 READLINE_LIBS="-lreadline"
15385 else
15386 READLINE_LIBS="-lreadline -l$py_libtermcap"
15387 fi
15388 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015390/* end confdefs.h. */
15391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392/* Override any GCC internal prototype to avoid an error.
15393 Use char because int might match the return type of a GCC
15394 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015395#ifdef __cplusplus
15396extern "C"
15397#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015398char readline ();
15399int
15400main ()
15401{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015403 ;
15404 return 0;
15405}
15406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015407if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015408 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015410rm -f core conftest.err conftest.$ac_objext \
15411 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015412 if test $py_cv_lib_readline = yes; then
15413 break
15414 fi
15415done
15416# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15417#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015418if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15420$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015421else
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15423$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015424
Matthias Kloseb9621712010-04-24 17:59:49 +000015425$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015426
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015427fi
15428
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015429# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015431/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015432#include <readline/readline.h>
15433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015434if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015435 have_readline=yes
15436else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015437 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015438
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015439fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015440rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015441if test $have_readline = yes
15442then
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015444/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015445#include <readline/readline.h>
15446
15447_ACEOF
15448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015449 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015450
Matthias Kloseb9621712010-04-24 17:59:49 +000015451$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015452
15453fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015454rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015455
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015457/* end confdefs.h. */
15458#include <readline/readline.h>
15459
15460_ACEOF
15461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015462 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015463
Matthias Kloseb9621712010-04-24 17:59:49 +000015464$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015465
15466fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015467rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015468
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015469fi
15470
Martin v. Löwis0daad592001-09-30 21:09:59 +000015471# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15473$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015474if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015476else
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015478LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482/* Override any GCC internal prototype to avoid an error.
15483 Use char because int might match the return type of a GCC
15484 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015485#ifdef __cplusplus
15486extern "C"
15487#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015488char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015489int
15490main ()
15491{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015492return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015493 ;
15494 return 0;
15495}
15496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015497if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015498 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015499else
Matthias Kloseb9621712010-04-24 17:59:49 +000015500 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015502rm -f core conftest.err conftest.$ac_objext \
15503 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015504LIBS=$ac_check_lib_save_LIBS
15505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15507$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015508if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015509
Matthias Kloseb9621712010-04-24 17:59:49 +000015510$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015511
Martin v. Löwis0daad592001-09-30 21:09:59 +000015512fi
15513
Michael W. Hudson54241132001-12-07 15:38:26 +000015514
Thomas Wouters89d996e2007-09-08 17:39:28 +000015515# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15517$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015518if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015519 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015520else
15521 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015522LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015524/* end confdefs.h. */
15525
15526/* Override any GCC internal prototype to avoid an error.
15527 Use char because int might match the return type of a GCC
15528 builtin and then its argument prototype would still apply. */
15529#ifdef __cplusplus
15530extern "C"
15531#endif
15532char rl_completion_display_matches_hook ();
15533int
15534main ()
15535{
15536return rl_completion_display_matches_hook ();
15537 ;
15538 return 0;
15539}
15540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015541if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015542 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15543else
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015546rm -f core conftest.err conftest.$ac_objext \
15547 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015548LIBS=$ac_check_lib_save_LIBS
15549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15551$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015552if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015553
Matthias Kloseb9621712010-04-24 17:59:49 +000015554$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015555
15556fi
15557
15558
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015559# also in 4.0, but not in editline
15560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15561$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15562if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15563 $as_echo_n "(cached) " >&6
15564else
15565 ac_check_lib_save_LIBS=$LIBS
15566LIBS="-lreadline $READLINE_LIBS $LIBS"
15567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15568/* end confdefs.h. */
15569
15570/* Override any GCC internal prototype to avoid an error.
15571 Use char because int might match the return type of a GCC
15572 builtin and then its argument prototype would still apply. */
15573#ifdef __cplusplus
15574extern "C"
15575#endif
15576char rl_resize_terminal ();
15577int
15578main ()
15579{
15580return rl_resize_terminal ();
15581 ;
15582 return 0;
15583}
15584_ACEOF
15585if ac_fn_c_try_link "$LINENO"; then :
15586 ac_cv_lib_readline_rl_resize_terminal=yes
15587else
15588 ac_cv_lib_readline_rl_resize_terminal=no
15589fi
15590rm -f core conftest.err conftest.$ac_objext \
15591 conftest$ac_exeext conftest.$ac_ext
15592LIBS=$ac_check_lib_save_LIBS
15593fi
15594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15595$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15596if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15597
15598$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15599
15600fi
15601
15602
Martin v. Löwis0daad592001-09-30 21:09:59 +000015603# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15605$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015606if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015607 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015608else
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015610LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614/* Override any GCC internal prototype to avoid an error.
15615 Use char because int might match the return type of a GCC
15616 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015617#ifdef __cplusplus
15618extern "C"
15619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015620char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015621int
15622main ()
15623{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015625 ;
15626 return 0;
15627}
15628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015629if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015631else
Matthias Kloseb9621712010-04-24 17:59:49 +000015632 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015634rm -f core conftest.err conftest.$ac_objext \
15635 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015636LIBS=$ac_check_lib_save_LIBS
15637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15639$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015640if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015641
Matthias Kloseb9621712010-04-24 17:59:49 +000015642$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015643
Guido van Rossum353ae582001-07-10 16:45:32 +000015644fi
15645
Jack Jansendd19cf82001-12-06 22:36:17 +000015646
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015647# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015649/* end confdefs.h. */
15650#include <readline/readline.h>
15651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015652if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015653 have_readline=yes
15654else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015655 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015656
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015657fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015658rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015659if test $have_readline = yes
15660then
Matthias Kloseb9621712010-04-24 17:59:49 +000015661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015662/* end confdefs.h. */
15663#include <readline/readline.h>
15664
15665_ACEOF
15666if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015668
Matthias Kloseb9621712010-04-24 17:59:49 +000015669$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015670
15671fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015672rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015673
15674fi
15675
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15677$as_echo_n "checking for append_history in -lreadline... " >&6; }
15678if ${ac_cv_lib_readline_append_history+:} false; then :
15679 $as_echo_n "(cached) " >&6
15680else
15681 ac_check_lib_save_LIBS=$LIBS
15682LIBS="-lreadline $READLINE_LIBS $LIBS"
15683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15684/* end confdefs.h. */
15685
15686/* Override any GCC internal prototype to avoid an error.
15687 Use char because int might match the return type of a GCC
15688 builtin and then its argument prototype would still apply. */
15689#ifdef __cplusplus
15690extern "C"
15691#endif
15692char append_history ();
15693int
15694main ()
15695{
15696return append_history ();
15697 ;
15698 return 0;
15699}
15700_ACEOF
15701if ac_fn_c_try_link "$LINENO"; then :
15702 ac_cv_lib_readline_append_history=yes
15703else
15704 ac_cv_lib_readline_append_history=no
15705fi
15706rm -f core conftest.err conftest.$ac_objext \
15707 conftest$ac_exeext conftest.$ac_ext
15708LIBS=$ac_check_lib_save_LIBS
15709fi
15710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15711$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15712if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15713
15714$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15715
15716fi
15717
15718
Martin v. Löwis82bca632006-02-10 20:49:30 +000015719# End of readline checks: restore LIBS
15720LIBS=$LIBS_no_readline
15721
Matthias Kloseb9621712010-04-24 17:59:49 +000015722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15723$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015724if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015725 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015726else
Martin v. Löwis11437992002-04-12 09:54:03 +000015727
Matthias Kloseb9621712010-04-24 17:59:49 +000015728if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015729 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015730else
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015732/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015733
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015734#include <stdlib.h>
15735#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015736int main()
15737{
15738 int val1 = nice(1);
15739 if (val1 != -1 && val1 == nice(2))
15740 exit(0);
15741 exit(1);
15742}
15743
Martin v. Löwis11437992002-04-12 09:54:03 +000015744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015745if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015746 ac_cv_broken_nice=yes
15747else
Matthias Kloseb9621712010-04-24 17:59:49 +000015748 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015752fi
15753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015754fi
15755
Matthias Kloseb9621712010-04-24 17:59:49 +000015756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15757$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015758if test "$ac_cv_broken_nice" = yes
15759then
Martin v. Löwis11437992002-04-12 09:54:03 +000015760
Matthias Kloseb9621712010-04-24 17:59:49 +000015761$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015762
15763fi
15764
Matthias Kloseb9621712010-04-24 17:59:49 +000015765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15766$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015767if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015768 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015769else
Matthias Kloseb9621712010-04-24 17:59:49 +000015770 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015771 ac_cv_broken_poll=no
15772else
Matthias Kloseb9621712010-04-24 17:59:49 +000015773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015774/* end confdefs.h. */
15775
15776#include <poll.h>
15777
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015778int main()
15779{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015780 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015781 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015782
15783 close (42);
15784
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015785 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015786 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015787 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015788 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015789 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015790 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015791 return 1;
15792}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015793
15794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015795if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015796 ac_cv_broken_poll=yes
15797else
Matthias Kloseb9621712010-04-24 17:59:49 +000015798 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15801 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015804fi
15805
Matthias Kloseb9621712010-04-24 17:59:49 +000015806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15807$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015808if test "$ac_cv_broken_poll" = yes
15809then
15810
Matthias Kloseb9621712010-04-24 17:59:49 +000015811$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015812
15813fi
15814
Martin v. Löwis1d459062005-03-14 21:23:33 +000015815# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15817$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015818if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015819 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015820else
15821
Matthias Kloseb9621712010-04-24 17:59:49 +000015822if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015823 ac_cv_working_tzset=no
15824else
Matthias Kloseb9621712010-04-24 17:59:49 +000015825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015826/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015827
15828#include <stdlib.h>
15829#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015830#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015831
15832#if HAVE_TZNAME
15833extern char *tzname[];
15834#endif
15835
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015836int main()
15837{
Brett Cannon18367812003-09-19 00:59:16 +000015838 /* Note that we need to ensure that not only does tzset(3)
15839 do 'something' with localtime, but it works as documented
15840 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015841 This includes making sure that tzname is set properly if
15842 tm->tm_zone does not exist since it is the alternative way
15843 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015844
15845 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015846 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015847 */
15848
Martin v. Löwis1d459062005-03-14 21:23:33 +000015849 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015850 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15851
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015852 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015853 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015854 if (localtime(&groundhogday)->tm_hour != 0)
15855 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015856#if HAVE_TZNAME
15857 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15858 if (strcmp(tzname[0], "UTC") ||
15859 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15860 exit(1);
15861#endif
Brett Cannon18367812003-09-19 00:59:16 +000015862
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015863 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015864 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015865 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015866 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015867#if HAVE_TZNAME
15868 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15869 exit(1);
15870#endif
Brett Cannon18367812003-09-19 00:59:16 +000015871
15872 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15873 tzset();
15874 if (localtime(&groundhogday)->tm_hour != 11)
15875 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015876#if HAVE_TZNAME
15877 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15878 exit(1);
15879#endif
15880
15881#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015882 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15883 exit(1);
15884 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15885 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015886#endif
Brett Cannon18367812003-09-19 00:59:16 +000015887
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015888 exit(0);
15889}
15890
15891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015892if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015893 ac_cv_working_tzset=yes
15894else
Matthias Kloseb9621712010-04-24 17:59:49 +000015895 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015899fi
15900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901fi
15902
Matthias Kloseb9621712010-04-24 17:59:49 +000015903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15904$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015905if test "$ac_cv_working_tzset" = yes
15906then
15907
Matthias Kloseb9621712010-04-24 17:59:49 +000015908$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015909
15910fi
15911
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015912# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15914$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015915if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015916 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015917else
Matthias Kloseb9621712010-04-24 17:59:49 +000015918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015919/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015920#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015921int
15922main ()
15923{
15924
15925struct stat st;
15926st.st_mtim.tv_nsec = 1;
15927
15928 ;
15929 return 0;
15930}
15931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015932if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015933 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015934else
Matthias Kloseb9621712010-04-24 17:59:49 +000015935 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15938fi
15939
Matthias Kloseb9621712010-04-24 17:59:49 +000015940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15941$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015942if test "$ac_cv_stat_tv_nsec" = yes
15943then
15944
Matthias Kloseb9621712010-04-24 17:59:49 +000015945$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015946
15947fi
15948
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015949# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15951$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015952if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015953 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015954else
Matthias Kloseb9621712010-04-24 17:59:49 +000015955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015956/* end confdefs.h. */
15957#include <sys/stat.h>
15958int
15959main ()
15960{
15961
15962struct stat st;
15963st.st_mtimespec.tv_nsec = 1;
15964
15965 ;
15966 return 0;
15967}
15968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015969if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015970 ac_cv_stat_tv_nsec2=yes
15971else
Matthias Kloseb9621712010-04-24 17:59:49 +000015972 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15975fi
15976
Matthias Kloseb9621712010-04-24 17:59:49 +000015977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15978$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015979if test "$ac_cv_stat_tv_nsec2" = yes
15980then
15981
Matthias Kloseb9621712010-04-24 17:59:49 +000015982$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015983
15984fi
15985
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015986# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015987ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015988if test "$cross_compiling" = no; then
15989 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15990fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015991
15992for ac_header in curses.h ncurses.h
15993do :
15994 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15995ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15996if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15997 cat >>confdefs.h <<_ACEOF
15998#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15999_ACEOF
16000
16001fi
16002
16003done
16004
16005
16006# On Solaris, term.h requires curses.h
16007for ac_header in term.h
16008do :
16009 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16010#ifdef HAVE_CURSES_H
16011#include <curses.h>
16012#endif
16013
16014"
16015if test "x$ac_cv_header_term_h" = xyes; then :
16016 cat >>confdefs.h <<_ACEOF
16017#define HAVE_TERM_H 1
16018_ACEOF
16019
16020fi
16021
16022done
16023
16024
Jack Jansen666b1e72001-10-31 12:11:48 +000016025# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16027$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016028if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016029 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016030else
Matthias Kloseb9621712010-04-24 17:59:49 +000016031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016032/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016033#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016034int
16035main ()
16036{
Jack Jansen666b1e72001-10-31 12:11:48 +000016037
16038 int rtn;
16039 rtn = mvwdelch(0,0,0);
16040
Martin v. Löwis11437992002-04-12 09:54:03 +000016041 ;
16042 return 0;
16043}
16044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016045if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016046 ac_cv_mvwdelch_is_expression=yes
16047else
Matthias Kloseb9621712010-04-24 17:59:49 +000016048 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16051fi
16052
Matthias Kloseb9621712010-04-24 17:59:49 +000016053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16054$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016055
16056if test "$ac_cv_mvwdelch_is_expression" = yes
16057then
Martin v. Löwis11437992002-04-12 09:54:03 +000016058
Matthias Kloseb9621712010-04-24 17:59:49 +000016059$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016060
16061fi
16062
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016063# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16064# structs since version 5.7. If the macro is defined as zero before including
16065# [n]curses.h, ncurses will expose fields of the structs regardless of the
16066# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16068$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016069if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016071else
Matthias Kloseb9621712010-04-24 17:59:49 +000016072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016073/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016074
16075 #define NCURSES_OPAQUE 0
16076 #include <curses.h>
16077
Martin v. Löwis11437992002-04-12 09:54:03 +000016078int
16079main ()
16080{
Jack Jansen666b1e72001-10-31 12:11:48 +000016081
16082 WINDOW *w;
16083 w->_flags = 0;
16084
Martin v. Löwis11437992002-04-12 09:54:03 +000016085 ;
16086 return 0;
16087}
16088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016089if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016090 ac_cv_window_has_flags=yes
16091else
Matthias Kloseb9621712010-04-24 17:59:49 +000016092 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16095fi
16096
Matthias Kloseb9621712010-04-24 17:59:49 +000016097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16098$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016099
Jack Jansen666b1e72001-10-31 12:11:48 +000016100
16101if test "$ac_cv_window_has_flags" = yes
16102then
Martin v. Löwis11437992002-04-12 09:54:03 +000016103
Matthias Kloseb9621712010-04-24 17:59:49 +000016104$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016105
16106fi
16107
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16109$as_echo_n "checking for is_pad... " >&6; }
16110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16111/* end confdefs.h. */
16112#include <curses.h>
16113int
16114main ()
16115{
16116
16117#ifndef is_pad
16118void *x=is_pad
16119#endif
16120
16121 ;
16122 return 0;
16123}
16124_ACEOF
16125if ac_fn_c_try_compile "$LINENO"; then :
16126
16127$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16128
16129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16130$as_echo "yes" >&6; }
16131else
16132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16133$as_echo "no" >&6; }
16134
16135fi
16136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16137
Matthias Kloseb9621712010-04-24 17:59:49 +000016138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16139$as_echo_n "checking for is_term_resized... " >&6; }
16140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016141/* end confdefs.h. */
16142#include <curses.h>
16143int
16144main ()
16145{
16146void *x=is_term_resized
16147 ;
16148 return 0;
16149}
16150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016152
Matthias Kloseb9621712010-04-24 17:59:49 +000016153$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016154
Matthias Kloseb159a552010-04-25 21:00:44 +000016155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016156$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016157else
Matthias Kloseb9621712010-04-24 17:59:49 +000016158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16159$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016160
16161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16163
Matthias Kloseb9621712010-04-24 17:59:49 +000016164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16165$as_echo_n "checking for resize_term... " >&6; }
16166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016167/* end confdefs.h. */
16168#include <curses.h>
16169int
16170main ()
16171{
16172void *x=resize_term
16173 ;
16174 return 0;
16175}
16176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016177if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016178
Matthias Kloseb9621712010-04-24 17:59:49 +000016179$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016180
Matthias Kloseb159a552010-04-25 21:00:44 +000016181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016182$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016183else
Matthias Kloseb9621712010-04-24 17:59:49 +000016184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16185$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016186
16187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16189
Matthias Kloseb9621712010-04-24 17:59:49 +000016190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16191$as_echo_n "checking for resizeterm... " >&6; }
16192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016193/* end confdefs.h. */
16194#include <curses.h>
16195int
16196main ()
16197{
16198void *x=resizeterm
16199 ;
16200 return 0;
16201}
16202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016203if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016204
Matthias Kloseb9621712010-04-24 17:59:49 +000016205$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016206
Matthias Kloseb159a552010-04-25 21:00:44 +000016207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016208$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016209else
Matthias Kloseb9621712010-04-24 17:59:49 +000016210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16211$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016212
16213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016215
16216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16217$as_echo_n "checking for immedok... " >&6; }
16218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16219/* end confdefs.h. */
16220#include <curses.h>
16221int
16222main ()
16223{
16224
16225#ifndef immedok
16226void *x=immedok
16227#endif
16228
16229 ;
16230 return 0;
16231}
16232_ACEOF
16233if ac_fn_c_try_compile "$LINENO"; then :
16234
16235$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16236
16237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16238$as_echo "yes" >&6; }
16239else
16240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16241$as_echo "no" >&6; }
16242
16243fi
16244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16245
16246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16247$as_echo_n "checking for syncok... " >&6; }
16248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16249/* end confdefs.h. */
16250#include <curses.h>
16251int
16252main ()
16253{
16254
16255#ifndef syncok
16256void *x=syncok
16257#endif
16258
16259 ;
16260 return 0;
16261}
16262_ACEOF
16263if ac_fn_c_try_compile "$LINENO"; then :
16264
16265$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16266
16267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16268$as_echo "yes" >&6; }
16269else
16270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16271$as_echo "no" >&6; }
16272
16273fi
16274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16275
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16277$as_echo_n "checking for wchgat... " >&6; }
16278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16279/* end confdefs.h. */
16280#include <curses.h>
16281int
16282main ()
16283{
16284
16285#ifndef wchgat
16286void *x=wchgat
16287#endif
16288
16289 ;
16290 return 0;
16291}
16292_ACEOF
16293if ac_fn_c_try_compile "$LINENO"; then :
16294
16295$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16296
16297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16298$as_echo "yes" >&6; }
16299else
16300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16301$as_echo "no" >&6; }
16302
16303fi
16304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16305
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16307$as_echo_n "checking for filter... " >&6; }
16308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16309/* end confdefs.h. */
16310#include <curses.h>
16311int
16312main ()
16313{
16314
16315#ifndef filter
16316void *x=filter
16317#endif
16318
16319 ;
16320 return 0;
16321}
16322_ACEOF
16323if ac_fn_c_try_compile "$LINENO"; then :
16324
16325$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16326
16327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16328$as_echo "yes" >&6; }
16329else
16330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16331$as_echo "no" >&6; }
16332
16333fi
16334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16335
16336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16337$as_echo_n "checking for has_key... " >&6; }
16338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16339/* end confdefs.h. */
16340#include <curses.h>
16341int
16342main ()
16343{
16344
16345#ifndef has_key
16346void *x=has_key
16347#endif
16348
16349 ;
16350 return 0;
16351}
16352_ACEOF
16353if ac_fn_c_try_compile "$LINENO"; then :
16354
16355$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16356
16357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16358$as_echo "yes" >&6; }
16359else
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16361$as_echo "no" >&6; }
16362
16363fi
16364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16365
16366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16367$as_echo_n "checking for typeahead... " >&6; }
16368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16369/* end confdefs.h. */
16370#include <curses.h>
16371int
16372main ()
16373{
16374
16375#ifndef typeahead
16376void *x=typeahead
16377#endif
16378
16379 ;
16380 return 0;
16381}
16382_ACEOF
16383if ac_fn_c_try_compile "$LINENO"; then :
16384
16385$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16386
16387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16388$as_echo "yes" >&6; }
16389else
16390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16391$as_echo "no" >&6; }
16392
16393fi
16394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16395
16396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16397$as_echo_n "checking for use_env... " >&6; }
16398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16399/* end confdefs.h. */
16400#include <curses.h>
16401int
16402main ()
16403{
16404
16405#ifndef use_env
16406void *x=use_env
16407#endif
16408
16409 ;
16410 return 0;
16411}
16412_ACEOF
16413if ac_fn_c_try_compile "$LINENO"; then :
16414
16415$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16416
16417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16418$as_echo "yes" >&6; }
16419else
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16421$as_echo "no" >&6; }
16422
16423fi
16424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016425# last curses configure check
16426CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016427
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16429$as_echo "$as_me: checking for device files" >&6;}
16430
16431if test "x$cross_compiling" = xyes; then
16432 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16434$as_echo_n "checking for /dev/ptmx... " >&6; }
16435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16436$as_echo "not set" >&6; }
16437 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16438 fi
16439 if test "${ac_cv_file__dev_ptc+set}" != set; then
16440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16441$as_echo_n "checking for /dev/ptc... " >&6; }
16442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16443$as_echo "not set" >&6; }
16444 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16445 fi
16446fi
16447
Matthias Kloseb9621712010-04-24 17:59:49 +000016448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16449$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016450if ${ac_cv_file__dev_ptmx+:} false; then :
16451 $as_echo_n "(cached) " >&6
16452else
16453 test "$cross_compiling" = yes &&
16454 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16455if test -r "/dev/ptmx"; then
16456 ac_cv_file__dev_ptmx=yes
16457else
16458 ac_cv_file__dev_ptmx=no
16459fi
16460fi
16461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16462$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16463if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016464
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016465fi
16466
16467if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016468
Matthias Kloseb9621712010-04-24 17:59:49 +000016469$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016470
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16473$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016474if ${ac_cv_file__dev_ptc+:} false; then :
16475 $as_echo_n "(cached) " >&6
16476else
16477 test "$cross_compiling" = yes &&
16478 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16479if test -r "/dev/ptc"; then
16480 ac_cv_file__dev_ptc=yes
16481else
16482 ac_cv_file__dev_ptc=no
16483fi
16484fi
16485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16486$as_echo "$ac_cv_file__dev_ptc" >&6; }
16487if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016488
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016489fi
16490
16491if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016492
Matthias Kloseb9621712010-04-24 17:59:49 +000016493$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016494
Neal Norwitz865400f2003-03-21 01:42:58 +000016495fi
16496
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016497if test $ac_sys_system = Darwin
16498then
16499 LIBS="$LIBS -framework CoreFoundation"
16500fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016501
Matthias Kloseb9621712010-04-24 17:59:49 +000016502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16503$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016504if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016505 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016506else
Matthias Kloseb9621712010-04-24 17:59:49 +000016507 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016508 ac_cv_have_size_t_format="cross -- assuming yes"
16509
Thomas Wouters477c8d52006-05-27 19:21:47 +000016510else
Matthias Kloseb9621712010-04-24 17:59:49 +000016511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016512/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016513
Thomas Wouters477c8d52006-05-27 19:21:47 +000016514#include <stdio.h>
16515#include <stddef.h>
16516#include <string.h>
16517
Christian Heimes2c181612007-12-17 20:04:13 +000016518#ifdef HAVE_SYS_TYPES_H
16519#include <sys/types.h>
16520#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016521
16522#ifdef HAVE_SSIZE_T
16523typedef ssize_t Py_ssize_t;
16524#elif SIZEOF_VOID_P == SIZEOF_LONG
16525typedef long Py_ssize_t;
16526#else
16527typedef int Py_ssize_t;
16528#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016529
Christian Heimes2c181612007-12-17 20:04:13 +000016530int main()
16531{
16532 char buffer[256];
16533
Thomas Wouters477c8d52006-05-27 19:21:47 +000016534 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16535 return 1;
16536
Thomas Wouters89f507f2006-12-13 04:49:30 +000016537 if (strcmp(buffer, "123"))
16538 return 1;
16539
16540 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16541 return 1;
16542
16543 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016544 return 1;
16545
16546 return 0;
16547}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016548
Thomas Wouters477c8d52006-05-27 19:21:47 +000016549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016550if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016551 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016552else
Matthias Kloseb9621712010-04-24 17:59:49 +000016553 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16556 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016557fi
16558
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16561$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016562if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016563
Matthias Kloseb9621712010-04-24 17:59:49 +000016564$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016565
16566fi
16567
Matthias Kloseb9621712010-04-24 17:59:49 +000016568ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016569#ifdef HAVE_SYS_TYPES_H
16570#include <sys/types.h>
16571#endif
16572#ifdef HAVE_SYS_SOCKET_H
16573#include <sys/socket.h>
16574#endif
16575
Matthias Kloseb9621712010-04-24 17:59:49 +000016576"
Victor Stinnere0be4232011-10-25 13:06:09 +020016577if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016578
Martin v. Löwis11437992002-04-12 09:54:03 +000016579else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016580
Matthias Kloseb9621712010-04-24 17:59:49 +000016581$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016582
16583fi
16584
Michael W. Hudson54241132001-12-07 15:38:26 +000016585
Matthias Kloseb9621712010-04-24 17:59:49 +000016586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16587$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016588if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016589 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016590else
Matthias Kloseb9621712010-04-24 17:59:49 +000016591 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016592 ac_cv_broken_mbstowcs=no
16593else
Matthias Kloseb9621712010-04-24 17:59:49 +000016594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016595/* end confdefs.h. */
16596
Stefan Krah19c21392012-11-22 23:47:32 +010016597#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016598#include<stdlib.h>
16599int main() {
16600 size_t len = -1;
16601 const char *str = "text";
16602 len = mbstowcs(NULL, str, 0);
16603 return (len != 4);
16604}
16605
16606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016607if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016608 ac_cv_broken_mbstowcs=no
16609else
Matthias Kloseb9621712010-04-24 17:59:49 +000016610 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016611fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16613 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016614fi
16615
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016616fi
16617
Matthias Kloseb9621712010-04-24 17:59:49 +000016618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16619$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016620if test "$ac_cv_broken_mbstowcs" = yes
16621then
16622
Matthias Kloseb9621712010-04-24 17:59:49 +000016623$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016624
16625fi
16626
Antoine Pitroub52ec782009-01-25 16:34:23 +000016627# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16629$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016630
16631# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016632if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016633 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016634if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016635then
16636
Matthias Kloseb9621712010-04-24 17:59:49 +000016637$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016638
Matthias Kloseb9621712010-04-24 17:59:49 +000016639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16640$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016641fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016642if test "$withval" = no
16643then
16644
16645$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16646
Matthias Kloseb9621712010-04-24 17:59:49 +000016647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16648$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016649fi
16650
Antoine Pitrou042b1282010-08-13 21:15:58 +000016651else
16652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16653$as_echo "no value specified" >&6; }
16654fi
16655
Antoine Pitroub52ec782009-01-25 16:34:23 +000016656
Matthias Kloseb17289e2012-03-15 19:51:34 +010016657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16658$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16659if ${ac_cv_computed_gotos+:} false; then :
16660 $as_echo_n "(cached) " >&6
16661else
16662 if test "$cross_compiling" = yes; then :
16663 if test "${with_computed_gotos+set}" = set; then
16664 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16665 else
16666 ac_cv_computed_gotos=no
16667 fi
16668else
16669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16670/* end confdefs.h. */
16671
16672int main(int argc, char **argv)
16673{
16674 static void *targets[1] = { &&LABEL1 };
16675 goto LABEL2;
16676LABEL1:
16677 return 0;
16678LABEL2:
16679 goto *targets[0];
16680 return 1;
16681}
16682
16683_ACEOF
16684if ac_fn_c_try_run "$LINENO"; then :
16685 ac_cv_computed_gotos=yes
16686else
16687 ac_cv_computed_gotos=no
16688fi
16689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16690 conftest.$ac_objext conftest.beam conftest.$ac_ext
16691fi
16692
16693fi
16694
16695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16696$as_echo "$ac_cv_computed_gotos" >&6; }
16697case "$ac_cv_computed_gotos" in yes*)
16698
16699$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16700
16701esac
16702
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016703case $ac_sys_system in
16704AIX*)
16705
16706$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16707 ;;
16708esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016709
Michael W. Hudson54241132001-12-07 15:38:26 +000016710
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016711
16712
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016713for h in `(cd $srcdir;echo Python/thread_*.h)`
16714do
16715 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16716done
16717
Michael W. Hudson54241132001-12-07 15:38:26 +000016718
Victor Stinner21a74a92019-04-11 22:28:12 +020016719SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16721$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016722for dir in $SRCDIRS; do
16723 if test ! -d $dir; then
16724 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016725 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016726done
Matthias Kloseb9621712010-04-24 17:59:49 +000016727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16728$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016729
Stefan Krah1919b7e2012-03-21 18:25:23 +010016730# Availability of -O2:
16731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16732$as_echo_n "checking for -O2... " >&6; }
16733saved_cflags="$CFLAGS"
16734CFLAGS="-O2"
16735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16736/* end confdefs.h. */
16737
16738int
16739main ()
16740{
16741
16742
16743 ;
16744 return 0;
16745}
16746_ACEOF
16747if ac_fn_c_try_compile "$LINENO"; then :
16748 have_O2=yes
16749else
16750 have_O2=no
16751fi
16752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16754$as_echo "$have_O2" >&6; }
16755CFLAGS="$saved_cflags"
16756
16757# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16758# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16760$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16761saved_cflags="$CFLAGS"
16762CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16763if test "$have_O2" = no; then
16764 CFLAGS=""
16765fi
16766if test "$cross_compiling" = yes; then :
16767 have_glibc_memmove_bug=undefined
16768else
16769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16770/* end confdefs.h. */
16771
16772#include <stdio.h>
16773#include <stdlib.h>
16774#include <string.h>
16775void foo(void *p, void *q) { memmove(p, q, 19); }
16776int main() {
16777 char a[32] = "123456789000000000";
16778 foo(&a[9], a);
16779 if (strcmp(a, "123456789123456789000000000") != 0)
16780 return 1;
16781 foo(a, &a[9]);
16782 if (strcmp(a, "123456789000000000") != 0)
16783 return 1;
16784 return 0;
16785}
16786
16787_ACEOF
16788if ac_fn_c_try_run "$LINENO"; then :
16789 have_glibc_memmove_bug=no
16790else
16791 have_glibc_memmove_bug=yes
16792fi
16793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16794 conftest.$ac_objext conftest.beam conftest.$ac_ext
16795fi
16796
16797CFLAGS="$saved_cflags"
16798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16799$as_echo "$have_glibc_memmove_bug" >&6; }
16800if test "$have_glibc_memmove_bug" = yes; then
16801
16802$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16803
16804fi
16805
16806if test "$have_gcc_asm_for_x87" = yes; then
16807 # Some versions of gcc miscompile inline asm:
16808 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16809 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16810 case $CC in
16811 *gcc*)
16812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16813$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16814 saved_cflags="$CFLAGS"
16815 CFLAGS="-O2"
16816 if test "$cross_compiling" = yes; then :
16817 have_ipa_pure_const_bug=undefined
16818else
16819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16820/* end confdefs.h. */
16821
16822 __attribute__((noinline)) int
16823 foo(int *p) {
16824 int r;
16825 asm ( "movl \$6, (%1)\n\t"
16826 "xorl %0, %0\n\t"
16827 : "=r" (r) : "r" (p) : "memory"
16828 );
16829 return r;
16830 }
16831 int main() {
16832 int p = 8;
16833 if ((foo(&p) ? : p) != 6)
16834 return 1;
16835 return 0;
16836 }
16837
16838_ACEOF
16839if ac_fn_c_try_run "$LINENO"; then :
16840 have_ipa_pure_const_bug=no
16841else
16842 have_ipa_pure_const_bug=yes
16843fi
16844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16845 conftest.$ac_objext conftest.beam conftest.$ac_ext
16846fi
16847
16848 CFLAGS="$saved_cflags"
16849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16850$as_echo "$have_ipa_pure_const_bug" >&6; }
16851 if test "$have_ipa_pure_const_bug" = yes; then
16852
16853$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16854
16855 fi
16856 ;;
16857 esac
16858fi
16859
Victor Stinner4f5366e2015-01-09 02:13:19 +010016860# Check for stdatomic.h
16861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16862$as_echo_n "checking for stdatomic.h... " >&6; }
16863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16864/* end confdefs.h. */
16865
16866
16867 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016868 atomic_int int_var;
16869 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016870 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016871 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16872 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16873 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016874 return 0;
16875 }
16876
16877
16878_ACEOF
16879if ac_fn_c_try_link "$LINENO"; then :
16880 have_stdatomic_h=yes
16881else
16882 have_stdatomic_h=no
16883fi
16884rm -f core conftest.err conftest.$ac_objext \
16885 conftest$ac_exeext conftest.$ac_ext
16886
16887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16888$as_echo "$have_stdatomic_h" >&6; }
16889
16890if test "$have_stdatomic_h" = yes; then
16891
16892$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16893
16894fi
16895
16896# Check for GCC >= 4.7 __atomic builtins
16897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16898$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16900/* end confdefs.h. */
16901
16902
16903 volatile int val = 1;
16904 int main() {
16905 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16906 return 0;
16907 }
16908
16909
16910_ACEOF
16911if ac_fn_c_try_link "$LINENO"; then :
16912 have_builtin_atomic=yes
16913else
16914 have_builtin_atomic=no
16915fi
16916rm -f core conftest.err conftest.$ac_objext \
16917 conftest$ac_exeext conftest.$ac_ext
16918
16919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16920$as_echo "$have_builtin_atomic" >&6; }
16921
16922if test "$have_builtin_atomic" = yes; then
16923
16924$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16925
16926fi
16927
Ned Deily322f5ba2013-11-21 23:01:59 -080016928# ensurepip option
16929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16930$as_echo_n "checking for ensurepip... " >&6; }
16931
16932# Check whether --with-ensurepip was given.
16933if test "${with_ensurepip+set}" = set; then :
16934 withval=$with_ensurepip;
16935else
16936 with_ensurepip=upgrade
16937fi
16938
16939case $with_ensurepip in #(
16940 yes|upgrade) :
16941 ENSUREPIP=upgrade ;; #(
16942 install) :
16943 ENSUREPIP=install ;; #(
16944 no) :
16945 ENSUREPIP=no ;; #(
16946 *) :
16947 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16948esac
16949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16950$as_echo "$ENSUREPIP" >&6; }
16951
16952
Victor Stinner35a97c02015-03-08 02:59:09 +010016953# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16955$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16957/* end confdefs.h. */
16958
16959
16960 #include <dirent.h>
16961
16962 int main() {
16963 struct dirent entry;
16964 return entry.d_type == DT_UNKNOWN;
16965 }
16966
16967
16968_ACEOF
16969if ac_fn_c_try_link "$LINENO"; then :
16970 have_dirent_d_type=yes
16971else
16972 have_dirent_d_type=no
16973fi
16974rm -f core conftest.err conftest.$ac_objext \
16975 conftest$ac_exeext conftest.$ac_ext
16976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16977$as_echo "$have_dirent_d_type" >&6; }
16978
16979if test "$have_dirent_d_type" = yes; then
16980
16981$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16982
16983fi
16984
Victor Stinner9eb57c52015-03-19 22:21:49 +010016985# check if the Linux getrandom() syscall is available
16986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16987$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16989/* end confdefs.h. */
16990
16991
Victor Stinner1b80b242016-04-12 22:34:58 +020016992 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016993 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016994 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016995
16996 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016997 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016998 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016999 const int flags = GRND_NONBLOCK;
17000 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017001 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017002 return 0;
17003 }
17004
17005
17006_ACEOF
17007if ac_fn_c_try_link "$LINENO"; then :
17008 have_getrandom_syscall=yes
17009else
17010 have_getrandom_syscall=no
17011fi
17012rm -f core conftest.err conftest.$ac_objext \
17013 conftest$ac_exeext conftest.$ac_ext
17014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17015$as_echo "$have_getrandom_syscall" >&6; }
17016
17017if test "$have_getrandom_syscall" = yes; then
17018
17019$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17020
17021fi
17022
Victor Stinner3abf44e2015-09-18 15:38:37 +020017023# check if the getrandom() function is available
17024# the test was written for the Solaris function of <sys/random.h>
17025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17026$as_echo_n "checking for the getrandom() function... " >&6; }
17027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17028/* end confdefs.h. */
17029
17030
17031 #include <sys/random.h>
17032
17033 int main() {
17034 char buffer[1];
17035 const size_t buflen = sizeof(buffer);
17036 const int flags = 0;
17037 /* ignore the result, Python checks for ENOSYS at runtime */
17038 (void)getrandom(buffer, buflen, flags);
17039 return 0;
17040 }
17041
17042
17043_ACEOF
17044if ac_fn_c_try_link "$LINENO"; then :
17045 have_getrandom=yes
17046else
17047 have_getrandom=no
17048fi
17049rm -f core conftest.err conftest.$ac_objext \
17050 conftest$ac_exeext conftest.$ac_ext
17051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17052$as_echo "$have_getrandom" >&6; }
17053
17054if test "$have_getrandom" = yes; then
17055
17056$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17057
17058fi
17059
Neil Schemenauer5741c452019-02-08 10:48:46 -080017060# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17061# shm_* may only be available if linking against librt
17062save_LIBS="$LIBS"
17063save_includes_default="$ac_includes_default"
17064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17065$as_echo_n "checking for library containing shm_open... " >&6; }
17066if ${ac_cv_search_shm_open+:} false; then :
17067 $as_echo_n "(cached) " >&6
17068else
17069 ac_func_search_save_LIBS=$LIBS
17070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17071/* end confdefs.h. */
17072
17073/* Override any GCC internal prototype to avoid an error.
17074 Use char because int might match the return type of a GCC
17075 builtin and then its argument prototype would still apply. */
17076#ifdef __cplusplus
17077extern "C"
17078#endif
17079char shm_open ();
17080int
17081main ()
17082{
17083return shm_open ();
17084 ;
17085 return 0;
17086}
17087_ACEOF
17088for ac_lib in '' rt; do
17089 if test -z "$ac_lib"; then
17090 ac_res="none required"
17091 else
17092 ac_res=-l$ac_lib
17093 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17094 fi
17095 if ac_fn_c_try_link "$LINENO"; then :
17096 ac_cv_search_shm_open=$ac_res
17097fi
17098rm -f core conftest.err conftest.$ac_objext \
17099 conftest$ac_exeext
17100 if ${ac_cv_search_shm_open+:} false; then :
17101 break
17102fi
17103done
17104if ${ac_cv_search_shm_open+:} false; then :
17105
17106else
17107 ac_cv_search_shm_open=no
17108fi
17109rm conftest.$ac_ext
17110LIBS=$ac_func_search_save_LIBS
17111fi
17112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17113$as_echo "$ac_cv_search_shm_open" >&6; }
17114ac_res=$ac_cv_search_shm_open
17115if test "$ac_res" != no; then :
17116 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17117
17118fi
17119
17120if test "$ac_cv_search_shm_open" = "-lrt"; then
17121
17122$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17123
17124fi
17125for ac_header in sys/mman.h
17126do :
17127 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17128if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17129 cat >>confdefs.h <<_ACEOF
17130#define HAVE_SYS_MMAN_H 1
17131_ACEOF
17132
17133fi
17134
17135done
17136
17137# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17138ac_includes_default="\
17139${ac_includes_default}
17140#ifndef __cplusplus
17141# ifdef HAVE_SYS_MMAN_H
17142# include <sys/mman.h>
17143# endif
17144#endif
17145"
17146for ac_func in shm_open shm_unlink
17147do :
17148 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17149ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17150if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17151 cat >>confdefs.h <<_ACEOF
17152#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17153_ACEOF
17154
17155fi
17156done
17157
17158# we don't want to link with librt always, restore LIBS
17159LIBS="$save_LIBS"
17160ac_includes_default="$save_includes_default"
17161
Christian Heimesff5be6e2018-01-20 13:19:21 +010017162# Check for usable OpenSSL
17163
17164 found=false
17165
17166# Check whether --with-openssl was given.
17167if test "${with_openssl+set}" = set; then :
17168 withval=$with_openssl;
17169 case "$withval" in
17170 "" | y | ye | yes | n | no)
17171 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17172 ;;
17173 *) ssldirs="$withval"
17174 ;;
17175 esac
17176
17177else
17178
17179 # if pkg-config is installed and openssl has installed a .pc file,
17180 # then use that information and don't search ssldirs
17181 if test -n "$ac_tool_prefix"; then
17182 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17183set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17185$as_echo_n "checking for $ac_word... " >&6; }
17186if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17187 $as_echo_n "(cached) " >&6
17188else
17189 if test -n "$PKG_CONFIG"; then
17190 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17191else
17192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17193for as_dir in $PATH
17194do
17195 IFS=$as_save_IFS
17196 test -z "$as_dir" && as_dir=.
17197 for ac_exec_ext in '' $ac_executable_extensions; do
17198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17199 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17201 break 2
17202 fi
17203done
17204 done
17205IFS=$as_save_IFS
17206
17207fi
17208fi
17209PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17210if test -n "$PKG_CONFIG"; then
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17212$as_echo "$PKG_CONFIG" >&6; }
17213else
17214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17215$as_echo "no" >&6; }
17216fi
17217
17218
17219fi
17220if test -z "$ac_cv_prog_PKG_CONFIG"; then
17221 ac_ct_PKG_CONFIG=$PKG_CONFIG
17222 # Extract the first word of "pkg-config", so it can be a program name with args.
17223set dummy pkg-config; ac_word=$2
17224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17225$as_echo_n "checking for $ac_word... " >&6; }
17226if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17227 $as_echo_n "(cached) " >&6
17228else
17229 if test -n "$ac_ct_PKG_CONFIG"; then
17230 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17231else
17232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17233for as_dir in $PATH
17234do
17235 IFS=$as_save_IFS
17236 test -z "$as_dir" && as_dir=.
17237 for ac_exec_ext in '' $ac_executable_extensions; do
17238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17239 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17241 break 2
17242 fi
17243done
17244 done
17245IFS=$as_save_IFS
17246
17247fi
17248fi
17249ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17250if test -n "$ac_ct_PKG_CONFIG"; then
17251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17252$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17253else
17254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17255$as_echo "no" >&6; }
17256fi
17257
17258 if test "x$ac_ct_PKG_CONFIG" = x; then
17259 PKG_CONFIG=""
17260 else
17261 case $cross_compiling:$ac_tool_warned in
17262yes:)
17263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17265ac_tool_warned=yes ;;
17266esac
17267 PKG_CONFIG=$ac_ct_PKG_CONFIG
17268 fi
17269else
17270 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17271fi
17272
17273 if test x"$PKG_CONFIG" != x""; then
17274 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17275 if test $? = 0; then
17276 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17277 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17278 found=true
17279 fi
17280 fi
17281
17282 # no such luck; use some default ssldirs
17283 if ! $found; then
17284 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17285 fi
17286
17287
17288fi
17289
17290
17291
17292 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17293 # an 'openssl' subdirectory
17294
17295 if ! $found; then
17296 OPENSSL_INCLUDES=
17297 for ssldir in $ssldirs; do
17298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17299$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17300 if test -f "$ssldir/include/openssl/ssl.h"; then
17301 OPENSSL_INCLUDES="-I$ssldir/include"
17302 OPENSSL_LDFLAGS="-L$ssldir/lib"
17303 OPENSSL_LIBS="-lssl -lcrypto"
17304 found=true
17305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17306$as_echo "yes" >&6; }
17307 break
17308 else
17309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17310$as_echo "no" >&6; }
17311 fi
17312 done
17313
17314 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17315 # it will just work!
17316 fi
17317
17318 # try the preprocessor and linker with our new flags,
17319 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17320
17321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17322$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17323 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17324 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17325
17326 save_LIBS="$LIBS"
17327 save_LDFLAGS="$LDFLAGS"
17328 save_CPPFLAGS="$CPPFLAGS"
17329 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17330 LIBS="$OPENSSL_LIBS $LIBS"
17331 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17333/* end confdefs.h. */
17334#include <openssl/ssl.h>
17335int
17336main ()
17337{
17338SSL_new(NULL)
17339 ;
17340 return 0;
17341}
17342_ACEOF
17343if ac_fn_c_try_link "$LINENO"; then :
17344
17345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17346$as_echo "yes" >&6; }
17347 have_openssl=yes
17348
17349else
17350
17351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17352$as_echo "no" >&6; }
17353 have_openssl=no
17354
17355fi
17356rm -f core conftest.err conftest.$ac_objext \
17357 conftest$ac_exeext conftest.$ac_ext
17358 CPPFLAGS="$save_CPPFLAGS"
17359 LDFLAGS="$save_LDFLAGS"
17360 LIBS="$save_LIBS"
17361
17362
17363
17364
17365
17366
17367if test "$have_openssl" = yes; then
17368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17369$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17370
17371 save_LIBS="$LIBS"
17372 save_LDFLAGS="$LDFLAGS"
17373 save_CPPFLAGS="$CPPFLAGS"
17374 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17375 LIBS="$OPENSSL_LIBS $LIBS"
17376 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17377
17378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17379/* end confdefs.h. */
17380
17381 #include <openssl/x509_vfy.h>
17382
17383int
17384main ()
17385{
17386
17387 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17388 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17389 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17390 X509_VERIFY_PARAM_set_hostflags(p, 0);
17391
17392 ;
17393 return 0;
17394}
17395
17396_ACEOF
17397if ac_fn_c_try_link "$LINENO"; then :
17398
17399 ac_cv_has_x509_verify_param_set1_host=yes
17400
17401else
17402
17403 ac_cv_has_x509_verify_param_set1_host=no
17404
17405fi
17406rm -f core conftest.err conftest.$ac_objext \
17407 conftest$ac_exeext conftest.$ac_ext
17408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17409$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17410 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17411
17412$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17413
17414 fi
17415
17416 CPPFLAGS="$save_CPPFLAGS"
17417 LDFLAGS="$save_LDFLAGS"
17418 LIBS="$save_LIBS"
17419fi
17420
Christian Heimes892d66e2018-01-29 14:10:18 +010017421# ssl module default cipher suite string
17422
17423
17424
17425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17426$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17427
17428# Check whether --with-ssl-default-suites was given.
17429if test "${with_ssl_default_suites+set}" = set; then :
17430 withval=$with_ssl_default_suites;
17431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17432$as_echo "$withval" >&6; }
17433case "$withval" in
17434 python)
17435 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17436
17437 ;;
17438 openssl)
17439 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17440
17441 ;;
17442 *)
17443 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17444
17445 cat >>confdefs.h <<_ACEOF
17446#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17447_ACEOF
17448
17449 ;;
17450esac
17451
17452else
17453
17454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17455$as_echo "python" >&6; }
17456$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17457
17458
17459fi
17460
17461
17462
Guido van Rossum627b2d71993-12-24 10:39:16 +000017463# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017464ac_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 +000017465
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017466ac_config_files="$ac_config_files Modules/ld_so_aix"
17467
Martin v. Löwis11437992002-04-12 09:54:03 +000017468cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017469# This file is a shell script that caches the results of configure
17470# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017471# scripts and configure runs, see configure's option --config-cache.
17472# It is not useful on other systems. If it contains results you don't
17473# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017474#
Martin v. Löwis11437992002-04-12 09:54:03 +000017475# config.status only pays attention to the cache file if you give it
17476# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017477#
Skip Montanaro6dead952003-09-25 14:50:04 +000017478# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017479# loading this file, other *unset* `ac_cv_foo' will be assigned the
17480# following values.
17481
17482_ACEOF
17483
Guido van Rossumf78abae1997-01-21 22:02:36 +000017484# The following way of writing the cache mishandles newlines in values,
17485# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017486# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017487# Ultrix sh set writes to stderr and can't be redirected directly,
17488# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017489(
17490 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17491 eval ac_val=\$$ac_var
17492 case $ac_val in #(
17493 *${as_nl}*)
17494 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017495 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17496$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017497 esac
17498 case $ac_var in #(
17499 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017500 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17501 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017502 esac ;;
17503 esac
17504 done
17505
Martin v. Löwis11437992002-04-12 09:54:03 +000017506 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17508 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017509 # `set' does not quote correctly, so add quotes: double-quote
17510 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017511 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017512 "s/'/'\\\\''/g;
17513 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017514 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017515 *)
17516 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017518 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017519 esac |
17520 sort
17521) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017522 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017523 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017524 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017525 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017526 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17527 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017528 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17529 :end' >>confcache
17530if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17531 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017532 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017533 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17534$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017535 if test ! -f "$cache_file" || test -h "$cache_file"; then
17536 cat confcache >"$cache_file"
17537 else
17538 case $cache_file in #(
17539 */* | ?:*)
17540 mv -f confcache "$cache_file"$$ &&
17541 mv -f "$cache_file"$$ "$cache_file" ;; #(
17542 *)
17543 mv -f confcache "$cache_file" ;;
17544 esac
17545 fi
17546 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017547 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017548 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17549$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017550 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017551fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017552rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017553
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017554test "x$prefix" = xNONE && prefix=$ac_default_prefix
17555# Let make expand exec_prefix.
17556test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017557
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017558DEFS=-DHAVE_CONFIG_H
17559
Skip Montanaro6dead952003-09-25 14:50:04 +000017560ac_libobjs=
17561ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017562U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017563for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17564 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017566 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017567 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17568 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017569 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17570 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017571done
17572LIBOBJS=$ac_libobjs
17573
17574LTLIBOBJS=$ac_ltlibobjs
17575
17576
Martin v. Löwis11437992002-04-12 09:54:03 +000017577
Matthias Kloseb9621712010-04-24 17:59:49 +000017578
Victor Stinnere0be4232011-10-25 13:06:09 +020017579: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017580ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017581ac_clean_files_save=$ac_clean_files
17582ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017583{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17584$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17585as_write_fail=0
17586cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017587#! $SHELL
17588# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017589# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017590# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017591# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017592
Martin v. Löwis11437992002-04-12 09:54:03 +000017593debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017594ac_cs_recheck=false
17595ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017596
Matthias Kloseb9621712010-04-24 17:59:49 +000017597SHELL=\${CONFIG_SHELL-$SHELL}
17598export SHELL
17599_ASEOF
17600cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17601## -------------------- ##
17602## M4sh Initialization. ##
17603## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605# Be more Bourne compatible
17606DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017607if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017608 emulate sh
17609 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017610 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017611 # is contrary to our usage. Disable this feature.
17612 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017613 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017614else
Matthias Kloseb9621712010-04-24 17:59:49 +000017615 case `(set -o) 2>/dev/null` in #(
17616 *posix*) :
17617 set -o posix ;; #(
17618 *) :
17619 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017621fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017622
17623
Matthias Kloseb9621712010-04-24 17:59:49 +000017624as_nl='
17625'
17626export as_nl
17627# Printing a long string crashes Solaris 7 /usr/bin/printf.
17628as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17629as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17630as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17631# Prefer a ksh shell builtin over an external printf program on Solaris,
17632# but without wasting forks for bash or zsh.
17633if test -z "$BASH_VERSION$ZSH_VERSION" \
17634 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17635 as_echo='print -r --'
17636 as_echo_n='print -rn --'
17637elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17638 as_echo='printf %s\n'
17639 as_echo_n='printf %s'
17640else
17641 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17642 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17643 as_echo_n='/usr/ucb/echo -n'
17644 else
17645 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17646 as_echo_n_body='eval
17647 arg=$1;
17648 case $arg in #(
17649 *"$as_nl"*)
17650 expr "X$arg" : "X\\(.*\\)$as_nl";
17651 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17652 esac;
17653 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17654 '
17655 export as_echo_n_body
17656 as_echo_n='sh -c $as_echo_n_body as_echo'
17657 fi
17658 export as_echo_body
17659 as_echo='sh -c $as_echo_body as_echo'
17660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017661
17662# The user is always right.
17663if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017664 PATH_SEPARATOR=:
17665 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17666 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17667 PATH_SEPARATOR=';'
17668 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671
17672# IFS
17673# We need space, tab and new line, in precisely that order. Quoting is
17674# there to prevent editors from complaining about space-tab.
17675# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17676# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677IFS=" "" $as_nl"
17678
17679# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017680as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017681case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682 *[\\/]* ) as_myself=$0 ;;
17683 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017684for as_dir in $PATH
17685do
17686 IFS=$as_save_IFS
17687 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017688 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17689 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692 ;;
17693esac
17694# We did not find ourselves, most probably we were run as `sh COMMAND'
17695# in which case we are not to be found in the path.
17696if test "x$as_myself" = x; then
17697 as_myself=$0
17698fi
17699if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017700 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17701 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702fi
17703
Matthias Kloseb9621712010-04-24 17:59:49 +000017704# Unset variables that we do not need and which cause bugs (e.g. in
17705# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17706# suppresses any "Segmentation fault" message there. '((' could
17707# trigger a bug in pdksh 5.2.14.
17708for as_var in BASH_ENV ENV MAIL MAILPATH
17709do eval test x\${$as_var+set} = xset \
17710 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017711done
17712PS1='$ '
17713PS2='> '
17714PS4='+ '
17715
17716# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017717LC_ALL=C
17718export LC_ALL
17719LANGUAGE=C
17720export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721
Matthias Kloseb9621712010-04-24 17:59:49 +000017722# CDPATH.
17723(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17724
17725
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017726# as_fn_error STATUS ERROR [LINENO LOG_FD]
17727# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017728# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17729# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017730# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017731as_fn_error ()
17732{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017733 as_status=$1; test $as_status -eq 0 && as_status=1
17734 if test "$4"; then
17735 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17736 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017737 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017738 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017739 as_fn_exit $as_status
17740} # as_fn_error
17741
17742
17743# as_fn_set_status STATUS
17744# -----------------------
17745# Set $? to STATUS, without forking.
17746as_fn_set_status ()
17747{
17748 return $1
17749} # as_fn_set_status
17750
17751# as_fn_exit STATUS
17752# -----------------
17753# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17754as_fn_exit ()
17755{
17756 set +e
17757 as_fn_set_status $1
17758 exit $1
17759} # as_fn_exit
17760
17761# as_fn_unset VAR
17762# ---------------
17763# Portably unset VAR.
17764as_fn_unset ()
17765{
17766 { eval $1=; unset $1;}
17767}
17768as_unset=as_fn_unset
17769# as_fn_append VAR VALUE
17770# ----------------------
17771# Append the text in VALUE to the end of the definition contained in VAR. Take
17772# advantage of any shell optimizations that allow amortized linear growth over
17773# repeated appends, instead of the typical quadratic growth present in naive
17774# implementations.
17775if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17776 eval 'as_fn_append ()
17777 {
17778 eval $1+=\$2
17779 }'
17780else
17781 as_fn_append ()
17782 {
17783 eval $1=\$$1\$2
17784 }
17785fi # as_fn_append
17786
17787# as_fn_arith ARG...
17788# ------------------
17789# Perform arithmetic evaluation on the ARGs, and store the result in the
17790# global $as_val. Take advantage of shells that can avoid forks. The arguments
17791# must be portable across $(()) and expr.
17792if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17793 eval 'as_fn_arith ()
17794 {
17795 as_val=$(( $* ))
17796 }'
17797else
17798 as_fn_arith ()
17799 {
17800 as_val=`expr "$@" || test $? -eq 1`
17801 }
17802fi # as_fn_arith
17803
17804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805if expr a : '\(a\)' >/dev/null 2>&1 &&
17806 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17807 as_expr=expr
17808else
17809 as_expr=false
17810fi
17811
17812if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17813 as_basename=basename
17814else
17815 as_basename=false
17816fi
17817
Matthias Kloseb9621712010-04-24 17:59:49 +000017818if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17819 as_dirname=dirname
17820else
17821 as_dirname=false
17822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824as_me=`$as_basename -- "$0" ||
17825$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17826 X"$0" : 'X\(//\)$' \| \
17827 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017828$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829 sed '/^.*\/\([^/][^/]*\)\/*$/{
17830 s//\1/
17831 q
17832 }
17833 /^X\/\(\/\/\)$/{
17834 s//\1/
17835 q
17836 }
17837 /^X\/\(\/\).*/{
17838 s//\1/
17839 q
17840 }
17841 s/.*/./; q'`
17842
Matthias Kloseb9621712010-04-24 17:59:49 +000017843# Avoid depending upon Character Ranges.
17844as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17845as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17846as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17847as_cr_digits='0123456789'
17848as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849
17850ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017851case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017852-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017853 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017855 xy) ECHO_C='\c';;
17856 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17857 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017858 esac;;
17859*)
17860 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017861esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017862
Martin v. Löwis11437992002-04-12 09:54:03 +000017863rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017864if test -d conf$$.dir; then
17865 rm -f conf$$.dir/conf$$.file
17866else
17867 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017868 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017870if (echo >conf$$.file) 2>/dev/null; then
17871 if ln -s conf$$.file conf$$ 2>/dev/null; then
17872 as_ln_s='ln -s'
17873 # ... but there are two gotchas:
17874 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17875 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017876 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017877 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017878 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017879 elif ln conf$$.file conf$$ 2>/dev/null; then
17880 as_ln_s=ln
17881 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017882 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017883 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017884else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017885 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017887rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17888rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017889
Matthias Kloseb9621712010-04-24 17:59:49 +000017890
17891# as_fn_mkdir_p
17892# -------------
17893# Create "$as_dir" as a directory, including parents if necessary.
17894as_fn_mkdir_p ()
17895{
17896
17897 case $as_dir in #(
17898 -*) as_dir=./$as_dir;;
17899 esac
17900 test -d "$as_dir" || eval $as_mkdir_p || {
17901 as_dirs=
17902 while :; do
17903 case $as_dir in #(
17904 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17905 *) as_qdir=$as_dir;;
17906 esac
17907 as_dirs="'$as_qdir' $as_dirs"
17908 as_dir=`$as_dirname -- "$as_dir" ||
17909$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17910 X"$as_dir" : 'X\(//\)[^/]' \| \
17911 X"$as_dir" : 'X\(//\)$' \| \
17912 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17913$as_echo X"$as_dir" |
17914 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17915 s//\1/
17916 q
17917 }
17918 /^X\(\/\/\)[^/].*/{
17919 s//\1/
17920 q
17921 }
17922 /^X\(\/\/\)$/{
17923 s//\1/
17924 q
17925 }
17926 /^X\(\/\).*/{
17927 s//\1/
17928 q
17929 }
17930 s/.*/./; q'`
17931 test -d "$as_dir" && break
17932 done
17933 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017934 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017935
17936
17937} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017938if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017939 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017940else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017941 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017942 as_mkdir_p=false
17943fi
17944
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017945
17946# as_fn_executable_p FILE
17947# -----------------------
17948# Test if FILE is an executable regular file.
17949as_fn_executable_p ()
17950{
17951 test -f "$1" && test -x "$1"
17952} # as_fn_executable_p
17953as_test_x='test -x'
17954as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017955
17956# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017957as_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 +000017958
17959# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017960as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017961
17962
Martin v. Löwis11437992002-04-12 09:54:03 +000017963exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017964## ----------------------------------- ##
17965## Main body of $CONFIG_STATUS script. ##
17966## ----------------------------------- ##
17967_ASEOF
17968test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017969
Matthias Kloseb9621712010-04-24 17:59:49 +000017970cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17971# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017972# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017973# values after options handling.
17974ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017975This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017976generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017977
17978 CONFIG_FILES = $CONFIG_FILES
17979 CONFIG_HEADERS = $CONFIG_HEADERS
17980 CONFIG_LINKS = $CONFIG_LINKS
17981 CONFIG_COMMANDS = $CONFIG_COMMANDS
17982 $ $0 $@
17983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984on `(hostname || uname -n) 2>/dev/null | sed 1q`
17985"
17986
Martin v. Löwis11437992002-04-12 09:54:03 +000017987_ACEOF
17988
Matthias Kloseb9621712010-04-24 17:59:49 +000017989case $ac_config_files in *"
17990"*) set x $ac_config_files; shift; ac_config_files=$*;;
17991esac
17992
17993case $ac_config_headers in *"
17994"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17995esac
17996
17997
17998cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017999# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018000config_files="$ac_config_files"
18001config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018004
Matthias Kloseb9621712010-04-24 17:59:49 +000018005cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018006ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018007\`$as_me' instantiates files and other configuration actions
18008from templates according to the current configuration. Unless the files
18009and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018010
Matthias Kloseb9621712010-04-24 17:59:49 +000018011Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018012
18013 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018015 --config print configuration, then exit
18016 -q, --quiet, --silent
18017 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018018 -d, --debug don't remove temporary files
18019 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018020 --file=FILE[:TEMPLATE]
18021 instantiate the configuration file FILE
18022 --header=FILE[:TEMPLATE]
18023 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018024
18025Configuration files:
18026$config_files
18027
18028Configuration headers:
18029$config_headers
18030
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018031Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018034cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18035ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018036ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020018037python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018038configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018039 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018040
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018041Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018042This config.status script is free software; the Free Software Foundation
18043gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044
18045ac_pwd='$ac_pwd'
18046srcdir='$srcdir'
18047INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018048MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018049test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018050_ACEOF
18051
Matthias Kloseb9621712010-04-24 17:59:49 +000018052cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18053# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018054ac_need_defaults=:
18055while test $# != 0
18056do
18057 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018058 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18060 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018061 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018062 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018063 --*=)
18064 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18065 ac_optarg=
18066 ac_shift=:
18067 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018068 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018069 ac_option=$1
18070 ac_optarg=$2
18071 ac_shift=shift
18072 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018073 esac
18074
Skip Montanaro6dead952003-09-25 14:50:04 +000018075 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018076 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018077 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18078 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018079 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018080 $as_echo "$ac_cs_version"; exit ;;
18081 --config | --confi | --conf | --con | --co | --c )
18082 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018083 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018084 debug=: ;;
18085 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018086 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018087 case $ac_optarg in
18088 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018089 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018090 esac
18091 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018092 ac_need_defaults=false;;
18093 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018094 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018095 case $ac_optarg in
18096 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18097 esac
18098 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018099 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100 --he | --h)
18101 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018102 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018103Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018105 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018106 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18107 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18108 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018109
18110 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018111 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018112Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018113
Matthias Kloseb9621712010-04-24 17:59:49 +000018114 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018116
18117 esac
18118 shift
18119done
18120
Skip Montanaro6dead952003-09-25 14:50:04 +000018121ac_configure_extra_args=
18122
18123if $ac_cs_silent; then
18124 exec 6>/dev/null
18125 ac_configure_extra_args="$ac_configure_extra_args --silent"
18126fi
18127
18128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018129cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018130if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018131 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018132 shift
18133 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18134 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018135 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018136 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018137fi
18138
Martin v. Löwis11437992002-04-12 09:54:03 +000018139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018140cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141exec 5>>config.log
18142{
18143 echo
18144 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18145## Running $as_me. ##
18146_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018147 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018151cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018153
Matthias Kloseb9621712010-04-24 17:59:49 +000018154cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018155
18156# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018157for ac_config_target in $ac_config_targets
18158do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018159 case $ac_config_target in
18160 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18161 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18162 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018163 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18164 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018165 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018166 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018167 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018168 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018169 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170
Victor Stinnere0be4232011-10-25 13:06:09 +020018171 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018172 esac
18173done
18174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018175
Martin v. Löwis11437992002-04-12 09:54:03 +000018176# If the user did not use the arguments to specify the items to instantiate,
18177# then the envvar interface is used. Set only those that are not.
18178# We use the long form for the default assignment because of an extremely
18179# bizarre bug on SunOS 4.1.3.
18180if $ac_need_defaults; then
18181 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18182 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18183fi
18184
Skip Montanaro6dead952003-09-25 14:50:04 +000018185# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018186# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018187# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018188# Hook for its removal unless debugging.
18189# Note that there is a small window in which the directory will not be cleaned:
18190# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018191$debug ||
18192{
Victor Stinnere0be4232011-10-25 13:06:09 +020018193 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018194 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018195 : "${ac_tmp:=$tmp}"
18196 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018197' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018198 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018199}
Martin v. Löwis11437992002-04-12 09:54:03 +000018200# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018201
Martin v. Löwis11437992002-04-12 09:54:03 +000018202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018203 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018204 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018205} ||
18206{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018207 tmp=./conf$$-$RANDOM
18208 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018209} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018210ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018211
Matthias Kloseb9621712010-04-24 17:59:49 +000018212# Set up the scripts for CONFIG_FILES section.
18213# No need to generate them if there are no CONFIG_FILES.
18214# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018215if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018216
Matthias Kloseb9621712010-04-24 17:59:49 +000018217
18218ac_cr=`echo X | tr X '\015'`
18219# On cygwin, bash can eat \r inside `` if the user requested igncr.
18220# But we know of no other shell where ac_cr would be empty at this
18221# point, so we can use a bashism as a fallback.
18222if test "x$ac_cr" = x; then
18223 eval ac_cr=\$\'\\r\'
18224fi
18225ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18226if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018227 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018228else
18229 ac_cs_awk_cr=$ac_cr
18230fi
18231
Victor Stinnere0be4232011-10-25 13:06:09 +020018232echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018233_ACEOF
18234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018235
Matthias Kloseb9621712010-04-24 17:59:49 +000018236{
18237 echo "cat >conf$$subs.awk <<_ACEOF" &&
18238 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18239 echo "_ACEOF"
18240} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018241 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18242ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018243ac_delim='%!_!# '
18244for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018245 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018246 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018247
Matthias Kloseb9621712010-04-24 17:59:49 +000018248 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18249 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018250 break
18251 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018252 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018253 else
18254 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018255 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256done
Matthias Kloseb9621712010-04-24 17:59:49 +000018257rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018258
Matthias Kloseb9621712010-04-24 17:59:49 +000018259cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018260cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018262sed -n '
18263h
18264s/^/S["/; s/!.*/"]=/
18265p
18266g
18267s/^[^!]*!//
18268:repl
18269t repl
18270s/'"$ac_delim"'$//
18271t delim
18272:nl
18273h
18274s/\(.\{148\}\)..*/\1/
18275t more1
18276s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18277p
18278n
18279b repl
18280:more1
18281s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18282p
18283g
18284s/.\{148\}//
18285t nl
18286:delim
18287h
18288s/\(.\{148\}\)..*/\1/
18289t more2
18290s/["\\]/\\&/g; s/^/"/; s/$/"/
18291p
18292b
18293:more2
18294s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18295p
18296g
18297s/.\{148\}//
18298t delim
18299' <conf$$subs.awk | sed '
18300/^[^""]/{
18301 N
18302 s/\n//
18303}
18304' >>$CONFIG_STATUS || ac_write_fail=1
18305rm -f conf$$subs.awk
18306cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18307_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018308cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018309 for (key in S) S_is_set[key] = 1
18310 FS = ""
18311
18312}
18313{
18314 line = $ 0
18315 nfields = split(line, field, "@")
18316 substed = 0
18317 len = length(field[1])
18318 for (i = 2; i < nfields; i++) {
18319 key = field[i]
18320 keylen = length(key)
18321 if (S_is_set[key]) {
18322 value = S[key]
18323 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18324 len += length(value) + length(field[++i])
18325 substed = 1
18326 } else
18327 len += 1 + keylen
18328 }
18329
18330 print line
18331}
18332
18333_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018335cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18336if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18337 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18338else
18339 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018340fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018341 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018342_ACEOF
18343
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018344# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18345# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018346# trailing colons and then remove the whole line if VPATH becomes empty
18347# (actually we leave an empty line to preserve line numbers).
18348if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018349 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18350h
18351s///
18352s/^/:/
18353s/[ ]*$/:/
18354s/:\$(srcdir):/:/g
18355s/:\${srcdir}:/:/g
18356s/:@srcdir@:/:/g
18357s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018358s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018359x
18360s/\(=[ ]*\).*/\1/
18361G
18362s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018363s/^[^=]*=[ ]*$//
18364}'
18365fi
18366
Matthias Kloseb9621712010-04-24 17:59:49 +000018367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018368fi # test -n "$CONFIG_FILES"
18369
Matthias Kloseb9621712010-04-24 17:59:49 +000018370# Set up the scripts for CONFIG_HEADERS section.
18371# No need to generate them if there are no CONFIG_HEADERS.
18372# This happens for instance with `./config.status Makefile'.
18373if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018374cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018375BEGIN {
18376_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018377
Matthias Kloseb9621712010-04-24 17:59:49 +000018378# Transform confdefs.h into an awk script `defines.awk', embedded as
18379# here-document in config.status, that substitutes the proper values into
18380# config.h.in to produce config.h.
18381
18382# Create a delimiter string that does not exist in confdefs.h, to ease
18383# handling of long lines.
18384ac_delim='%!_!# '
18385for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018386 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18387 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018388 break
18389 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018390 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018391 else
18392 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18393 fi
18394done
18395
18396# For the awk script, D is an array of macro values keyed by name,
18397# likewise P contains macro parameters if any. Preserve backslash
18398# newline sequences.
18399
18400ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18401sed -n '
18402s/.\{148\}/&'"$ac_delim"'/g
18403t rset
18404:rset
18405s/^[ ]*#[ ]*define[ ][ ]*/ /
18406t def
18407d
18408:def
18409s/\\$//
18410t bsnl
18411s/["\\]/\\&/g
18412s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18413D["\1"]=" \3"/p
18414s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18415d
18416:bsnl
18417s/["\\]/\\&/g
18418s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18419D["\1"]=" \3\\\\\\n"\\/p
18420t cont
18421s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18422t cont
18423d
18424:cont
18425n
18426s/.\{148\}/&'"$ac_delim"'/g
18427t clear
18428:clear
18429s/\\$//
18430t bsnlc
18431s/["\\]/\\&/g; s/^/"/; s/$/"/p
18432d
18433:bsnlc
18434s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18435b cont
18436' <confdefs.h | sed '
18437s/'"$ac_delim"'/"\\\
18438"/g' >>$CONFIG_STATUS || ac_write_fail=1
18439
18440cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18441 for (key in D) D_is_set[key] = 1
18442 FS = ""
18443}
18444/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18445 line = \$ 0
18446 split(line, arg, " ")
18447 if (arg[1] == "#") {
18448 defundef = arg[2]
18449 mac1 = arg[3]
18450 } else {
18451 defundef = substr(arg[1], 2)
18452 mac1 = arg[2]
18453 }
18454 split(mac1, mac2, "(") #)
18455 macro = mac2[1]
18456 prefix = substr(line, 1, index(line, defundef) - 1)
18457 if (D_is_set[macro]) {
18458 # Preserve the white space surrounding the "#".
18459 print prefix "define", macro P[macro] D[macro]
18460 next
18461 } else {
18462 # Replace #undef with comments. This is necessary, for example,
18463 # in the case of _POSIX_SOURCE, which is predefined and required
18464 # on some systems where configure will not decide to define it.
18465 if (defundef == "undef") {
18466 print "/*", prefix defundef, macro, "*/"
18467 next
18468 }
18469 }
18470}
18471{ print }
18472_ACAWK
18473_ACEOF
18474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018475 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018476fi # test -n "$CONFIG_HEADERS"
18477
18478
18479eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18480shift
18481for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018482do
18483 case $ac_tag in
18484 :[FHLC]) ac_mode=$ac_tag; continue;;
18485 esac
18486 case $ac_mode$ac_tag in
18487 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018488 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018489 :[FH]-) ac_tag=-:-;;
18490 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18491 esac
18492 ac_save_IFS=$IFS
18493 IFS=:
18494 set x $ac_tag
18495 IFS=$ac_save_IFS
18496 shift
18497 ac_file=$1
18498 shift
18499
18500 case $ac_mode in
18501 :L) ac_source=$1;;
18502 :[FH])
18503 ac_file_inputs=
18504 for ac_f
18505 do
18506 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018507 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018508 *) # Look for the file first in the build tree, then in the source tree
18509 # (if the path is not absolute). The absolute path cannot be DOS-style,
18510 # because $ac_f cannot contain `:'.
18511 test -f "$ac_f" ||
18512 case $ac_f in
18513 [\\/$]*) false;;
18514 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18515 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018516 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018517 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018518 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18519 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018520 done
18521
18522 # Let's still pretend it is `configure' which instantiates (i.e., don't
18523 # use $as_me), people would be surprised to read:
18524 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018525 configure_input='Generated from '`
18526 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18527 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018528 if test x"$ac_file" != x-; then
18529 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018530 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18531$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018532 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018533 # Neutralize special characters interpreted by sed in replacement strings.
18534 case $configure_input in #(
18535 *\&* | *\|* | *\\* )
18536 ac_sed_conf_input=`$as_echo "$configure_input" |
18537 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18538 *) ac_sed_conf_input=$configure_input;;
18539 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018540
18541 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018542 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18543 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018544 esac
18545 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018546 esac
18547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018548 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018549$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018550 X"$ac_file" : 'X\(//\)[^/]' \| \
18551 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018552 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018553$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018554 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18555 s//\1/
18556 q
18557 }
18558 /^X\(\/\/\)[^/].*/{
18559 s//\1/
18560 q
18561 }
18562 /^X\(\/\/\)$/{
18563 s//\1/
18564 q
18565 }
18566 /^X\(\/\).*/{
18567 s//\1/
18568 q
18569 }
18570 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018571 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018572 ac_builddir=.
18573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574case "$ac_dir" in
18575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18576*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580 case $ac_top_builddir_sub in
18581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18583 esac ;;
18584esac
18585ac_abs_top_builddir=$ac_pwd
18586ac_abs_builddir=$ac_pwd$ac_dir_suffix
18587# for backward compatibility:
18588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018589
18590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018593 ac_top_srcdir=$ac_top_builddir_sub
18594 ac_abs_top_srcdir=$ac_pwd ;;
18595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018597 ac_top_srcdir=$srcdir
18598 ac_abs_top_srcdir=$srcdir ;;
18599 *) # Relative name.
18600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18601 ac_top_srcdir=$ac_top_build_prefix$srcdir
18602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018605
Martin v. Löwis11437992002-04-12 09:54:03 +000018606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018607 case $ac_mode in
18608 :F)
18609 #
18610 # CONFIG_FILE
18611 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018612
18613 case $INSTALL in
18614 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018615 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018616 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018617 ac_MKDIR_P=$MKDIR_P
18618 case $MKDIR_P in
18619 [\\/$]* | ?:[\\/]* ) ;;
18620 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18621 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018622_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018623
Matthias Kloseb9621712010-04-24 17:59:49 +000018624cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018625# If the template does not know about datarootdir, expand it.
18626# FIXME: This hack should be removed a few years after 2.60.
18627ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018628ac_sed_dataroot='
18629/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018630 p
18631 q
18632}
18633/@datadir@/p
18634/@docdir@/p
18635/@infodir@/p
18636/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018637/@mandir@/p'
18638case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018639*datarootdir*) ac_datarootdir_seen=yes;;
18640*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018641 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18642$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018644cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018645 ac_datarootdir_hack='
18646 s&@datadir@&$datadir&g
18647 s&@docdir@&$docdir&g
18648 s&@infodir@&$infodir&g
18649 s&@localedir@&$localedir&g
18650 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018651 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018652esac
18653_ACEOF
18654
18655# Neutralize VPATH when `$srcdir' = `.'.
18656# Shell code in configure.ac might set extrasub.
18657# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018658cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18659ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018660$extrasub
18661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018662cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018663:t
18664/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018665s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018666s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018667s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018668s&@srcdir@&$ac_srcdir&;t t
18669s&@abs_srcdir@&$ac_abs_srcdir&;t t
18670s&@top_srcdir@&$ac_top_srcdir&;t t
18671s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18672s&@builddir@&$ac_builddir&;t t
18673s&@abs_builddir@&$ac_abs_builddir&;t t
18674s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18675s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018676s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018677$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018678"
Victor Stinnere0be4232011-10-25 13:06:09 +020018679eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18680 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018682test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018683 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18684 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18685 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018687which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018688$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018689which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018690
Victor Stinnere0be4232011-10-25 13:06:09 +020018691 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018692 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018693 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18694 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018695 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018696 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018697 ;;
18698 :H)
18699 #
18700 # CONFIG_HEADER
18701 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018702 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018703 {
18704 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018705 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18706 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018707 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018708 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018709 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18710$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018711 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018712 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018713 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018714 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018715 fi
18716 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018717 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018718 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018719 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018720 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018721 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018723
18724 esac
18725
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018726
18727 case $ac_file$ac_mode in
18728 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18729
18730 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018731done # for ac_tag
18732
Guido van Rossum627b2d71993-12-24 10:39:16 +000018733
Matthias Kloseb9621712010-04-24 17:59:49 +000018734as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018735_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018736ac_clean_files=$ac_clean_files_save
18737
Matthias Kloseb9621712010-04-24 17:59:49 +000018738test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018739 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018740
Martin v. Löwis11437992002-04-12 09:54:03 +000018741
18742# configure is writing to config.log, and then calls config.status.
18743# config.status does its own redirection, appending to config.log.
18744# Unfortunately, on DOS this fails, as config.log is still kept open
18745# by configure, so config.status won't be able to write to it; its
18746# output is simply discarded. So we exec the FD to /dev/null,
18747# effectively closing config.log, so it can be properly (re)opened and
18748# appended to by config.status. When coming back to configure, we
18749# need to make the FD available again.
18750if test "$no_create" != yes; then
18751 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018752 ac_config_status_args=
18753 test "$silent" = yes &&
18754 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018755 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018756 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018757 exec 5>>config.log
18758 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18759 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018760 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018761fi
18762if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18764$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018765fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018766
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018767
Christian Heimes75ed8902013-11-20 01:11:18 +010018768echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018769if test ! -f Modules/Setup.local
18770then
18771 echo "# Edit this file for local setup changes" >Modules/Setup.local
18772fi
18773
Christian Heimes75ed8902013-11-20 01:11:18 +010018774echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018775$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018776 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018777 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018778mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018779
18780if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18781 echo "" >&6
18782 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018783 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 +000018784 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018785 echo "" >&6
18786 echo "" >&6
18787fi
18788